Changes for page Deadlines

From version 52.1
edited by Andrea Omicini
on 27/03/2023 00:58
Change comment: There is no comment for this version
To version 53.1
edited by Andrea Omicini
on 01/04/2023 19:55
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,11 +1,24 @@
1 1  = {{italiano}}Prossime scadenze{{/italiano}}{{english}}Incoming Deadlines{{/english}} =
2 2  
3 3  {{include reference="Events.Environment" excludeFirstHeading="true"/}}{{velocity}}
4 -#set( $sql = "select doc.fullName from XWikiDocument doc, BaseObject obj, DateProperty as prop
5 - where doc.fullName = obj.name and obj.className = '$objectSpace.$objectClass' and obj.name <> '$objectSpace.$objectTemplate' and prop.id.id = obj.id and prop.name = 'paper_submission' 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 ")
6 -#set( $eventFound = $xwiki.search($sql) )
7 -#foreach( $event in $eventFound )
8 - #set( $evDoc = $xwiki.getDocument($event) )
4 +#if( !$userName || $userName == "" || !$userSpace || $userSpace == "" || !$userFullname || $userFullname == "" )
5 +## overall incoming deadlines
6 + #set( $query = "select doc.fullName from XWikiDocument doc, BaseObject obj, DateProperty as prop
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 = 'paper_submission' 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 +#else
9 + #set( $query = "select doc.fullName from XWikiDocument doc, BaseObject obj, DateProperty as prop
10 + where doc.fullName = obj.name and obj.className = '$objectSpace.$objectClass' and obj.name <> '$objectSpace.$objectTemplate' and prop.id.id = obj.id and prop.name = 'paper_submission' 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()) ) ) 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 " )
11 +#end
12 +## execute query
13 +#set( $eventsFound = $xwiki.search($query) )
14 +##
15 +#if( $eventsFound.size() > 0 )
16 +>{{stringEngIta eng="Incoming Deadlines" ita="Prossime scadenze"/}}
17 +
18 + #foreach($event in $eventsFound)
19 + #set( $eventDoc = $xwiki.getDocument($event) )
9 9   #if( !$foreach.first ){{themeTextSecondary}}•{{/themeTextSecondary}} #end##
10 -{{eventAcronym}}$evDoc{{/eventAcronym}} {{themeTextPrimary}}({{eventDates}}$evDoc{{/eventDates}}){{/themeTextPrimary}}#if( $evDoc.display("paper_submission") != "" ){{themeTextSecondary}} – {{/themeTextSecondary}}$evDoc.display("paper_submission") {{themeTextPrimary}}//(submission)//{{/themeTextPrimary}}#if( $evDoc.display("abstract_submission") != "" ){{themeTextSecondary}} / {{/themeTextSecondary}}$evDoc.display("abstract_submission") {{themeTextPrimary}}//(abstract)//{{/themeTextPrimary}}#end #end(%%)#end
21 +{{eventAcronym}}$eventDoc{{/eventAcronym}} {{themeTextPrimary}}({{eventDates}}$eventDoc{{/eventDates}}){{/themeTextPrimary}}#if( $eventDoc.display("paper_submission") != "" ){{themeTextSecondary}} – {{/themeTextSecondary}}$eventDoc.display("paper_submission") {{themeTextPrimary}}//(submission)//{{/themeTextPrimary}}#if( $eventDoc.display("abstract_submission") != "" ){{themeTextSecondary}} / {{/themeTextSecondary}}$eeventDocvDoc.display("abstract_submission") {{themeTextPrimary}}//(abstract)//{{/themeTextPrimary}}#end #end
22 +(%%)
23 +#end
11 11  {{/velocity}}