Changes for page Forthcoming

From version 46.6
edited by Andrea Omicini
on 06/05/2023 16:17
Change comment: There is no comment for this version
To version 59.1
edited by Andrea Omicini
on 16/06/2023 13:27
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +$services.localization.render('forthcoming')
Default language
... ... @@ -1,1 +1,0 @@
1 -en
Content
... ... @@ -1,24 +1,33 @@
1 -= {{italiano}}In arrivo{{/italiano}}{{english}}Forthcoming{{/english}} =
2 -
3 -{{include reference="Events.Environment" excludeFirstHeading="true"/}}{{velocity}}
1 +{{velocity}}
2 +{{html wiki="true" clean="false"}}
3 +#template('apice_events.vm')
4 +#template('apice_macros.vm')
5 +#isuserspace()
4 4  ##
5 -#if( !$userName || $userName == "" || !$userSpace || $userSpace == "" || !$userFullname || $userFullname == "" )
7 +#if( $isUserSpace )
8 + #userspace()
6 6  ## overall forthcoming events
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 prop.value > current_date() order by date(prop.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 " )
9 9  #else
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 " )
13 + #set( $query = ", BaseObject objEvent, DateProperty as propDate
14 + 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 " )
12 12  #end
13 13  ## execute query
14 14  #set( $eventsFound = $xwiki.searchDocuments($query) )
15 15  ##
16 16  #if( $eventsFound.size() > 0 )
17 ->{{stringEngIta eng="forthcoming events" ita="eventi in arrivo"/}}
20 +>$services.localization.render('forthcomingevents').toLowerCase()
18 18  
22 +#template('apice_event_macros.vm')
23 +<div>
19 19   #foreach($event in $eventsFound)
20 - #set( $eventDoc = $xwiki.getDocument($event) )
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
22 -(%%)
25 + #if( !$foreach.first )
26 + <span class="menumainbody">&ensp;&bull;&ensp;</span>
27 + #end
28 + #eventlinked($event) <span class="textsecondary">(#eventyears($event))</span>
29 + #end
30 +</div>
23 23  #end
24 -{{/velocity}}{{noShortcuts/}}
32 +{{/html}}
33 +{{/velocity}}{{pageDisplay sort="objectservice"/}}