Modifiche per il documento Relatori
Dalla versione 94.1
modificato da Andrea Omicini
il 29/01/2023 21:43
il 29/01/2023 21:43
Cambia il commento:
Nessun commento per questa versione
Alla versione 101.1
modificato da Andrea Omicini
il 30/06/2023 00:51
il 30/06/2023 00:51
Cambia il commento:
Nessun commento per questa versione
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Titolo
-
... ... @@ -1,0 +1,1 @@ 1 +#if($request.tag)$services.localization.render('supervisor').toLowerCase() : $xwiki.getUserName($request.tag,false)#else$services.localization.render('supervisors')#end - Lingua predefinita
-
... ... @@ -1,1 +1,0 @@ 1 -en - Content
-
... ... @@ -1,20 +1,13 @@ 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 ) 1 +{{velocity}} 2 +{{html clean="false" wiki="true"}} 3 +#template('apice_theses.vm') 6 6 ## 7 7 #### tag parameter possibly brings name to be used as tag 8 -## no tag parameter --> just the cloud 9 -## yes tag parameter --> the item list 10 -## 11 -## NO TAG PARAMETER 12 12 #if( !$request.tag ) 13 -## subtitle 14 ->{{stringEngIta eng="$objectEngPlural" ita= "$objectItaPlural"/}}#if( $oneUser ) / $userFirstName $userLastName#{end} 7 +## no tag parameter --> just the cloud 15 15 ## set query 16 - #set( $query = ", BaseObject as obj, StringProperty as prop 1, DateProperty as prop217 - where obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectSpace}.${objectTemplate}' and prop 1.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" )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" ) 18 18 ## execute query 19 19 #set( $itemFound = $xwiki.searchDocuments($query) ) 20 20 #set( $itemFoundNo = $itemFound.size() ) ... ... @@ -24,22 +24,20 @@ 24 24 #foreach( $item in $itemFound ) 25 25 ## set $doc & $obj 26 26 #set( $itemDoc = $xwiki.getDocument($item) ) 27 - #if( $itemDoc.getValue("supervisors") != "" ) 28 - #set( $nameList = $itemDoc.getValue("supervisors").split(",") ) 20 + #set( $nameList = $itemDoc.getValue("supervisors").split(",") ) 29 29 ## set user-item map 30 - 22 + #foreach( $name in $nameList ) 31 31 #### build name lists 32 - 24 + #if( $nameMap.keySet().contains($name) ) 33 33 ## nameMap already contains current name 34 34 ## add $item to nameMap for current name 35 - 36 - 27 + #set( $discard = $nameMap[$name].add($item) ) 28 + #elseif( !$oneUser || $oneUser && $name != $userName ) 37 37 ## nameMap does not contain name or selected user 38 38 ## add name / selected user to nameMap 39 - 31 + #set( $nameMap[$name] = [] ) 40 40 ## adding $item to nameMap for $name 41 - #set( $discard = $nameMap[$name].add($item) ) 42 - #end 33 + #set( $discard = $nameMap[$name].add($item) ) 43 43 #end 44 44 #end 45 45 #### END / feed name list from each item ... ... @@ -47,8 +47,11 @@ 47 47 ## END EACH ITEM IN MAP 48 48 ## final values: $nameMap 49 49 #set( $nameFoundNo = $nameMap.keySet().size() ) 50 -## tag cloud 51 -(% style='text-align:center' %)((( 41 +### CLOUD PAGE / START 42 +<div class="mainheader"> 43 + $services.localization.render('theses').toLowerCase() 44 +</div> 45 +<div style='text-align: center'> 52 52 #foreach( $name in $nameMap.keySet() ) 53 53 #set( $nameItemNo = $nameMap[$name].size() ) 54 54 #if( $nameItemNo > 40 )#set( $tagSize = "140%" ) ... ... @@ -61,29 +61,38 @@ 61 61 #elseif( $nameItemNo == 2 )#set( $tagSize = "100%" ) 62 62 #else#set( $tagSize = "90%" ) 63 63 #end 64 -[[(% 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 65 -))) 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> 66 66 ## cloud bottom 67 - (%style='font-style:oblique;font-size:smaller;text-align:right;color:$theme.textSecondaryColor' %)(((68 -[ $nameFoundNo #if( $nameFoundNo == 1 ) {{stringEngItag="supervisor" ita="supervisore"/}}#else{{stringEngItag="supervisors" ita="supervisori"/}}#end / $itemFoundNo #if( $itemFoundNo == 1 ){{stringEngItaeng="$objectEngSingular.toLowerCase()" ita="$objectItaSingular.toLowerCase()"/}}#else{{stringEngItaeng = "$objectEngPlural.toLowerCase()" ita="$objectItaPlural.toLowerCase()"/}}#end ]69 - )))70 -### #YESTAGPARAMETER62 +<div class="menuqualifier" style="text-align: right"> 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 +### CLOUD PAGE / END 71 71 #else 72 -## set query 73 - #set( $query = ", BaseObject as obj, LargeStringProperty as prop0, StringProperty as prop1, DateProperty as prop2 74 - 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" ) 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" ) 75 75 ## execute query 76 76 #set( $itemFound = $xwiki.searchDocuments($query) ) 77 77 #set( $itemFoundNo = $itemFound.size() ) 78 78 ## subtitle 79 ->$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 80 -## talk list 81 -((( 76 +<div class="mainheader"> 77 +$itemNo #if( $itemNo > 1)$services.localization.render('theses').toLowerCase()#{else}$services.localization.render('thesis').toLowerCase()#{end} 78 +</div> 79 +## thesis list 80 + #template('apice_thesis_macros.vm') 82 82 #foreach( $item in $itemFound ) 83 -[[image:icon:book]] {{thesis}}$item{{/thesis}} 82 +<div> 83 +[[image:icon:book]] #thesislinked($item) 84 +</div> 84 84 #end 85 -))) 86 86 ## thesis list bottom 87 -(% 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()"/}} ])))(%%) 87 +<div class="menuqualifier" style="text-align: right"> 88 +[ [[{{stringEngIta eng="supervisor cloud" ita="nuvola relatori" /}}>>$doc.name]] / $services.localization.render('theses').toLowerCase() ] 89 +</div> 88 88 #end 89 -{{/velocity}} 91 +{{/html}} 92 +{{/velocity}}{{pageDisplay sort="objectservice"/}}