1 | {literal} |
---|
2 | <script type="text/javascript"> |
---|
3 | |
---|
4 | var cbm, |
---|
5 | resetValues = { |
---|
6 | 'cancel':new Array(), |
---|
7 | 'piwigo':new Array() |
---|
8 | }; |
---|
9 | $(window).load( |
---|
10 | function () |
---|
11 | { |
---|
12 | {/literal} |
---|
13 | // initialization for cancel et reset functions |
---|
14 | {foreach from=$datas.coreBlocks.defaultValues item=value key=id} |
---|
15 | resetValues.piwigo.push( {literal} { {/literal} id:"{$id}", block:"{$value.container}", order:{$value.order}, visibility:"{$value.visibility}" {literal} } {/literal} ); |
---|
16 | {/foreach} |
---|
17 | {foreach from=$datas.coreBlocks.items item=value key=id} |
---|
18 | resetValues.cancel.push( {literal} { {/literal} id:"{$id}", block:"{$value.container}", order:{$value.order}, visibility:"{$value.visibility}" {literal} } {/literal} ); |
---|
19 | {/foreach} |
---|
20 | {literal} |
---|
21 | |
---|
22 | cbm=new coreBlocks( |
---|
23 | {}, |
---|
24 | {}, |
---|
25 | '{/literal}{$token}{literal}', |
---|
26 | { |
---|
27 | resetValues:resetValues, |
---|
28 | tab:"{/literal}{$datas.tab}{literal}" |
---|
29 | } |
---|
30 | |
---|
31 | ); |
---|
32 | } |
---|
33 | ); |
---|
34 | </script> |
---|
35 | {/literal} |
---|
36 | |
---|
37 | |
---|
38 | <div style='padding-top:15px;'> |
---|
39 | {$blocksTabsheet} |
---|
40 | </div> |
---|
41 | |
---|
42 | |
---|
43 | <div id="containerPos" style='display:none;'> |
---|
44 | |
---|
45 | <ul class='menuUl'> |
---|
46 | {foreach from=$datas.menuBlocks item=block} |
---|
47 | <li class='menuListItem connectedSortable pluginBox' blockId='{$block.id}'> |
---|
48 | |
---|
49 | <table class='menuListAccess'> |
---|
50 | <tr> |
---|
51 | <td style='min-width: 250px;'> |
---|
52 | <span class='menuListMove' title="{'Drag to re-order'|@translate}"> </span> |
---|
53 | <span class='menuListName'> |
---|
54 | <span style='font-weight:bold;' class='pluginBoxNameCell'>{$block.name|@translate}</span> [{$block.id}]<br> |
---|
55 | <span style='font-style:italic;'>{if $block.owner=='piwigo'}Piwigo{else}{'g002_plugin'|@translate} : {$block.owner}{/if}</span> |
---|
56 | </span> |
---|
57 | </td> |
---|
58 | <td style='min-width: 100px;text-align:right;'>{'g002_accessibility'|@translate}</td> |
---|
59 | <td style='width:30%;'> |
---|
60 | <div id='users_{$block.id}' class='menuListUsers' style='display:none;'> |
---|
61 | {ldelim} |
---|
62 | "selected":{$block.users}, |
---|
63 | "values": |
---|
64 | [ |
---|
65 | {foreach from=$datas.users item=user name=items} |
---|
66 | {ldelim}"value":"{$user.id}","cols":["{$user.name}"]{rdelim}{if !$smarty.foreach.items.last},{/if} |
---|
67 | {/foreach} |
---|
68 | ] |
---|
69 | {rdelim} |
---|
70 | </div> |
---|
71 | </td> |
---|
72 | <td style='width:30%;'> |
---|
73 | <div id='groups_{$block.id}' class='menuListGroups' style:'display:none;'> |
---|
74 | {ldelim} |
---|
75 | "selected":{$block.groups}, |
---|
76 | "values": |
---|
77 | [ |
---|
78 | {foreach from=$datas.groups item=group name=items} |
---|
79 | {ldelim}"value":"{$group.id}","cols":["{$group.name}"]{rdelim}{if !$smarty.foreach.items.last},{/if} |
---|
80 | {/foreach} |
---|
81 | ] |
---|
82 | {rdelim} |
---|
83 | </div> |
---|
84 | </td> |
---|
85 | |
---|
86 | </tr> |
---|
87 | </table> |
---|
88 | </li> |
---|
89 | {/foreach} |
---|
90 | </ul> |
---|
91 | |
---|
92 | </div> |
---|
93 | |
---|
94 | <div id="containerMenu" style='display:none;'> |
---|
95 | <table> |
---|
96 | <tr> |
---|
97 | {foreach from=$datas.coreBlocks.blocks item=blockName key=block} |
---|
98 | <td> |
---|
99 | <h3>{$blockName|@translate}</h3> |
---|
100 | </td> |
---|
101 | {/foreach} |
---|
102 | <td> </td> |
---|
103 | </tr> |
---|
104 | <tr> |
---|
105 | {foreach from=$datas.coreBlocks.blocks item=blockName key=block name=items} |
---|
106 | <td {if !$smarty.foreach.items.first}class='leftBar'{/if}> |
---|
107 | <div id="containerMenu_{$block}" class="containerMenuBlock"> |
---|
108 | |
---|
109 | <ul class="connectedSortable categoryUl" id="menu_{$block}"> |
---|
110 | {foreach from=$datas.coreBlocks.items item=data key=id} |
---|
111 | {if $data.container==$block} |
---|
112 | <li class="categoryLi menuItem pluginBox {if $id=='qsearch'}menuItemDisabled{/if}" id="i{$id}"> |
---|
113 | <div class='pluginBoxNameCell'> |
---|
114 | {if $id=="qsearch"} |
---|
115 | {else} |
---|
116 | <span class='listMove' title="{'Drag to re-order'|@translate}"></span> |
---|
117 | {/if} |
---|
118 | {$data.translation|@translate} |
---|
119 | |
---|
120 | <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/permissions.png" |
---|
121 | class="button drag_button visibilitySwitch" |
---|
122 | alt="{'g002_click_to_manage_rights'|@translate}" |
---|
123 | title="{'g002_click_to_manage_rights'|@translate}" |
---|
124 | style="float:right;"/> |
---|
125 | |
---|
126 | </div> |
---|
127 | <div id="i{$id}_visibility" class="visibility"> |
---|
128 | {$data.visibilityForm} |
---|
129 | </div> |
---|
130 | </li> |
---|
131 | {/if} |
---|
132 | {/foreach} |
---|
133 | </ul> |
---|
134 | </div> |
---|
135 | </td> |
---|
136 | {/foreach} |
---|
137 | <td class='leftBar'> |
---|
138 | <div class='containerMenuBlock'> |
---|
139 | <input type="button" value="{'g002_cancel'|@translate}" onclick="cbm.reset('cancel');"/><br> |
---|
140 | <input type="button" value="{'g002_piwigo_default'|@translate}" onclick="cbm.reset('piwigo');"/> |
---|
141 | </div> |
---|
142 | </td> |
---|
143 | </tr> |
---|
144 | </table> |
---|
145 | </div> |
---|
146 | |
---|
147 | <div style='padding-top:30px;'> |
---|
148 | <input style='margin-left:20px;' type="button" value="{'g002_apply'|@translate}" onclick="cbm.submit();"> |
---|
149 | </div> |
---|
150 | |
---|