forked from plegall/Piwigo-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_pendings.tpl
139 lines (118 loc) · 3.88 KB
/
admin_pendings.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'}
{combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"}
{literal}
<style>
.rowSelected {background-color:#C2F5C2 !important}
.comment p {text-align:left; margin:5px 0 0 5px}
.comment table {margin:5px 0 0 0}
.comment table th {padding-right:10px}
</style>
{/literal}
{literal}
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("a.zoom").colorbox({rel:"zoom"});
function checkSelectedRows() {
$(".checkPhoto").each(function() {
var row = $(this).parent("tr");
var checkbox = $(this).children("input[type=checkbox]");
if ($(checkbox).is(':checked')) {
$(row).addClass("rowSelected");
}
else {
$(row).removeClass("rowSelected");
}
});
}
$(".checkPhoto").click(function(event) {
if (event.target.type !== 'checkbox') {
var checkbox = $(this).children("input[type=checkbox]");
jQuery(checkbox).prop('checked', !jQuery(checkbox).prop('checked'));
}
checkSelectedRows();
});
$("#selectAll").click(function () {
$(".checkPhoto input[type=checkbox]").prop('checked', true);
checkSelectedRows();
return false;
});
$("#selectNone").click(function () {
$(".checkPhoto input[type=checkbox]").prop('checked', false);
checkSelectedRows();
return false;
});
$("#selectInvert").click(function () {
$(".checkPhoto input[type=checkbox]").each(function() {
jQuery(this).prop('checked', !jQuery(this).prop('checked'));
});
checkSelectedRows();
return false;
});
});
</script>
{/literal}
{if !empty($photos) }
<form method="post" action="">
<fieldset>
<legend>{'Selection'|@translate}</legend>
<table width="99%">
{foreach from=$photos item=photo name=photo}
<tr valign="top" class="{if $smarty.foreach.photo.index is odd}row2{else}row1{/if}">
<td style="width:50px;text-align:center" class="checkPhoto">
<input type="checkbox" name="photos[]" value="{$photo.ID}" style="z-index:99;display:box;float:left;">
<img src="{$photo.TN_SRC}" style="margin:0.5em">
</td>
<td>
<div class="comment">
<p class="commentAction" style="float:left;margin:0.5em 0 0 0.5em"><a href="{$photo.MEDIUM_SRC}" class="zoom">{'Zoom'|@translate}</a> · <a href="{$photo.U_EDIT}" class="externalLink">{'Edit'|@translate}</a></p>
<p class="commentHeader"><strong>{$photo.ADDED_BY}</strong> - <em>{$photo.ADDED_ON}</em></p>
<table>
<tr>
<th>{'Album'|@translate}</th>
<td>{$photo.ALBUM}</td>
</tr>
<tr>
<th>{'Name'|@translate}</th>
<td>{$photo.NAME} ({'File'|@translate} {$photo.FILE})</td>
</tr>
<tr>
<th>{'Author'|@translate}</th>
<td>{$photo.AUTHOR}</td>
</tr>
<tr>
<th>{'Description'|@translate}</th>
<td>{$photo.DESCRIPTION}</td>
</tr>
<tr>
<th>{'Created on'|@translate}</th>
<td>{$photo.DATE_CREATION}</td>
</tr>
<tr>
<th>{'Dimensions'|@translate}</th>
<td>{$photo.DIMENSIONS}</td>
</tr>
</table>
</div>
</td>
</tr>
{/foreach}
</table>
<p class="checkActions">
{'Select:'|@translate}
<a href="#" id="selectAll">{'All'|@translate}</a>,
<a href="#" id="selectNone">{'None'|@translate}</a>,
<a href="#" id="selectInvert">{'Invert'|@translate}</a>
</p>
</fieldset>
<fieldset>
<legend>{'Who can see these photos?'|@translate}</legend>
<select name="level" size="1">
{html_options options=$level_options selected=$level_options_selected}
</select>
</fieldset>
<p class="bottomButtons">
<input class="submit" type="submit" name="validate" value="{'Validate'|@translate}">
<input class="submit" type="submit" name="reject" value="{'Reject'|@translate}">
</p>
</form>
{/if}