|
|
1 |
{{velocity}} |
|
|
2 |
{{html clean="false" wiki="true"}} |
|
|
3 |
#template('apice_thesis_macros.vm') |
|
|
4 |
#template('apice_url.vm') |
|
|
5 |
#template('apice_macros.vm') |
|
|
6 |
#objectspace() |
|
|
7 |
#isuserspace() |
|
|
8 |
#if( $isUserSpace ) |
|
|
9 |
#setobjectsubspace("Theses","Personal") |
|
|
10 |
#userspace() |
|
|
11 |
## user space variables |
|
|
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' " ) |
|
|
14 |
#set( $personalThesisDocs = $xwiki.searchDocuments($query) ) |
|
|
15 |
#if( $personalThesisDocs.size() > 0 ) |
|
|
16 |
#set( $personalThesisDoc = $xwiki.getDocument($personalThesisDocs[0]) ) |
|
|
17 |
#else |
|
|
18 |
#stop |
|
|
19 |
#end |
|
|
20 |
#if( $personalThesisDoc.available && $personalThesisDoc.available != "" ) |
|
|
21 |
#set( $showAvailable = $personalThesisDoc.getValue('available') ) |
|
|
22 |
#end |
|
|
23 |
#### USER SHOWCASE / START |
|
|
24 |
## |
|
|
25 |
## APICE / START |
|
|
26 |
#if( $showAvailable == 1 ) |
|
|
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() ) |
|
|
32 |
<div class="mainheader"> |
|
|
33 |
{{stringEngIta eng="available theses" ita="tesi disponibili"/}} |
|
|
34 |
</div><div><ul> |
|
|
35 |
#foreach( $item in $itemFound ) |
|
|
36 |
<li>#thesislinked($item)</li> |
|
|
37 |
#end |
|
|
38 |
</ul></div> |
|
|
39 |
#end |
|
|
40 |
## |
|
|
41 |
#### USER SHOWCASE / END |
|
|
42 |
#else |
|
|
43 |
#### GENERAL SHOWCASE / START |
|
|
44 |
<div></div> |
|
|
45 |
#### GENERAL SHOWCASE / END |
|
|
46 |
#end |
|
|
47 |
{{/html}} |
|
|
48 |
{{/velocity}}{{pageDisplay sort="objectservice"/}} |