Changes for page Forthcoming
From version 44.1
edited by Andrea Omicini
on 24/04/2023 13:39
on 24/04/2023 13:39
Change comment:
There is no comment for this version
To version 46.3
edited by Andrea Omicini
on 05/05/2023 22:58
on 05/05/2023 22:58
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,20 +1,20 @@ 1 1 = {{italiano}}In arrivo{{/italiano}}{{english}}Forthcoming{{/english}} = 2 2 3 -{{include reference=" Classes.Velocity" excludeFirstHeading="true"/}}{{include reference="Events.Environment" excludeFirstHeading="true"/}}{{velocity}}3 +{{include reference="Events.Environment" excludeFirstHeading="true"/}}{{velocity}} 4 4 ## 5 5 #if( !$userName || $userName == "" || !$userSpace || $userSpace == "" || !$userFullname || $userFullname == "" ) 6 6 ## overall forthcoming events 7 - #set( $query = " select doc.fullName from XWikiDocument doc, BaseObject obj, DateProperty as prop8 - 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 obj, DateProperty as prop 8 + where doc.fullName = obj.name and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectPool}.${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 " ) 9 9 #else 10 - #set( $query = " select doc.fullName from XWikiDocument doc, BaseObject as obj0, BaseObject as obj1, LargeStringProperty as prop1, DateProperty as prop211 - where obj0.name = doc.fullName and obj0.className = '${objectSpace}.${objectClass}' and obj0.name <> '${object Space}.${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 by date(prop2.value) asc " )10 + #set( $query = ", BaseObject as obj0, BaseObject as obj1, LargeStringProperty as prop1, DateProperty as prop2 11 + where obj0.name = doc.fullName and obj0.className = '${objectSpace}.${objectClass}' and obj0.name <> '${objectPool}.${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 by date(prop2.value) asc " ) 12 12 #end 13 13 ## execute query 14 -#set( $eventsFound = $xwiki.search($query) ) 14 +#set( $eventsFound = $xwiki.searchDocuments($query) ) 15 15 ## 16 16 #if( $eventsFound.size() > 0 ) 17 ->{{stringEngIta eng=" ForthcomingEvents" ita="Eventi in arrivo"/}}17 +>{{stringEngIta eng="forthcoming events" ita="eventi in arrivo"/}} 18 18 19 19 #foreach($event in $eventsFound) 20 20 #set( $eventDoc = $xwiki.getDocument($event) )