Změny dokumentu Macro - changedpages1 - forTest
                  Naposledy upravil David Brazda 28.04.2021 07:58
              
      
      Popis verze:
              Nahrát nový obrázek logoPgWiki.jpg
          
   Přehled
- 
          Na stránce změněno: (2 změněno, 0 přidáno, 0 odstraněno)
 - 
          Attachments (0 změněno, 3 přidáno, 0 odstraněno)
 - 
          Objects (0 změněno, 3 přidáno, 0 odstraněno)
 
Rozpis
- Na stránce změněno:
 - 
      
- Nadpis
 -   
... ... @@ -1,1 +1,1 @@ 1 -Macro - changedpages 1 +Macro - changedpages1 - forTest  - Obsah
 -   
... ... @@ -1,0 +1,5 @@ 1 +**~{~{changedpages1/}}** 2 + 3 +**for test just on this wiki** 4 + 5 +{{changedpages1 limit="10"/}}  
 
- brevnov_int_podkroví_smer_bok.jpg
 -   
- Author
 -   
... ... @@ -1,0 +1,1 @@ 1 +XWiki.DavidBrazda  - Size
 -   
... ... @@ -1,0 +1,1 @@ 1 +3.8 MB  - Content
 
 - ctvrecec v2_2 pgdenik.jpg
 -   
- Author
 -   
... ... @@ -1,0 +1,1 @@ 1 +XWiki.DavidBrazda  - Size
 -   
... ... @@ -1,0 +1,1 @@ 1 +22.3 KB  - Content
 
 - logoPgWiki.jpg
 -   
- Author
 -   
... ... @@ -1,0 +1,1 @@ 1 +XWiki.DavidBrazda  - Size
 -   
... ... @@ -1,0 +1,1 @@ 1 +15.8 KB  - Content
 
 
- XWiki.AverageRatingsClass[0]
 -   
- Average Vote
 -   
... ... @@ -1,0 +1,1 @@ 1 +2.0  - Manager Identifier
 -   
... ... @@ -1,0 +1,1 @@ 1 +ratings  - Number of Votes
 -   
... ... @@ -1,0 +1,1 @@ 1 +1  - Voted Entity Reference
 -   
... ... @@ -1,0 +1,1 @@ 1 +document:xwiki:BackEnd.Macro - changedpages - forTest.WebHome  - Scale of votes
 -   
... ... @@ -1,0 +1,1 @@ 1 +5  - Date of last update
 -   
... ... @@ -1,0 +1,1 @@ 1 +2021-02-28 13:21:00.33  
 - XWiki.WikiMacroClass[0]
 -   
- Cached
 -   
... ... @@ -1,0 +1,1 @@ 1 +Ne  - Context elements
 -   
... ... @@ -1,0 +1,1 @@ 1 +Wiki  - Asynchronous rendering
 -   
... ... @@ -1,0 +1,1 @@ 1 +Ne  - Macro code
 -   
... ... @@ -1,0 +1,25 @@ 1 +{{velocity}} 2 +##fetches last 6 created pages in 30days 3 +#set($howManyDays = 30) 4 +#set($limit = $xcontext.macro.params.get('limit')) 5 +#if (!$limit) 6 + #set($limit = 5) 7 +#end 8 +#set($fromDate = $datetool.systemCalendar) 9 +#set($discard = $fromDate.add(7,-$howManyDays)) 10 +#set ($list = $services.query.xwql('where doc.creationDate > :date and doc.hidden = 0 order by doc.creationDate desc').bindValue('date', $datetool.toDate($fromDate)).setLimit($limit).execute()) 11 +##if there are less than $limit pages created in 30 days, then repeat the query without 30days limitation 12 +#if ($list.size() < $limit) 13 +#set ($list = $services.query.xwql('where doc.hidden = 0 order by doc.creationDate desc').setLimit($limit).execute()) 14 +#end 15 +#if ($list.size() != 0) 16 +Nově vytvořené stránky 17 +#foreach($reference in $list) 18 + #set ($document = $xwiki.getDocument($reference)) 19 + #if (!$document.isHidden() && ($document.getTitle())) 20 + #set ($label = $document.getTitle()) 21 + * [[$label>>$document]] 22 + #end 23 +#end 24 +#end 25 +{{/velocity}}  - Macro content availability
 -   
... ... @@ -1,0 +1,1 @@ 1 +No content  - Macro description
 -   
... ... @@ -1,0 +1,1 @@ 1 +Seznam nedávno změněné stránek  - Macro id
 -   
... ... @@ -1,0 +1,1 @@ 1 +changedpages1  - Macro name
 -   
... ... @@ -1,0 +1,1 @@ 1 +Nedávno upravené stránky  - Supports inline mode
 -   
... ... @@ -1,0 +1,1 @@ 1 +Ne  - Macro visibility
 -   
... ... @@ -1,0 +1,1 @@ 1 +Current Wiki  
 - XWiki.WikiMacroParameterClass[0]
 -   
- Parameter default value
 -   
... ... @@ -1,0 +1,1 @@ 1 +5  - Parameter description
 -   
... ... @@ -1,0 +1,1 @@ 1 +Počet uvedených stránek (default 5)  - Parameter mandatory
 -   
... ... @@ -1,0 +1,1 @@ 1 +Ne  - Parameter name
 -   
... ... @@ -1,0 +1,1 @@ 1 +limit