source: extensions/community/admin_pendings.tpl @ 14260

Last change on this file since 14260 was 9372, checked in by plg, 14 years ago

Rewritten version of Community plugin :

  • user upload (web form on gallery side)
  • precise permission manage (who, where, with moderation or not, ability to create sub-albums)
  • email notification to administrators when photos are uploaded

Requires Piwigo 2.2.0RC3

File size: 3.5 KB
Line 
1{literal}
2<style>
3.rowSelected {background-color:#C2F5C2 !important}
4.comment p {text-align:left; margin:5px 0 0 5px}
5.comment table {margin:5px 0 0 0}
6.comment table th {padding-right:10px}
7</style>
8{/literal}
9
10{literal}
11<script type="text/javascript">
12$(document).ready(function(){
13
14  function checkSelectedRows() {
15    $(".checkPhoto").each(function() {
16      var row = $(this).parent("tr");
17      var checkbox = $(this).children("input[type=checkbox]");
18
19      if ($(checkbox).is(':checked')) {
20        $(row).addClass("rowSelected");
21      }
22      else {
23        $(row).removeClass("rowSelected");
24      }
25    });
26  }
27
28
29  $(".checkPhoto").click(function(event) {
30    if (event.target.type !== 'checkbox') {
31      var checkbox = $(this).children("input[type=checkbox]");
32      $(checkbox).attr('checked', !$(checkbox).is(':checked'));
33    }
34    checkSelectedRows();
35  });
36
37  $("#selectAll").click(function () {
38    $(".checkPhoto input[type=checkbox]").attr('checked', true);
39    checkSelectedRows();
40    return false;
41  });
42
43  $("#selectNone").click(function () {
44    $(".checkPhoto input[type=checkbox]").attr('checked', false);
45    checkSelectedRows();
46    return false;
47  });
48
49  $("#selectInvert").click(function () {
50    $(".checkPhoto input[type=checkbox]").each(function() {
51      $(this).attr('checked', !$(this).is(':checked'));
52    });
53    checkSelectedRows();
54    return false;
55  });
56
57});
58</script>
59{/literal}
60
61<div class="titrePage">
62  <h2>{'Pending Photos'|@translate} - {'Community'|@translate}</h2>
63</div>
64
65{if !empty($photos) }
66<form method="post" action="{$F_ACTION}">
67 
68  <fieldset>
69
70    <legend>{'Selection'|@translate}</legend>
71<table width="99%">
72  {foreach from=$photos item=photo name=photo}
73  <tr valign="top" class="{if $smarty.foreach.photo.index is odd}row2{else}row1{/if}">
74    <td style="width:50px;text-align:center" class="checkPhoto">
75      <input type="checkbox" name="photos[]" value="{$photo.ID}" style="z-index:99;display:box;float:left;">
76      <img src="{$photo.TN_SRC}" style="margin:0.5em">
77    </td>
78    <td>
79  <div class="comment">
80    <p class="commentAction" style="float:left;margin:0.5em 0 0 0.5em"><a href="{$photo.WEBSIZE_SRC}" class="externalLink">{'Zoom'|@translate}</a> &middot; <a href="{$photo.U_EDIT}" class="externalLink">{'Edit'|@translate}</a></p>
81    <p class="commentHeader"><strong>{$photo.ADDED_BY}</strong> - <em>{$photo.ADDED_ON}</em></p>
82    <table>
83      <tr>
84        <th>{'Album'|@translate}</th>
85        <td>{$photo.ALBUM}</td>
86      </tr>
87      <tr>
88        <th>{'Name'|@translate}</th>
89        <td>{$photo.NAME} ({'File'|@translate} {$photo.FILE})</td>
90      </tr>
91      <tr>
92        <th>{'Created on'|@translate}</th>
93        <td>{$photo.DATE_CREATION}</td>
94      </tr>
95      <tr>
96        <th>{'Dimensions'|@translate}</th>
97        <td>{$photo.DIMENSIONS}</td>
98      </tr>
99    </table>
100  </div>
101    </td>
102  </tr>
103  {/foreach}
104</table>
105
106  <p class="checkActions">
107    {'Select:'|@translate}
108    <a href="#" id="selectAll">{'All'|@translate}</a>,
109    <a href="#" id="selectNone">{'None'|@translate}</a>,
110    <a href="#" id="selectInvert">{'Invert'|@translate}</a>
111  </p>
112
113    </fieldset>
114
115    <fieldset>
116      <legend>{'Who can see these photos?'|@translate}</legend>
117
118      <select name="level" size="1">
119        {html_options options=$level_options selected=$level_options_selected}
120      </select>
121    </fieldset>
122
123
124  <p class="bottomButtons">
125    <input class="submit" type="submit" name="validate" value="{'Validate'|@translate}">
126    <input class="submit" type="submit" name="reject" value="{'Reject'|@translate}">
127  </p>
128
129</form>
130{/if}
Note: See TracBrowser for help on using the repository browser.