1
- <?php
1
+ <?php
2
2
/*=========================================================================
3
3
MIDAS Server
4
4
Copyright (c) Kitware SAS. 20 rue de la Villette. All rights reserved.
@@ -30,39 +30,39 @@ if($this->preview) // module visualize
30
30
echo "<a href=' {$ this ->webroot }/download/?items= {$ this ->itemDao ->getKey ()}'><img style='float:left;margin-right:2px;' alt='' src=' {$ this ->coreWebroot }/public/images/icons/download.png'/> " ;
31
31
if ($ this ->itemIsLink )
32
32
{
33
- echo $ this ->t ('View as weblink ' );
33
+ echo $ this ->t ('View as weblink ' );
34
34
}
35
35
else
36
36
{
37
- echo $ this ->t ('Download ' );
37
+ echo $ this ->t ('Download ' );
38
38
}
39
39
echo '</a> ' ;
40
40
?>
41
41
</div>
42
-
42
+
43
43
<?php
44
44
if ($ this ->backUploaded )
45
45
{
46
46
echo '<div style="float:right;margin-right:2px;" class="genericBigButton "> ' ;
47
47
echo "<a href=' {$ this ->webroot }/browse/uploaded'><img style='float:left;margin-right:2px;' alt='' src=' {$ this ->coreWebroot }/public/images/icons/back.png'/> " ;
48
- echo $ this ->t ('Back ' );
48
+ echo $ this ->t ('Back ' );
49
49
echo "</a> " ;
50
50
echo '</div> ' ;
51
51
}
52
52
else if ($ this ->currentFolder )
53
53
{
54
54
echo '<div style="float:right;margin-right:2px;" class="genericBigButton "> ' ;
55
55
echo "<a href=' {$ this ->webroot }/folder/ {$ this ->currentFolder ->getKey ()}'><img style='float:left;margin-right:2px;' alt='' src=' {$ this ->coreWebroot }/public/images/icons/back.png'/> " ;
56
- echo $ this ->t ('Back ' );
56
+ echo $ this ->t ('Back ' );
57
57
echo "</a> " ;
58
58
echo '</div> ' ;
59
59
}
60
60
?>
61
-
61
+
62
62
<br/>
63
63
<div class="itemStats">
64
- <?php echo $ this ->itemDao ->getView ()?> <?php echo $ this ->t ('views ' ); ?> ,
65
- <?php echo $ this ->itemDao ->getDownload ()?> <?php echo $ this ->t ('downloads ' );?> </div>
64
+ <?php echo $ this ->itemDao ->getView ()?> <?php echo $ this ->t ('views ' ); ?> ,
65
+ <?php echo $ this ->itemDao ->getDownload ()?> <?php echo $ this ->t ('downloads ' );?> </div>
66
66
</div>
67
67
<div style='width:400px;' class="genericInfo">
68
68
<div class="genericThumbnail">
@@ -74,7 +74,7 @@ if($this->preview) // module visualize
74
74
<div class="genericSubtitle" style="color:grey;"><?php echo $ this ->itemSize ;?> </div>
75
75
76
76
</div>
77
-
77
+
78
78
<table style='display:block;' class="midasTree">
79
79
<thead>
80
80
<tr>
@@ -94,19 +94,19 @@ if($this->preview) // module visualize
94
94
echo " <td> {$ revision ->getChanges ()}</td> " ;
95
95
echo "</tr> " ;
96
96
$ node ++;
97
- }
98
- ?>
97
+ }
98
+ ?>
99
99
</tbody>
100
100
</table>
101
-
101
+
102
102
<h4 style="margin-bottom: 5px;"><?php echo $ this ->t ('Latest revision metadata ' )?> :</h4>
103
103
104
104
<?php if (count ($ this ->metadatavalues ) == 0 )
105
105
{
106
- echo "No metadata for this revision. " ;
106
+ echo "No metadata for this revision. " ;
107
107
}
108
- else
109
- {
108
+ else
109
+ {
110
110
?>
111
111
<table style='display:block;' id="metadataTable" class="midasTree">
112
112
<thead>
@@ -133,18 +133,18 @@ if($this->preview) // module visualize
133
133
}
134
134
echo " </td> " ;
135
135
echo "</tr> " ;
136
- }
137
- ?>
136
+ }
137
+ ?>
138
138
</tbody>
139
139
</table>
140
140
<?php } ?>
141
141
<br/>
142
142
<br/>
143
-
143
+
144
144
<a onclick="$('#revisionContent').show();$(this).remove();"><?php echo $ this ->t ('Show Content ' )?> </a>
145
-
145
+
146
146
<div id="revisionContent">
147
-
147
+
148
148
<h4 style="margin-top: 0px;margin-bottom: 5px;"><?php echo $ this ->t ('Latest revision content ' )?> :</h4>
149
149
150
150
<table style='display:block;' id="browseTable" class="midasTree">
@@ -165,92 +165,89 @@ if($this->preview) // module visualize
165
165
echo " <td> {$ this ->Utility ->formatSize ($ bitstream ->getSizebytes ())} </td> " ;
166
166
echo " <td> {$ bitstream ->getMimetype ()}</td> " ;
167
167
echo "</tr> " ;
168
- }
169
- ?>
168
+ }
169
+ ?>
170
170
</tbody>
171
171
</table>
172
172
</div>
173
-
173
+
174
174
</div>
175
175
<div class="viewSideBar">
176
- <?php
177
- if ($ this ->preview || $ this ->isModerator ||$ this ->isAdmin )
176
+ <?php
177
+ $ modules = Zend_Registry::get ('modulesEnable ' );
178
+ $ statisticsEnabled = in_array ('statistics ' , $ modules );
179
+ if ($ this ->preview || $ this ->isModerator ||$ this ->isAdmin || $ statisticsEnabled )
178
180
{?>
179
181
<div class="sideElementFirst viewAction">
180
182
181
183
<h1>Actions</h1>
182
184
<ul>
183
- <?php
185
+ <?php
184
186
if ($ this ->preview )
185
187
{
186
- echo
188
+ echo
187
189
"<li>
188
190
<a id='itemPreviewLink'><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/view.png'/> {$ this ->t ('Preview ' )}</a>
189
- </li>
191
+ </li>
190
192
" ;
191
193
}
192
194
if ($ this ->isModerator )
193
195
{
194
- echo
196
+ echo
195
197
"<li>
196
198
<a href='javascript:;' class='moveCopyLink' ><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/copy.png'/> {$ this ->t ('Copy ' )}</a>
197
- </li>
199
+ </li>
198
200
<li>
199
201
<a href='javascript:;' class='editItemLink' ><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/edit.png'/> {$ this ->t ('Edit ' )}</a>
200
- </li>
202
+ </li>
201
203
<li>
202
204
<a href='javascript:;' class='addMetadataLink' ><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/metadata.png'/> {$ this ->t ('Add Metadata ' )}</a>
203
- </li>
205
+ </li>
204
206
<li>
205
207
<a href='javascript:;' type='item' element=' {$ this ->itemDao ->getKey ()}' class='sharingLink' ><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/share.png'/> {$ this ->t ('Share ' )}</a>
206
- </li>
208
+ </li>
207
209
<li>
208
210
<a href='javascript:;' type='item' element=' {$ this ->itemDao ->getKey ()}' class='uploadRevisionLink' ><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/upload.png'/> {$ this ->t ('Upload new revision ' )}</a>
209
- </li>
211
+ </li>
210
212
" ;
211
213
}
212
214
if ($ this ->isAdmin )
213
215
{
214
- $ modules = Zend_Registry::get ('modulesEnable ' );
215
- if (in_array ('statistics ' , $ modules ))
216
- {
217
- echo
218
- "<li>
219
- <a href=' " .$ this ->webroot ."/statistics/item?id= " .$ this ->itemDao ->getKey ()."'><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/metadata.png'/> {$ this ->t ('Statistics ' )}</a>
220
- </li>
221
- " ;
222
- }
223
- echo
216
+ echo
224
217
"
225
218
<li>
226
219
<a href='javascript:;' id='itemDeleteLink'><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/close.png'/> {$ this ->t ('Delete ' )}</a>
227
- </li>
228
- " ;
220
+ </li>
221
+ " ;
229
222
}
223
+ echo
224
+ "<li>
225
+ <a href=' " .$ this ->webroot ."/statistics/item?id= " .$ this ->itemDao ->getKey ()."'><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/metadata.png'/> {$ this ->t ('Statistics ' )}</a>
226
+ </li> " ;
230
227
?>
231
228
</ul>
232
229
</div>
233
230
<?php
234
231
}?>
235
232
<div class="<?php echo (!$ this ->preview && !$ this ->isModerator && !$ this ->isAdmin )?'sideElementFirst ' :'' ; ?> sideElement<?php if (count ($ this ->sameLocation ) > 1 ) echo "Last " ?> viewInfo">
236
- <h1>Info</h1>
237
- <table>
233
+ <h1>Info</h1>
234
+ <table>
238
235
<tbody>
239
- <tr>
236
+ <tr>
240
237
<td><?php echo $ this ->t ('Created ' )?> </td>
241
- <td><?php echo $ this ->itemDao ->creation ?> </td>
238
+ <td><?php echo $ this ->itemDao ->creation ?> </td>
242
239
</tr>
243
- <tr>
244
- <td><?php echo $ this ->t ('Uploaded by ' );?> </td>
240
+ <tr>
241
+ <td><?php echo $ this ->t ('Uploaded by ' );?> </td>
245
242
<td><?php echo $ this ->linkuser ($ this ->itemDao ->lastrevision ->getUser ())?> </td>
246
243
</tr>
247
- <tr>
248
- <td>Revision</td>
244
+ <tr>
245
+ <td>Revision</td>
249
246
<td><?php echo $ this ->itemDao ->lastrevision ->getRevision ()?> </td>
250
247
</tr>
251
- <tr>
248
+ <tr>
252
249
<td><?php echo $ this ->t ('Files ' );?> </td>
253
- <td><?php echo count ($ this ->itemDao ->lastrevision ->getBitstreams ())?> </td>
250
+ <td><?php echo count ($ this ->itemDao ->lastrevision ->getBitstreams ())?> </td>
254
251
</tr>
255
252
</tbody>
256
253
</table>
@@ -269,7 +266,7 @@ if($this->preview) // module visualize
269
266
if (count ($ this ->sameLocation ) > 1 )
270
267
{?>
271
268
<div class='sideElementLast viewSameLocation'>
272
- <h1><?php echo $ this ->t ('In the same location ' )?> </h1>
269
+ <h1><?php echo $ this ->t ('In the same location ' )?> </h1>
273
270
<ul>
274
271
<?php
275
272
foreach ($ this ->sameLocation as $ item )
0 commit comments