Changes for page Supervisors

From version 102.1
edited by Andrea Omicini
on 30/06/2023 00:53
Change comment: There is no comment for this version
To version 98.2
edited by Andrea Omicini
on 30/06/2023 00:35
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,6 +1,7 @@
1 1  {{velocity}}
2 2  {{html clean="false" wiki="true"}}
3 3  #template('apice_theses.vm')
4 +#template('apice_user_param.vm')
4 4  ##
5 5  #### tag parameter possibly brings name to be used as tag
6 6  #if( !$request.tag )
... ... @@ -7,7 +7,7 @@
7 7  ## no tag parameter --> just the cloud
8 8  ## set query
9 9   #set( $query = ", BaseObject as objThesis, LargeStringProperty as propSupervisors, StringProperty as propStatus, DateProperty as propEnddate
10 - where objThesis.name = doc.fullName and objThesis.className = '${objectSpace}.${objectClass}' and objThesis.name <> '${objectSpace}.${objectTemplate}' and propSupervisors.id.id = objThesis.id and propStatus.id.id = objThesis.id and propEnddate.id.id = objThesis.id and propSupervisors.name = 'supervisors' and propSupervisors.value <> '' and propStatus.name = 'status' and lower(propStatus.value) = 'completed' and propEnddate.name = 'end' order by propEnddate.value desc" )
11 + where objThesis.name = doc.fullName and objThesis.className = '${objectSpace}.${objectClass}' and objThesis.name <> '${objectSpace}.${objectTemplate}' and propSupervisors.id.id = objThesis.id and propStatus.id.id = objThesis.id and prop2.id.id = objThesis.id and propSupervisors.name = 'supervisors' and propSupervisors.value <> '' and propStatus.name = 'status' and lower(propStatus.value) = 'completed' and propEnddate.name = 'end' order by propEnddate.value desc" )
11 11  ## execute query
12 12   #set( $itemFound = $xwiki.searchDocuments($query) )
13 13   #set( $itemFoundNo = $itemFound.size() )
... ... @@ -38,11 +38,8 @@
38 38  ## END EACH ITEM IN MAP
39 39  ## final values: $nameMap
40 40   #set( $nameFoundNo = $nameMap.keySet().size() )
41 -### CLOUD PAGE / START
42 -<div class="mainheader">
43 - $services.localization.render('theses').toLowerCase()
44 -</div>
45 -<div style='text-align: center'>
42 +## tag cloud
43 +(% style='text-align:center' %)(((
46 46   #foreach( $name in $nameMap.keySet() )
47 47   #set( $nameItemNo = $nameMap[$name].size() )
48 48   #if( $nameItemNo > 40 )#set( $tagSize = "140%" )
... ... @@ -55,19 +55,15 @@
55 55   #elseif( $nameItemNo == 2 )#set( $tagSize = "100%" )
56 56   #else#set( $tagSize = "90%" )
57 57   #end
58 - #set( $urlEscapedName = $escapetool.url($name) )
59 -<span style='font-size:$tagSize; white-space: nowrap'>&ensp;[[#if( $name.startsWith("XWiki.") )$xwiki.getUserName($name,false)#else$name#end>>$doc|queryString='tag=$urlEscapedName']]</span><sub class='textprimary' style="font-size: .75em">$nameItemNo</sub>&ensp;
60 - #end
61 -</div>
56 +[[(% style='font-size:$tagSize; white-space: nowrap' %){{namesFromUsers linked='false'}}$name{{/namesFromUsers}}(%%)>>$doc||queryString='tag=$name']](% style='font-style:normal;color:$theme.textPrimaryColor;font-size:75%' %),,$nameItemNo,, (%%) #end
57 +)))
62 62  ## cloud bottom
63 -<div class="menuqualifier" style="text-align: right">
64 -[ $nameFoundNo #if( $nameFoundNo == 1 )$services.localization.render('supervisor').toLowerCase()#{else}$services.localization.render('supervisors').toLowerCase()#end / $itemFoundNo #if( $itemFoundNo == 1 )$services.localization.render('thesis').toLowerCase()#{else}$services.localization.render('theses').toLowerCase()#end ]
65 -</div>
66 -### CLOUD PAGE / END
59 +(% style='font-style:oblique;font-size:smaller;text-align:right;color:$theme.textSecondaryColor' %)(((
60 +[ $nameFoundNo #if( $nameFoundNo == 1 ){{stringEngIta eng="supervisor" ita="supervisore"/}}#else{{stringEngIta eng="supervisors" ita="supervisori"/}}#end / $itemFoundNo #if( $itemFoundNo == 1 ){{stringEngIta eng="$objectEngSingular.toLowerCase()" ita="$objectItaSingular.toLowerCase()"/}}#else{{stringEngIta eng = "$objectEngPlural.toLowerCase()" ita="$objectItaPlural.toLowerCase()"/}}#end ]
61 +)))
62 +#### YES TAG PARAMETER
67 67  #else
68 -## yes tag parameter --> the item list
69 -##
70 -#### TAG PAGE / START
64 +## set query
71 71   #set( $query = ", BaseObject as objThesis, LargeStringProperty as propSupervisors, StringProperty as propStatus, DateProperty as propEnddate
72 72   where objThesis.name = doc.fullName and objThesis.className = '${objectSpace}.${objectClass}' and objThesis.name <> '${objectSpace}.${objectTemplate}' and propSupervisors.id.id = objThesis.id and propStatus.id.id = objThesis.id and propEnddate.id.id = objThesis.id and propSupervisors.name = 'supervisors' and propSupervisors.value like '%$request.tag%' and propStatus.name = 'status' and lower(propStatus.value) = 'completed' and propEnddate.name = 'end' order by propEnddate.value desc" )
73 73  ## execute query
... ... @@ -74,20 +74,15 @@
74 74   #set( $itemFound = $xwiki.searchDocuments($query) )
75 75   #set( $itemFoundNo = $itemFound.size() )
76 76  ## subtitle
77 -<div class="mainheader">
78 -$itemNo #if( $itemNo > 1)$services.localization.render('theses').toLowerCase()#{else}$services.localization.render('thesis').toLowerCase()#{end}
79 -</div>
80 -## thesis list
81 - #template('apice_thesis_macros.vm')
71 +>$itemFoundNo #if( $itemFoundNo == 1 ){{stringEngIta eng="$objectEngSingular.toLowerCase()" ita="$objectItaSingular.toLowerCase()"/}}#else{{stringEngIta eng="$objectEngPlural.toLowerCase()" ita="$objectItaPlural.toLowerCase()"/}}#end#if( $request.user ) / {{namesFromUsers linked='false'}}$request.user{{/namesFromUsers}}#end#if( $request.name && $request.surname ) / {{namesFromUsers linked='false'}}$request.name $request.surname{{/namesFromUsers}}#end
72 +## talk list
73 +(((
82 82   #foreach( $item in $itemFound )
83 -<div>
84 -[[image:icon:book]] #thesislinked($item)
85 -</div>
75 +[[image:icon:book]] {{thesis linked="title"}}$item{{/thesis}}
86 86   #end
77 +)))
87 87  ## thesis list bottom
88 -<div class="menuqualifier" style="text-align: right">
89 -[ [[{{stringEngIta eng="supervisor cloud" ita="nuvola relatori" /}}>>$doc.name]] / $services.localization.render('theses').toLowerCase() ]
90 -</div>
79 +(% style='font-style:oblique;font-size:smaller;text-align:right;color:$theme.textSecondaryColor' %)((([ [[{{stringEngIta eng="supervisor cloud" ita="nuvola supervisori" /}}>>$doc||]] / {{stringEngIta eng = "$objectEngPlural.toLowerCase()" ita = "$objectItaPlural.toLowerCase()"/}} ])))(%%)
91 91  #end
92 92  {{/html}}
93 93  {{/velocity}}{{pageDisplay sort="objectservice"/}}