Wiki source code of Available
author | version | line-number | content |
---|---|---|---|
62.2 | 1 | {{velocity}} | |
2 | {{html clean="false" wiki="true"}} | ||
86.20 | 3 | #template('apice_thesis_macros.vm') | |
63.63 | 4 | #template('apice_url.vm') | |
62.2 | 5 | #template('apice_macros.vm') | |
79.1 | 6 | #objectspace() | |
62.2 | 7 | #isuserspace() | |
86.13 | 8 | #if( $isUserSpace ) | |
81.2 | 9 | #setobjectsubspace("Theses","Personal") | |
62.2 | 10 | #userspace() | |
11 | ## user space variables | ||
83.2 | 12 | #set( $query = ", BaseObject as objPersonalThesis, LargeStringProperty as propUser | |
13 | where objPersonalThesis.name = doc.fullName and objPersonalThesis.className = '${objectSpace}.Class' and propUser.id.id = objPersonalThesis.id and propUser.name = 'user' and propUser.value = '$userName' " ) | ||
62.2 | 14 | #set( $personalThesisDocs = $xwiki.searchDocuments($query) ) | |
86.9 | 15 | #if( $personalThesisDocs.size() > 0 ) | |
16 | #set( $personalThesisDoc = $xwiki.getDocument($personalThesisDocs[0]) ) | ||
17 | #else | ||
18 | #stop | ||
19 | #end | ||
86.15 | 20 | #if( $personalThesisDoc.available && $personalThesisDoc.available != "" ) | |
21 | #set( $showAvailable = $personalThesisDoc.getValue('available') ) | ||
85.2 | 22 | #end | |
62.2 | 23 | #### USER SHOWCASE / START | |
63.59 | 24 | ## | |
25 | ## APICE / START | ||
86.15 | 26 | #if( $showAvailable == 1 ) | |
86.17 | 27 | ## query | |
28 | #set( $query = ", BaseObject as objThesis, DateProperty as propDate, StringProperty as propStatus, StringProperty as propSort, LargeStringProperty as propSupervisor, LargeStringProperty as propCosupervisor, LargeStringProperty as propContact | ||
29 | where objThesis.name = doc.fullName and objThesis.className = '${mainSpace}.Class' and objThesis.name <> '${objectPool}.Template' and propDate.id.id = objThesis.id and propDate.name = 'end' and propStatus.id.id = objThesis.id and propStatus.name = 'status' and propStatus.value = 'available' and propSupervisor.id.id = objThesis.id and propSupervisor.name = 'supervisors' and propCosupervisor.id.id = objThesis.id and propCosupervisor.name = 'cosupervisors' and propContact.id.id = objThesis.id and propContact.name = 'contacts' and ( propSupervisor.value like '%$userName%' or propCosupervisor.value like '%$userName%' or propContact.value like '%$userName%' ) order by propDate.value desc" ) | ||
30 | #set( $itemFound = $xwiki.searchDocuments($query) ) | ||
31 | #set( $itemFoundNo = $itemFound.size() ) | ||
86.18 | 32 | <div class="mainheader"> | |
33 | {{stringEngIta eng="available theses" ita="tesi disponibili"/}} | ||
86.21 | 34 | </div><div><ul> | |
86.18 | 35 | #foreach( $item in $itemFound ) | |
86.22 | 36 | <li>#thesislinked($item)</li> | |
86.18 | 37 | #end | |
86.21 | 38 | </ul></div> | |
86.16 | 39 | #end | |
62.2 | 40 | ## | |
41 | #### USER SHOWCASE / END | ||
42 | #else | ||
51.2 | 43 | #### GENERAL SHOWCASE / START | |
86.7 | 44 | <div></div> | |
51.2 | 45 | #### GENERAL SHOWCASE / END | |
61.1 | 46 | #end | |
62.2 | 47 | {{/html}} | |
48 | {{/velocity}}{{pageDisplay sort="objectservice"/}} |