Changes for page Supervisors
From version 74.5
edited by Andrea Omicini
on 08/11/2021 14:59
on 08/11/2021 14:59
Change comment:
There is no comment for this version
To version 80.1
edited by Andrea Omicini
on 09/03/2022 23:26
on 09/03/2022 23:26
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -#if($xcontext.language=="it")Nuvola dei tag delle tesi#{else}Thesis Tag Cloud#end - Content
-
... ... @@ -1,4 +1,6 @@ 1 -{{include reference='Theses.Environment'/}}{{include reference='Environment'/}}{{velocity}} 1 += {{velocity}}#if( $request.tag )(% style="color:$theme.textSecondaryColor" %)tag : (%%)$request.tag#else{{stringEngIta eng="Tag Cloud" ita= "Nuvola dei tag"/}}#end{{/velocity}} = 2 + 3 +{{include reference="Theses.Environment" excludeFirstHeading="true"/}}{{include reference="Environment" excludeFirstHeading="true"/}}{{velocity}} 2 2 ## thesis page with menus 3 3 #set( $thesisMenu = true ) 4 4 ## ... ... @@ -6,11 +6,15 @@ 6 6 ## 7 7 #if( !$request.tag ) 8 8 ## START NO TAG specified in the query 9 - #if( $userName && $xwiki.exists($userName) ) 10 - #set( $userDoc = $xwiki.getDocument($userName) ) 11 - #set( $userFirstName = $userDoc.display("first_name") ) 12 - #set( $userLastName = $userDoc.display("last_name") ) 13 - #set( $userSelected = true ) 11 + #if( $userName ) 12 + #if( $xwiki.exists($userName) ) 13 + #set( $userDoc = $xwiki.getDocument($userName) ) 14 + #set( $userFirstName = $userDoc.display("first_name") ) 15 + #set( $userLastName = $userDoc.display("last_name") ) 16 + #set( $userSelected = true ) 17 + #else 18 +{{warning}}"$userName" looks not like any known APICe user{{/warning}} 19 + #end 14 14 #end 15 15 #if( !$userSelected && $request.user ) 16 16 #if( $xwiki.exists("XWiki.$request.user") ) ... ... @@ -29,15 +29,15 @@ 29 29 #end 30 30 #end 31 31 #if( $userSelected ) 32 -> **Tag Cloud** /{{stringEngIta eng = "Theses" ita = "tesi" /}} / $userFirstName**$userLastName**38 +>{{stringEngIta eng = "Theses" ita = "Tesi" /}} / **$userFirstName $userLastName** 33 33 34 34 #set( $from = ", BaseObject as obj0, StringProperty as prop0, LargeStringProperty as prop1, LargeStringProperty as prop2, LargeStringProperty as prop3" ) 35 - #set( $where = "obj0.name = doc.fullName and obj0.className = 'Theses.ThesisClass' and obj0.name <> 'Theses.Thesis ClassTemplate' andobj0.name <> 'Theses.ThesisTemplate' and prop0.id.id = obj0.id and prop1.id.id = obj0.id and prop2.id.id = obj0.id and prop3.id.id = obj0.id and prop0.name = 'status' and lower(prop0.value) = 'completed' and prop1.name = 'supervisors' and prop2.name = 'cosupervisors' and prop3.name = 'contacts' and ( prop1.value like '%$userName%' or prop2.value like '%$userName%' or prop3.value like '%$userName%' )" )41 + #set( $where = "obj0.name = doc.fullName and obj0.className = 'Theses.ThesisClass' and obj0.name <> 'Theses.ThesisTemplate' and prop0.id.id = obj0.id and prop1.id.id = obj0.id and prop2.id.id = obj0.id and prop3.id.id = obj0.id and prop0.name = 'status' and lower(prop0.value) = 'completed' and prop1.name = 'supervisors' and prop2.name = 'cosupervisors' and prop3.name = 'contacts' and ( prop1.value like '%$userName%' or prop2.value like '%$userName%' or prop3.value like '%$userName%' )" ) 36 36 #else 37 -> **Tag Cloud** /{{stringEngIta eng="Theses" ita="tesi" /}}43 +>{{stringEngIta eng="Theses" ita="Tesi" /}} 38 38 39 39 #set( $from = ", BaseObject as obj0, StringProperty as prop0" ) 40 - #set( $where = "obj0.name = doc.fullName and obj0.className = 'Theses.ThesisClass' and obj0.name <> 'Theses.Thesis ClassTemplate' andobj0.name <> 'Theses.ThesisTemplate' and prop0.id.id = obj0.id and prop0.name = 'status' and lower(prop0.value) = 'completed'" )46 + #set( $where = "obj0.name = doc.fullName and obj0.className = 'Theses.ThesisClass' and obj0.name <> 'Theses.ThesisTemplate' and prop0.id.id = obj0.id and prop0.name = 'status' and lower(prop0.value) = 'completed'" ) 41 41 #end 42 42 ## 43 43 #set( $tagCount = $xwiki.tag.getTagCountForQuery($from, $where) ) ... ... @@ -79,23 +79,21 @@ 79 79 #set( $embodiedPage = false ) 80 80 #end 81 81 #if( $request.user ) 82 -> Tag “**$request.tag**” / {{stringEngIta eng = "Theses" ita = "tesi" /}} / $userFirstName **$userLastName** 83 - 84 84 #set( $from = ", BaseObject as obj0, DBStringListProperty as prop0 join prop0.list item, BaseObject as obj1, StringProperty as prop1, LargeStringProperty as prop2, LargeStringProperty as prop3, LargeStringProperty as prop4, DateProperty as prop5" ) 85 - #set ( $where = "obj0.className = 'XWiki.TagClass' and obj0.name = doc.fullName and obj0.id = prop0.id.id and prop0.id.name = 'tags' and lower(item) = lower('$request.tag') and obj1.name = doc.fullName and obj1.className = 'Theses.ThesisClass' and obj1.name <> 'Theses.Thesis ClassTemplate' andobj1.name <> 'Theses.ThesisTemplate' and prop1.id.id = obj1.id and prop2.id.id = obj1.id and prop3.id.id = obj1.id and prop4.id.id = obj1.id and prop5.id.id = obj1.id and prop1.name = 'status' and prop2.name = 'supervisors' and prop3.name = 'cosupervisors' and prop4.name = 'contacts' and prop5.name = 'endDate' and lower(prop1.value) = 'completed' and ( prop2.value like '%$request.user%' or prop3.value like '%$request.user%' or prop4.value like '%$request.user%' ) order by prop5.value desc" )89 + #set ( $where = "obj0.className = 'XWiki.TagClass' and obj0.name = doc.fullName and obj0.id = prop0.id.id and prop0.id.name = 'tags' and lower(item) = lower('$request.tag') and obj1.name = doc.fullName and obj1.className = 'Theses.ThesisClass' and obj1.name <> 'Theses.ThesisTemplate' and prop1.id.id = obj1.id and prop2.id.id = obj1.id and prop3.id.id = obj1.id and prop4.id.id = obj1.id and prop5.id.id = obj1.id and prop1.name = 'status' and prop2.name = 'supervisors' and prop3.name = 'cosupervisors' and prop4.name = 'contacts' and prop5.name = 'endDate' and lower(prop1.value) = 'completed' and ( prop2.value like '%$request.user%' or prop3.value like '%$request.user%' or prop4.value like '%$request.user%' ) order by prop5.value desc" ) 86 86 #else 87 ->Tag “**$request.tag**” / {{stringEngIta eng = "Theses" ita = "tesi" /}} 88 - 89 89 #set( $from = ", BaseObject as obj0, DBStringListProperty as prop0 join prop0.list item, BaseObject as obj1, DateProperty as prop1, StringProperty as prop2" ) 90 -#set( $where = "obj0.className = 'XWiki.TagClass' and obj0.name = doc.fullName and obj0.id = prop0.id.id and prop0.id.name = 'tags' and lower(item) = lower('$request.tag') and obj1.name = doc.fullName and obj1.className = 'Theses.ThesisClass' and obj1.name <> 'Theses.Thesis ClassTemplate' andobj1.name <> 'Theses.ThesisTemplate' and prop1.id.id = obj1.id and prop2.id.id = obj1.id and prop1.name = 'endDate' and prop2.name = 'status' and lower(prop2.value) = 'completed' order by prop1.value desc" )92 +#set( $where = "obj0.className = 'XWiki.TagClass' and obj0.name = doc.fullName and obj0.id = prop0.id.id and prop0.id.name = 'tags' and lower(item) = lower('$request.tag') and obj1.name = doc.fullName and obj1.className = 'Theses.ThesisClass' and obj1.name <> 'Theses.ThesisTemplate' and prop1.id.id = obj1.id and prop2.id.id = obj1.id and prop1.name = 'endDate' and prop2.name = 'status' and lower(prop2.value) = 'completed' order by prop1.value desc" ) 91 91 #end 92 92 #set( $sql = $from + " where " + $where ) 93 93 #set( $thesisFound = $xwiki.searchDocuments($sql) ) 96 + #set( $thesisFoundNo = $thesisFound.size() ) 97 +>$thesisFoundNo #if( $thesisFoundNo == 1 ){{stringEngIta eng = "Thesis" ita = "tesi" /}}#else{{stringEngIta eng = "Theses" ita = "tesi" /}}#end#if( $request.user ) / **$userFirstName $userLastName**#end 94 94 ## show tag 95 95 ((( 96 96 #foreach( $thesis in $thesisFound) 97 97 #set($thesisDoc = $xwiki.getDocument($thesis) ) 98 - *{{thesis}}$thesisDoc{{/thesis}}102 +[[image:icon:book]] {{thesis}}$thesisDoc{{/thesis}} 99 99 #end 100 100 ))) 101 101 #if( $embodiedPage )