source: extensions/community/admin_pendings.tpl @ 27153

Revision 23393, 3.8 KB checked in by plg, 6 years ago (diff)

compatibility with Smarty 3 (still compatible with Smart 2)

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