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,12 +165,12 @@ 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
176
<?php
@@ -180,77 +180,86 @@ if($this->preview) // module visualize
180
180
181
181
<h1>Actions</h1>
182
182
<ul>
183
- <?php
183
+ <?php
184
184
if ($ this ->preview )
185
185
{
186
- echo
186
+ echo
187
187
"<li>
188
188
<a id='itemPreviewLink'><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/view.png'/> {$ this ->t ('Preview ' )}</a>
189
- </li>
189
+ </li>
190
190
" ;
191
191
}
192
192
if ($ this ->isModerator )
193
193
{
194
- echo
194
+ echo
195
195
"<li>
196
196
<a href='javascript:;' class='moveCopyLink' ><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/copy.png'/> {$ this ->t ('Copy ' )}</a>
197
- </li>
197
+ </li>
198
198
<li>
199
199
<a href='javascript:;' class='editItemLink' ><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/edit.png'/> {$ this ->t ('Edit ' )}</a>
200
- </li>
200
+ </li>
201
201
<li>
202
202
<a href='javascript:;' class='addMetadataLink' ><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/metadata.png'/> {$ this ->t ('Add Metadata ' )}</a>
203
- </li>
203
+ </li>
204
204
<li>
205
205
<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>
206
+ </li>
207
207
<li>
208
208
<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>
209
+ </li>
210
210
" ;
211
+ $ tmp = Zend_Registry::get ('notifier ' )->callback ("CALLBACK_REMOTEPROCESSING_IS_EXECUTABLE " , array ('item ' => $ this ->itemDao ));
212
+ if (isset ($ tmp ['remoteprocessing ' ]) && $ tmp ['remoteprocessing ' ])
213
+ {
214
+ echo
215
+ "<li>
216
+ <a href=' " .$ this ->webroot ."/remoteprocessing/executable/define/?itemId= " .$ this ->itemDao ->getKey ()."'><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/metadata.png'/> {$ this ->t ('Define Executable ' )}</a>
217
+ </li>
218
+ " ;
219
+ }
211
220
}
212
221
if ($ this ->isAdmin )
213
222
{
214
223
$ modules = Zend_Registry::get ('modulesEnable ' );
215
224
if (in_array ('statistics ' , $ modules ))
216
225
{
217
- echo
226
+ echo
218
227
"<li>
219
228
<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>
229
+ </li>
221
230
" ;
222
231
}
223
- echo
232
+ echo
224
233
"
225
234
<li>
226
235
<a href='javascript:;' id='itemDeleteLink'><img alt='' src=' {$ this ->coreWebroot }/public/images/icons/close.png'/> {$ this ->t ('Delete ' )}</a>
227
- </li>
228
- " ;
236
+ </li>
237
+ " ;
229
238
}
230
239
?>
231
240
</ul>
232
241
</div>
233
242
<?php
234
243
}?>
235
244
<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>
245
+ <h1>Info</h1>
246
+ <table>
238
247
<tbody>
239
- <tr>
248
+ <tr>
240
249
<td><?php echo $ this ->t ('Created ' )?> </td>
241
- <td><?php echo $ this ->itemDao ->creation ?> </td>
250
+ <td><?php echo $ this ->itemDao ->creation ?> </td>
242
251
</tr>
243
- <tr>
244
- <td><?php echo $ this ->t ('Uploaded by ' );?> </td>
252
+ <tr>
253
+ <td><?php echo $ this ->t ('Uploaded by ' );?> </td>
245
254
<td><?php echo $ this ->linkuser ($ this ->itemDao ->lastrevision ->getUser ())?> </td>
246
255
</tr>
247
- <tr>
248
- <td>Revision</td>
256
+ <tr>
257
+ <td>Revision</td>
249
258
<td><?php echo $ this ->itemDao ->lastrevision ->getRevision ()?> </td>
250
259
</tr>
251
- <tr>
260
+ <tr>
252
261
<td><?php echo $ this ->t ('Files ' );?> </td>
253
- <td><?php echo count ($ this ->itemDao ->lastrevision ->getBitstreams ())?> </td>
262
+ <td><?php echo count ($ this ->itemDao ->lastrevision ->getBitstreams ())?> </td>
254
263
</tr>
255
264
</tbody>
256
265
</table>
@@ -269,7 +278,7 @@ if($this->preview) // module visualize
269
278
if (count ($ this ->sameLocation ) > 1 )
270
279
{?>
271
280
<div class='sideElementLast viewSameLocation'>
272
- <h1><?php echo $ this ->t ('In the same location ' )?> </h1>
281
+ <h1><?php echo $ this ->t ('In the same location ' )?> </h1>
273
282
<ul>
274
283
<?php
275
284
foreach ($ this ->sameLocation as $ item )
0 commit comments