Changes for page Per Status

From version 96.4
edited by Andrea Omicini
on 22/06/2023 20:14
Change comment: There is no comment for this version
To version 97.1
edited by Andrea Omicini
on 25/06/2023 13:49
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,18 +1,9 @@
1 1  {{velocity}}
2 -{{html wiki="true" clean="false"}}
3 -## GET PARAMETERS / START
4 -## inline display
5 -#set( $inlinePar = $request.inline.trim().toLowerCase() )
2 +{{html clean="false" wiki="true"}}
3 +#template('apice_boolean.vm')
4 +## BIBTEX / START
6 6  ## show BibTeX
7 7  #set( $bibtexPar = $request.bibtex.trim().toLowerCase() )
8 -## who
9 -#set( $userNamePar = $request.user.trim() )
10 -#set( $firstNamePar = $request.name.trim() )
11 -#set( $lastNamePar = $request.surname.trim() )
12 -## GET PARAMETERS / END
13 -##
14 -#template('apice_boolean.vm')
15 -## HANDLE BIBTEX / START
16 16  ## default: false
17 17  #set( $showBibtex = false )
18 18  ## check $bibtexPar
... ... @@ -19,9 +19,11 @@
19 19  #if( $bibtexPar != "" && $trueStringList.contains($bibtexPar.toLowerCase()) )
20 20   #set( $showBibtex = true )
21 21  #end
22 -## HANDLE BIBTEX / END
13 +## BIBTEX / END
23 23  ##
24 -## HANDLE INLINE / START
15 +## INLINE / START
16 +## inline display
17 +#set( $inlinePar = $request.inline.trim().toLowerCase() )
25 25  ## default: true
26 26  #set( $showInline = true )
27 27  ## check $inlinePar
... ... @@ -28,10 +28,11 @@
28 28  #if( $inlinePar != "" && $falseStringList.contains($inlinePar) )
29 29   #set( $showInline = false )
30 30  #end
31 -## HANDLE INLINE / END
32 -##
33 -## HANDLE STATUS / START
24 +## INLINE / END
34 34  #template('apice_publications.vm')
26 +#template('apice_user_param.vm')
27 +##
28 +## STATUS / START
35 35  ## $oneStatus false gets a list of statuses, true just one
36 36  #set( $oneStatus = false )
37 37  #set( $showRejected = false )
... ... @@ -57,60 +57,9 @@
57 57   #set( $statusList = [$statusPar] )
58 58  #end
59 59  ##
60 -## HANDLE STATUS / END
61 -## HANDLE WHO / START
62 -#template('apice_macros.vm')
63 -#isuserspace()
64 -#if( $isUserSpace )
65 - #userspace()
66 -## from a personal page
67 - #set( $apiceUser = true )
68 - #set( $oneUser = true )
69 -#elseif( $userNamePar )
70 -## from the URL, "user=$userNamePar" parameter
71 - #if( $userNamePar.contains('XWiki.') )
72 - #set( $userName = "$userNamePar" )
73 - #else
74 - #set( $userName = "XWiki.$userNamePar" )
75 - #end
76 - #if( !$xwiki.exists( $userName ) )
77 - #if( $services.localization.currentLocale == 'it' )
78 -{{warning}}L'utente “$userNamePar” non esiste{{/warning}}
79 - #else
80 -{{warning}}User “$userNamePar” does not exist{{/warning}}
81 - #end
82 - #stop
83 - #end
84 - #set( $apiceUser = true )
85 - #set( $oneUser = true)
86 - #set( $userdoc = $xwiki.getDocument($userName) )
87 - #set( $userFirstName = $userdoc.display("first_name") )
88 - #set( $userLastName = $userdoc.display("last_name") )
89 -#elseif( $firstNamePar && $lastNamePar )
90 -## from the URL, "name=Firstname&surname=Lastname" parameter
91 - #set( $apiceUser = false )
92 - #set( $oneUser = true )
93 - #set( $userFirstName = $firstNamePar )
94 - #set( $userLastName = $lastNamePar )
95 -#else
96 - #set( $apiceUser = false )
97 - #set( $oneUser = false )
98 - #set( $userFirstName = "" )
99 - #set( $userLastName = "" )
100 -#end
101 -#if( $oneUser )
102 - #if( $apiceUser )
103 - #set( $userString = "%$userName%" )
104 - #else
105 - #set( $userString = "%$userFirstName $userLastName%" )
106 - #end
107 -#else
108 - #set( $userString = "%%" )
109 -#end
110 -## HANDLE WHO / END
54 +## STATUS / END
111 111  ##
112 -### query to structures
113 -## map & counter initialisation
56 +## DATA STRUCTURES / START
114 114  #set( $itemMap = {} )
115 115  #set( $itemNo = 0 )
116 116  ## cycle over statuses
... ... @@ -127,8 +127,9 @@
127 127   #end
128 128   #end
129 129  #end
73 +## DATA STRUCTURES / END
130 130  ##
131 -## output results
75 +## DISPLAY / START
132 132  ## page subtitle
133 133  <div style="display: flex">
134 134   <div class="mainheader">
... ... @@ -236,5 +236,6 @@
236 236  </div>
237 237  ## status bottom / end
238 238  #end
183 +## DISPLAY / END
239 239  {{/html}}
240 240  {{/velocity}}{{pageDisplay sort="objectservice"/}}