1 | {literal} |
---|
2 | <style> |
---|
3 | form fieldset p {text-align:left;margin:0 0 1.5em 0;line-height:20px;} |
---|
4 | </style> |
---|
5 | {/literal} |
---|
6 | |
---|
7 | {footer_script}{literal} |
---|
8 | $(document).ready(function() { |
---|
9 | $("select[name=who]").click(function () { |
---|
10 | $("[name^=who_]").hide(); |
---|
11 | $("[name=who_"+$(this).attr("value")+"]").show(); |
---|
12 | }); |
---|
13 | |
---|
14 | $("#displayForm").click(function() { |
---|
15 | $("[name=add_permission]").show(); |
---|
16 | $(this).hide(); |
---|
17 | return false; |
---|
18 | }); |
---|
19 | }); |
---|
20 | {/literal}{/footer_script} |
---|
21 | |
---|
22 | |
---|
23 | <div class="titrePage"> |
---|
24 | <h2>{'Upload Permissions'|@translate} - {'Community'|@translate}</h2> |
---|
25 | </div> |
---|
26 | |
---|
27 | <a id="displayForm" href="#">{'Add a permission'|@translate}</a> |
---|
28 | |
---|
29 | <form method="post" name="add_permission" action="{$F_ADD_ACTION}" class="properties" style="display:none"> |
---|
30 | <fieldset> |
---|
31 | <legend>{'Add a permission'|@translate}</legend> |
---|
32 | |
---|
33 | <p> |
---|
34 | <strong>{'Who?'|@translate}</strong> |
---|
35 | <br> |
---|
36 | <select name="who"> |
---|
37 | <option value="any_visitor">{'any visitor'|@translate}</option> |
---|
38 | <option value="any_registered_user">{'any registered user'|@translate}</option> |
---|
39 | <option value="user">{'a specific user'|@translate}</option> |
---|
40 | <option value="group">{'a group'|@translate}</option> |
---|
41 | </select> |
---|
42 | |
---|
43 | <select name="who_user" style="display:none"> |
---|
44 | {html_options options=$user_options selected=$user_options_selected} |
---|
45 | </select> |
---|
46 | |
---|
47 | <select name="who_group" style="display:none"> |
---|
48 | {html_options options=$group_options selected=$group_options_selected} |
---|
49 | </select> |
---|
50 | </p> |
---|
51 | |
---|
52 | <p> |
---|
53 | <strong>{'Where?'|@translate}</strong> |
---|
54 | <br> |
---|
55 | <select class="categoryDropDown" name="category"> |
---|
56 | <option value="0">{'The whole gallery'|@translate}</option> |
---|
57 | <option disabled="disabled">------------</option> |
---|
58 | {html_options options=$category_options selected=$category_options_selected} |
---|
59 | </select> |
---|
60 | <br> |
---|
61 | <label><input type="checkbox" name="create_subcategories"> {'ability to create sub-albums'|@translate}</label> |
---|
62 | </p> |
---|
63 | |
---|
64 | <p> |
---|
65 | <strong>{'Which level of trust?'|@translate}</strong> |
---|
66 | <br><label><input type="radio" name="moderate" value="true" checked="checked"> <em>{'low trust'|@translate}</em> : {'uploaded photos must be validated by an administrator'|@translate}</label> |
---|
67 | <br><label><input type="radio" name="moderate" value="false"> <em>{'high trust'|@translate}</em> : {'uploaded photos are directly displayed in the gallery'|@translate}</label> |
---|
68 | </p> |
---|
69 | |
---|
70 | <p style="margin:0;"> |
---|
71 | <input class="submit" type="submit" name="submit_add" value="{'Add'|@translate}"/> |
---|
72 | </p> |
---|
73 | </fieldset> |
---|
74 | </form> |
---|
75 | |
---|
76 | <table class="table2" style="margin:15px auto;"> |
---|
77 | <tr class="throw"> |
---|
78 | <th>{'Who?'|@translate}</th> |
---|
79 | <th>{'Where?'|@translate}</th> |
---|
80 | <th>{'Options'|@translate}</th> |
---|
81 | <th>{'Actions'|@translate}</th> |
---|
82 | </tr> |
---|
83 | {if not empty($permissions)} |
---|
84 | {foreach from=$permissions item=permission name=permission_loop} |
---|
85 | <tr class="{if $smarty.foreach.permission_loop.index is odd}row1{else}row2{/if}"> |
---|
86 | <td>{$permission.WHO}</td> |
---|
87 | <td>{$permission.WHERE}</td> |
---|
88 | <td> |
---|
89 | <span title="{$permission.TRUST_TOOLTIP}">{$permission.TRUST}</span> |
---|
90 | {if $permission.CREATE_SUBCATEGORIES} |
---|
91 | , {'sub-albums creation'|@translate} |
---|
92 | {/if} |
---|
93 | </td> |
---|
94 | <td style="text-align:center;"> |
---|
95 | <a href="{$permission.U_DELETE}" onclick="return confirm( document.getElementById('btn_delete').title + '\n\n' + '{'Are you sure?'|@translate|@escape:'javascript'}');"> |
---|
96 | <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/delete.png" class="button" style="border:none" id="btn_delete" alt="{'delete'|@translate}" title="{'delete'|@translate}" /> |
---|
97 | </a> |
---|
98 | </td> |
---|
99 | </tr> |
---|
100 | {/foreach} |
---|
101 | {/if} |
---|
102 | </table> |
---|