Changes for page Supervisors
From version 100.1
edited by Andrea Omicini
on 30/06/2023 00:45
on 30/06/2023 00:45
Change comment:
There is no comment for this version
To version 92.1
edited by Andrea Omicini
on 29/01/2023 21:29
on 29/01/2023 21:29
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -#if($request.tag)$services.localization.render('supervisor').toLowerCase() : $xwiki.getUserName($request.tag,false)#else$services.localization.render('supervisors')#end - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Content
-
... ... @@ -1,13 +1,20 @@ 1 -{{velocity}} 2 -{{html clean="false" wiki="true"}} 3 -#template('apice_theses.vm') 1 += {{velocity}}#if( $request.tag )(% style="color:$theme.textSecondaryColor" %)supervisor : (%%){{namesFromUsers linked='false'}}$request.tag{{/namesFromUsers}}#{else}{{stringEngIta eng="Supervisors" ita= "Supervisori"/}}#{end}{{/velocity}} = 2 + 3 +{{include reference="Theses.Environment" excludeFirstHeading="true"/}}{{velocity}} 4 +## thesis page with menus 5 +#set( $thesisMenu = true ) 4 4 ## 5 5 #### tag parameter possibly brings name to be used as tag 6 -#if( !$request.tag ) 7 7 ## no tag parameter --> just the cloud 9 +## yes tag parameter --> the item list 10 +## 11 +## NO TAG PARAMETER 12 +#if( !$request.tag ) 13 +## subtitle 14 +>{{stringEngIta eng="$objectEngPlural" ita= "$objectItaPlural"/}}#if( $oneUser ) / $userFirstName $userLastName#{end} 8 8 ## set query 9 - #set( $query = ", BaseObject as obj Thesis,LargeStringProperty as propSupervisors,StringProperty as propStatus,DateProperty as propEnddate10 - where obj Thesis.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" )16 + #set( $query = ", BaseObject as obj, StringProperty as prop1, DateProperty as prop2 17 + where obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectSpace}.${objectTemplate}' and prop1.id.id = obj.id and prop2.id.id = obj.id and prop1.name = 'status' and lower(prop1.value) = 'completed' and prop2.name = 'end' order by prop2.value desc" ) 11 11 ## execute query 12 12 #set( $itemFound = $xwiki.searchDocuments($query) ) 13 13 #set( $itemFoundNo = $itemFound.size() ) ... ... @@ -17,7 +17,8 @@ 17 17 #foreach( $item in $itemFound ) 18 18 ## set $doc & $obj 19 19 #set( $itemDoc = $xwiki.getDocument($item) ) 20 - #set( $nameList = $itemDoc.getValue("supervisors").split(",") ) 27 + #set( $itemObj = $itemDoc.getObject("${objectSpace}.${objectClass}") ) 28 + #set( $nameList = $itemObj.getValue("supervisors").split(",") ) 21 21 ## set user-item map 22 22 #foreach( $name in $nameList ) 23 23 #### build name lists ... ... @@ -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'> 49 +## tag cloud 50 +(% 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,20 +55,17 @@ 55 55 #elseif( $nameItemNo == 2 )#set( $tagSize = "100%" ) 56 56 #else#set( $tagSize = "90%" ) 57 57 #end 58 -<span style='font-size:$tagSize; white-space: nowrap'> [[#if( $name.startsWith("XWiki.") )$xwiki.getUserName($name,false)#else$name#end>>$doc]]</span><sub class='textprimary' style="font-size: .75em">$nameItemNo</sub>  59 - #end 60 -</div> 63 +[[(% 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 64 +))) 61 61 ## cloud bottom 62 - <divclass="menuqualifier"style="text-align:">63 -[ $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 ]64 - </div>65 -### CLOUDPAGE/END66 +(% style='font-style:oblique;font-size:smaller;text-align:right;color:$theme.textSecondaryColor' %)((( 67 +[ $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 ] 68 +))) 69 +#### YES TAG PARAMETER 66 66 #else 67 -## yes tag parameter --> the item list 68 -## 69 -#### TAG PAGE / START 70 - #set( $query = ", BaseObject as objThesis, LargeStringProperty as propSupervisors, StringProperty as propStatus, DateProperty as propEnddate 71 - 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" ) 71 +## set query 72 + #set( $query = ", BaseObject as obj, LargeStringProperty as prop0, StringProperty as prop1, DateProperty as prop2 73 + where obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectSpace}.${objectTemplate}' and prop0.id.id = obj.id and prop1.id.id = obj.id and prop2.id.id = obj.id and prop0.name = 'supervisors' and prop0.value like '%$request.tag%' and prop1.name = 'status' and lower(prop1.value) = 'completed' and prop2.name = 'end' order by prop2.value desc" ) 72 72 ## execute query 73 73 #set( $itemFound = $xwiki.searchDocuments($query) ) 74 74 #set( $itemFoundNo = $itemFound.size() ) ... ... @@ -77,11 +77,10 @@ 77 77 ## talk list 78 78 ((( 79 79 #foreach( $item in $itemFound ) 80 -[[image:icon:book]] {{thesis linked="title"}}$item{{/thesis}}82 +[[image:icon:book]] {{thesis}}$item{{/thesis}} 81 81 #end 82 82 ))) 83 83 ## thesis list bottom 84 84 (% 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()"/}} ])))(%%) 85 85 #end 86 -{{/html}} 87 -{{/velocity}}{{pageDisplay sort="objectservice"/}} 88 +{{/velocity}}