Changes for page Supervisors
From version 62.1
edited by Andrea Omicini
on 01/09/2021 23:26
on 01/09/2021 23:26
Change comment:
There is no comment for this version
To version 39.1
edited by Andrea Omicini
on 01/09/2021 23:11
on 01/09/2021 23:11
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,39 +1,37 @@ 1 1 {{include reference = "MacroSheet" /}}{{velocity}} 2 -#if( !$request.tag ) 3 -## no tag specified in the query 4 ->**Tag Cloud** / {{stringEngIta eng="Theses" ita="Tesi" /}} 2 +#if(!$request.tag) ## no tag specified in the query 5 5 6 - #set( $from=, BaseObjectasobj0")7 -#set ($where = "obj0.name=doc.fullNameand obj0.className= 'Theses.ThesisClass' and obj0.name<> 'Theses.ThesisClassTemplate'andobj0.name <> 'Theses.ThesisTemplate'"8 -#set($ tagCount=$xwiki.tag.getTagCountForQuery($from, $where))9 - (%style='text-align: center'%)(((#foreach($thesisTagin $tagCount.keySet())10 - #set($thesisCount$tagCount.get($thesisTag))11 - if($thesisCount> 20 ) #set ($tagSize= "140%")12 - # elseif( $thesisCount>10 ) #setSize= "130%")13 - # elseif( $thesisCount >5) #set ( $tagSize = "120%" )14 - #elseif( $thesisCount > 3) #set ( $tagSize = "110%" )15 - #elseif( $thesisCount ==3) #set ( $tagSize = "105%" )16 - #elseif( $thesisCount ==2) #set ( $tagSize = "100%" )17 - #else#set ($tagSize = " 90%" )18 - #en d19 - # set( $urlEscapedTag=$escapetool.url($thesisTag))20 - # set( $htmlEscapedTag= $escapetool.xml($thesisTag) )21 - (%style='font-size:$tagSize'%)[[$thesisTag>>Theses.Tags||queryString="tag=$urlEscapedTag"]] (%%)#end)))22 -#else 23 - ##onespecifiedinthe24 - >Tag “**$request.tag**” / {{stringEngIta eng = "Theses" ita = "Tesi" /}}4 +> **Tag Cloud** / {{stringEngIta eng="Theses" ita="Tesi" /}} 5 +#set ($from = ", BaseObject as obj0") 6 +#set ($where = "obj0.name=doc.fullName and obj0.className='Theses.ThesisClass' and obj0.name<>'Theses.ThesisClassTemplate' and obj0.name<>'Theses.ThesisTemplate'") 7 +#set ($tagCount = $xwiki.tag.getTagCountForQuery($from, $where)) 8 +(% style='text-align: center' %)((( 9 +#foreach ($thesisTag in $tagCount.keySet()) 10 + #set ( $thesisCount = $tagCount.get($thesisTag) ) 11 + #if ( $thesisCount > 20 ) #set ( $tagSize = "140%" ) 12 + #elseif ( $thesisCount > 10 ) #set ( $tagSize = "130%" ) 13 + #elseif ( $thesisCount > 5 ) #set ( $tagSize = "120%" ) 14 + #elseif ( $thesisCount > 3 ) #set ( $tagSize = "110%" ) 15 + #elseif ( $thesisCount == 3 ) #set ( $tagSize = "105%" ) 16 + #elseif ( $thesisCount == 2 ) #set ( $tagSize = "100%" ) 17 + #else #set ($tagSize = "90%" ) 18 + #end 19 + #set($urlEscapedTag = $escapetool.url($thesisTag)) 20 + #set($htmlEscapedTag = $escapetool.xml($thesisTag)) 21 + (% style='font-size:$tagSize' %) [[$thesisTag>>Theses.Tags||queryString="tag=$urlEscapedTag"]] (%%)#end 22 +))) 25 25 26 -#set( $from = ", BaseObject as obj0, DBStringListProperty as prop0 join prop0.list item, BaseObject as obj1, DateProperty as prop1" ) 27 -#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 prop1.name = 'endDate' order by prop1.value desc" ) 24 +#else ## one tag specified in the query 25 + 26 +#set ( $from = ", BaseObject as obj0, DBStringListProperty as prop0 join prop0.list item, BaseObject as obj1, DateProperty as prop1" ) 27 +#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 prop1.name = 'endDate' order by prop1.value desc" ) 28 28 #set ( $sql = $from + " where " + $where ) 29 -#set($thesisFound = $xwiki.searchDocuments($sql)) 30 -## show tag 31 -((( 29 +#set($thesisFound = $xwiki.searchDocuments($sql)) // // 30 +> Tag “**$request.tag**” / {{stringEngIta eng = "Theses" ita = "Tesi" /}} // // 32 32 #foreach( $thesis in $thesisFound)#set($thesisDoc = $xwiki.getDocument($thesis) ) 33 33 * #thesisTitleLink($thesis)#if( $thesisDoc.getValue("studentUserName") != "" || $thesisDoc.getValue("studentName") != "" || ( $thesisDoc.getValue("studentFirstName") != "" && $thesisDoc.getValue("studentLastName") != "" ) ) //(#thesisAuthorLink($thesis)#if( $thesisDoc.display("endDate") != "" ), #thesisYear($thesis)#end)//#end 34 34 35 35 #end 36 -))) 37 37 38 38 (% style='font-style:oblique;font-size:smaller;text-align:right;color:gray' %)((([ [[tag cloud / {{stringEngIta eng = "theses" ita = "tesi"/}}>>Tags]] ])))(%%) 39 39