Changes for page Forthcoming
From version 42.1
edited by Andrea Omicini
on 24/04/2023 01:08
on 24/04/2023 01:08
Change comment:
There is no comment for this version
To version 47.2
edited by Andrea Omicini
on 06/05/2023 16:22
on 06/05/2023 16:22
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,26 +1,24 @@ 1 1 = {{italiano}}In arrivo{{/italiano}}{{english}}Forthcoming{{/english}} = 2 2 3 -{{include reference="Macros.Velocity" excludeFirstHeading="true"/}}{{include reference="Events.Environment" excludeFirstHeading="true"/}}{{velocity}} 4 -## set page display 5 -#set( $eventMenu = true ) 3 +{{include reference="Events.Environment" excludeFirstHeading="true"/}}{{velocity}} 6 6 ## 7 7 #if( !$userName || $userName == "" || !$userSpace || $userSpace == "" || !$userFullname || $userFullname == "" ) 8 8 ## overall forthcoming events 9 - #set( $query = " select doc.fullName from XWikiDocument doc, BaseObject obj, DateProperty as prop10 - where doc.fullName = obj.name and obj.className = '$objectSpace.$objectClass' and obj.name <> '$object Space.$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 " )7 + #set( $query = ", BaseObject objEvent, DateProperty as propDate 8 + where doc.fullName = objEvent.name and objEvent.className = '${objectSpace}.${objectClass}' and objEvent.name <> '${objectPool}.${objectTemplate}' and propDate.id.id = objEvent.id and propDate.name = 'start_date' and propDate.value > current_date() order by propDate.value asc " ) 11 11 #else 12 - #set( $query = " select doc.fullName from XWikiDocument doc, BaseObject as obj0, BaseObject as obj1, LargeStringProperty as prop1, DateProperty as prop213 - where obj 0.name = doc.fullName and obj0.className = '${objectSpace}.${objectClass}' and obj0.name <> '${objectSpace}.${objectTemplate}' and prop2.id.id = obj0.id and prop2.name = 'end_date' and ( ( year(prop2.value) > year(current_date())) or ( year(prop2.value)=year(current_date()) and month(prop2.value) > month(current_date()))or ( year(prop2.value) = year(current_date())and month(prop2.value) = month(current_date()) and day(prop2.value)>day(current_date())) )and obj1.name = doc.fullName and obj1.className = '${objectSpace}.Roles.${objectClass}' and prop1.id.id = obj1.id and prop1.name = 'who' and prop1.value like '%$userName%' order bydate(prop2.value)asc " )10 + #set( $query = ", BaseObject as objEvent, BaseObject as objRole, LargeStringProperty as propWho, DateProperty as propDate 11 + where objEvent.name = doc.fullName and objEvent.className = '${objectSpace}.${objectClass}' and objEvent.name <> '${objectPool}.${objectTemplate}' and propDate.id.id = objEvent.id and propDate.name = 'start_date' and propDate.value > current_date() and objRole.name = doc.fullName and objRole.className = '${objectSpace}.Roles.${objectClass}' and propWho.id.id = objRole.id and propWho.name = 'who' and propWho.value like '%$userName%' order by propDate.value asc " ) 14 14 #end 15 15 ## execute query 16 -#set( $eventsFound = $xwiki.search($query) ) 14 +#set( $eventsFound = $xwiki.searchDocuments($query) ) 17 17 ## 18 18 #if( $eventsFound.size() > 0 ) 19 ->{{stringEngIta eng=" ForthcomingEvents" ita="Eventi in arrivo"/}}17 +>{{stringEngIta eng="forthcoming events" ita="eventi in arrivo"/}} 20 20 21 21 #foreach($event in $eventsFound) 22 22 #set( $eventDoc = $xwiki.getDocument($event) ) 23 -#if( !$foreach.first ){{themeTextSecondary}}•{{/themeTextSecondary}} 21 +#if( !$foreach.first ){{themeTextSecondary}} • {{/themeTextSecondary}} #end#if( $eventDoc.getValue('sort') != 'special issue' ){{event short="true"}}$eventDoc{{/event}}#{else}{{event short="title" linked="title"}}$eventDoc{{/event}}#end #end 24 24 (%%) 25 25 #end 26 26 {{/velocity}}{{noShortcuts/}}