Modifiche per il documento In arrivo

Dalla versione 39.3
modificato da Andrea Omicini
il 01/04/2023 19:26
Cambia il commento: Nessun commento per questa versione
Alla versione 39.5
modificato da Andrea Omicini
il 01/04/2023 19:28
Cambia il commento: Nessun commento per questa versione

Summary

Details

Page properties
Content
... ... @@ -5,12 +5,16 @@
5 5  ## overall forthcoming events
6 6   #set( $sql = "select doc.fullName from XWikiDocument doc, BaseObject obj, DateProperty as prop
7 7   where doc.fullName = obj.name and obj.className = '$objectSpace.$objectClass' and obj.name <> '$objectSpace.$objectTemplate' and prop.id.id = obj.id and prop.name = 'start_date' and ( ( year(prop.value) > year(current_date()) ) or ( year(prop.value) = year(current_date()) and month(prop.value) > month(current_date()) ) or ( year(prop.value) = year(current_date()) and month(prop.value) = month(current_date()) and day(prop.value) > day(current_date()) ) ) order by date(prop.value) asc ")
8 - #set( $eventFound = $xwiki.search($sql) )
9 - #foreach($event in $eventFound)
10 - #set( $eventDoc = $xwiki.getDocument($event) )
8 + #set( $eventsFound = $xwiki.search($sql) )
9 + #if( $eventsFound.size() > 0 )
10 +>{{stringEngIta eng="Forthcoming Events" ita="Eventi in arrivo"/}}
11 +
12 + #foreach($event in $eventsFound)
13 + #set( $eventDoc = $xwiki.getDocument($event) )
11 11  #if( !$foreach.first ){{themeTextSecondary}}•{{/themeTextSecondary}} #end##
12 12  {{eventAcronym}}$eventDoc{{/eventAcronym}} (% style='color:$theme.textPrimaryColor' %)({{eventDates}}$eventDoc{{/eventDates}}) #end
13 13  (%%)
17 + #end
14 14  #else
15 15  ## user forthcoming events new
16 16   #set( $query = "select doc.fullName from XWikiDocument doc, BaseObject as obj0, BaseObject as obj1, LargeStringProperty as prop1, DateProperty as prop2