source: trunk/admin/themes/default/template/batch_manager_unit.tpl @ 10648

Last change on this file since 10648 was 10648, checked in by mistic100, 10 years ago

feature:2269 add preview box on batch_manager_unit + add colorbox jquery plugin

  • Property svn:eol-style set to LF
File size: 5.1 KB
Line 
1{include file='include/autosize.inc.tpl'}
2{include file='include/datepicker.inc.tpl'}
3{include file='include/colorbox.inc.tpl'}
4
5{combine_script id='jquery.fcbkcomplete' load='async' require='jquery' path='themes/default/js/plugins/jquery.fcbkcomplete.js'}
6{footer_script require='jquery.fcbkcomplete'}
7var tag_boxes_selector = "";
8{foreach from=$elements item=element name=element}
9{if $smarty.foreach.element.first}
10var prefix = "";
11{else}
12prefix = ", ";
13{/if}
14        tag_boxes_selector = tag_boxes_selector + prefix + "#tags-" + {$element.ID};
15{/foreach}
16{literal}
17jQuery(document).ready(function() {
18        $(tag_boxes_selector).fcbkcomplete({
19                json_url: "admin.php?fckb_tags=1",
20                cache: false,
21                filter_case: false,
22                filter_hide: true,
23                firstselected: true,
24                filter_selected: true,
25                maxitems: 100,
26                newel: true
27        });
28 
29  $("a.preview-box").colorbox();
30});
31{/literal}{/footer_script}
32
33<h2>{'Batch Manager'|@translate}</h2>
34
35<form action="{$F_ACTION}" method="POST">
36<fieldset>
37  <legend>{'Display options'|@translate}</legend>
38  <p>{'photos per page'|@translate} :
39      <a href="{$U_ELEMENTS_PAGE}&amp;display=5">5</a>
40    | <a href="{$U_ELEMENTS_PAGE}&amp;display=10">10</a>
41    | <a href="{$U_ELEMENTS_PAGE}&amp;display=50">50</a>
42    | <a href="{$U_ELEMENTS_PAGE}&amp;display=all">{'all'|@translate}</a>
43  </p>
44
45</fieldset>
46
47{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
48
49{if !empty($elements) }
50<div><input type="hidden" name="element_ids" value="{$ELEMENT_IDS}"></div>
51{foreach from=$elements item=element}
52<fieldset class="elementEdit">
53  <legend>{$element.LEGEND}</legend>
54
55  <span class="thumb">
56    <a href="{$element.FILE_SRC}" class="preview-box" title="{$element.LEGEND}"><img src="{$element.TN_SRC}" alt=""></a>
57    <br/>
58    <a href="{$element.U_EDIT}">{'Informations'|@translate}</a>
59  </span>
60
61  <table>
62
63    <tr>
64      <td><strong>{'Name'|@translate}</strong></td>
65      <td><input type="text" class="large" name="name-{$element.ID}" value="{$element.NAME}"></td>
66    </tr>
67
68    <tr>
69      <td><strong>{'Author'|@translate}</strong></td>
70      <td><input type="text" class="large" name="author-{$element.ID}" value="{$element.AUTHOR}"></td>
71    </tr>
72
73    <tr>
74      <td><strong>{'Creation date'|@translate}</strong></td>
75      <td>
76        <label><input type="radio" name="date_creation_action-{$element.ID}" value="unset"> {'unset'|@translate}</label>
77        <label><input type="radio" name="date_creation_action-{$element.ID}" value="set" id="date_creation_action_set-{$element.ID}"> {'set to'|@translate}</label>
78
79        <select id="date_creation_day-{$element.ID}" name="date_creation_day-{$element.ID}">
80                <option value="0">--</option>
81           {section name=day start=1 loop=32}
82             <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$element.DATE_CREATION_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option>
83           {/section}
84        </select>
85        <select id="date_creation_month-{$element.ID}" name="date_creation_month-{$element.ID}">
86          {html_options options=$month_list selected=$element.DATE_CREATION_MONTH}
87        </select>
88        <input id="date_creation_year-{$element.ID}"
89               name="date_creation_year-{$element.ID}"
90               type="text"
91               size="4"
92               maxlength="4"
93               value="{$element.DATE_CREATION_YEAR}">
94        <input id="date_creation_linked_date-{$element.ID}" name="date_creation_linked_date-{$element.ID}" type="hidden" size="10" disabled="disabled">
95        {footer_script}
96          pwg_initialization_datepicker("#date_creation_day-{$element.ID}", "#date_creation_month-{$element.ID}", "#date_creation_year-{$element.ID}", "#date_creation_linked_date-{$element.ID}", "#date_creation_action_set-{$element.ID}");
97        {/footer_script}
98      </td>
99    </tr>
100    <tr>
101      <td><strong>{'Who can see this photo?'|@translate}</strong></td>
102      <td>
103        <select name="level-{$element.ID}">
104          {html_options options=$level_options selected=$element.LEVEL}
105        </select>
106      </td>
107    </tr>
108
109    <tr>
110      <td><strong>{'Tags'|@translate}</strong></td>
111      <td>
112
113<select id="tags-{$element.ID}" name="tags-{$element.ID}">
114{foreach from=$element.TAGS item=tag}
115  <option value="{$tag.value}" class="selected">{$tag.key}</option>
116{/foreach}
117</select>
118
119      </td>
120    </tr>
121
122    <tr>
123      <td><strong>{'Description'|@translate}</strong></td>
124      <td><textarea cols="50" rows="5" name="description-{$element.ID}" id="description-{$element.ID}" class="description">{$element.DESCRIPTION}</textarea></td>
125    </tr>
126
127  </table>
128
129</fieldset>
130{/foreach}
131
132<p>
133  <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit">
134  <input class="submit" type="reset" value="{'Reset'|@translate}">
135</p>
136{/if}
137
138</form>
139
140<script type="text/javascript">// <![CDATA[
141{literal}$(document).ready(function() {
142        $(".elementEdit img").fadeTo("slow", 0.6); // Opacity on page load
143        $(".elementEdit img").hover(function(){
144                $(this).fadeTo("slow", 1.0); // Opacity on hover
145        },function(){
146                $(this).fadeTo("slow", 0.6); // Opacity on mouseout
147        });
148});{/literal}
149// ]]>
150</script>
Note: See TracBrowser for help on using the repository browser.