Changes for page Supervisors

From version 76.1
edited by Andrea Omicini
on 04/12/2021 17:47
Change comment: There is no comment for this version
To version 69.3
edited by Andrea Omicini
on 08/11/2021 14:17
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,5 +1,5 @@
1 1  {{include reference='Theses.Environment'/}}{{include reference='Environment'/}}{{velocity}}
2 -## thesis page with menus
2 +## publication page with menus
3 3  #set( $thesisMenu = true )
4 4  ##
5 5  #set( $userSelected = false )
... ... @@ -6,15 +6,11 @@
6 6  ##
7 7  #if( !$request.tag )
8 8  ## START NO TAG specified in the query
9 - #if( $userName )
10 - #if( $xwiki.exists($userName) )
11 - #set( $userDoc = $xwiki.getDocument($userName) )
12 - #set( $userFirstName = $userDoc.display("first_name") )
13 - #set( $userLastName = $userDoc.display("last_name") )
14 - #set( $userSelected = true )
15 - #else
16 -{{warning}}"$userName" looks not like any known APICe user{{/warning}}
17 - #end
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 )
18 18   #end
19 19   #if( !$userSelected && $request.user )
20 20   #if( $xwiki.exists("XWiki.$request.user") )
... ... @@ -33,15 +33,15 @@
33 33   #end
34 34   #end
35 35   #if( $userSelected )
36 -> **Tag Cloud** / {{stringEngIta eng = "Theses" ita = "tesi" /}} / $userFirstName **$userLastName**
32 +> **Tag Cloud** / {{stringEngIta eng = "Theses" ita = "Tesi" /}} / $userFirstName $userLastName
37 37  
38 38   #set( $from = ", BaseObject as obj0, StringProperty as prop0, LargeStringProperty as prop1, LargeStringProperty as prop2, LargeStringProperty as prop3" )
39 - #set( $where = "obj0.name = doc.fullName and obj0.className = 'Theses.ThesisClass' and obj0.name <> 'Theses.ThesisClassTemplate' 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%' )" )
35 + #set( $where = "obj0.name = doc.fullName and obj0.className = 'Theses.ThesisClass' and obj0.name <> 'Theses.ThesisClassTemplate' 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 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%' )" )
40 40   #else
41 ->**Tag Cloud** / {{stringEngIta eng="Theses" ita="tesi" /}}
37 +>**Tag Cloud** / {{stringEngIta eng="Theses" ita="Tesi" /}}
42 42  
43 43   #set( $from = ", BaseObject as obj0, StringProperty as prop0" )
44 - #set( $where = "obj0.name = doc.fullName and obj0.className = 'Theses.ThesisClass' and obj0.name <> 'Theses.ThesisClassTemplate' and obj0.name <> 'Theses.ThesisTemplate' and prop0.id.id = obj0.id and prop0.name = 'status' and lower(prop0.value) = 'completed'" )
40 + #set( $where = "obj0.name = doc.fullName and obj0.className = 'Theses.ThesisClass' and obj0.name <> 'Theses.ThesisClassTemplate' and obj0.name <> 'Theses.ThesisTemplate' and prop0.id.id = obj0.id and and prop0.name = 'status' and prop0.value = 'Completed'" )
45 45   #end
46 46   ##
47 47   #set( $tagCount = $xwiki.tag.getTagCountForQuery($from, $where) )
... ... @@ -76,41 +76,21 @@
76 76  ## END NO TAG specified in the query
77 77  #else
78 78  ## START ONE TAG specified in the query
79 -## embodied page?
80 - #if( $userName && $userSpace )
81 - #set( $embodiedPage = true )
82 - #else
83 - #set( $embodiedPage = false )
84 - #end
85 - #if( $request.user )
86 -> Tag “**$request.tag**” / {{stringEngIta eng = "Theses" ita = "tesi" /}} / $userFirstName **$userLastName**
75 +>Tag “**$request.tag**” / {{stringEngIta eng = "Theses" ita = "Tesi" /}}
87 87  
88 - #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" )
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.ThesisClassTemplate' 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" )
90 - #else
91 ->Tag “**$request.tag**” / {{stringEngIta eng = "Theses" ita = "tesi" /}}
92 -
93 - #set( $from = ", BaseObject as obj0, DBStringListProperty as prop0 join prop0.list item, BaseObject as obj1, DateProperty as prop1, StringProperty as prop2" )
94 -#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.ThesisClassTemplate' 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" )
95 - #end
96 - #set( $sql = $from + " where " + $where )
97 - #set( $thesisFound = $xwiki.searchDocuments($sql) )
77 +#set( $from = ", BaseObject as obj0, DBStringListProperty as prop0 join prop0.list item, BaseObject as obj1, DateProperty as prop1, StringProperty as prop2" )
78 +#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.ThesisClassTemplate' 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) <> 'out-of-date' order by prop1.value desc" )
79 +#set( $sql = $from + " where " + $where )
80 +#set( $thesisFound = $xwiki.searchDocuments($sql) )
98 98  ## show tag
99 99  (((
100 100  #foreach( $thesis in $thesisFound)
101 101   #set($thesisDoc = $xwiki.getDocument($thesis) )
102 -[[image:icon:book]] {{thesis}}$thesisDoc{{/thesis}}
85 +* {{thesis}}$thesisDoc{{/thesis}}
103 103  #end
104 104  )))
105 - #if( $embodiedPage )
106 -(% style="font-style:oblique;font-size:smaller;text-align:right;color:$theme.textSecondaryColor" %)((([ [[{{stringEngIta eng="tag cloud" ita="nuvola tag" /}}>>$doc.name]] / {{stringEngIta eng = "theses" ita = "tesi"/}} ])))(%%)
107 - #else
108 - #if( $request.user )
109 -(% style="font-style:oblique;font-size:smaller;text-align:right;color:$theme.textSecondaryColor" %)((([ [[{{stringEngIta eng="tag cloud" ita="nuvola tag" /}}>>$doc.name||queryString="user=$request.user"]] / $userFirstName $userLastName / {{stringEngIta eng = "theses" ita = "tesi"/}} ])))(%%)
110 - #else
111 -(% style="font-style:oblique;font-size:smaller;text-align:right;color:$theme.textSecondaryColor" %)((([ [[{{stringEngIta eng="tag cloud" ita="nuvola tag" /}}>>$doc.name||]] / {{stringEngIta eng = "theses" ita = "tesi"/}} ])))(%%)
112 - #end
113 - #end
114 114  
89 +(% style='font-style:oblique;font-size:smaller;text-align:right;color:gray' %)((([ [[tag cloud>>Tags]] / {{stringEngIta eng = "theses" ita = "tesi"/}} ])))(%%)
90 +
115 115  #end
116 116  {{/velocity}}