source: extensions/UserCollections/template/edit.tpl @ 21382

Revision 21382, 6.2 KB checked in by mistic100, 6 years ago (diff)

fix caddie button,
fix fatal error for Back2Front,
update ZeroClipboard,
fix breadcrumb and body_id,
unactive for mobile themes,
fix display issues

Line 
1{combine_css path=$USER_COLLEC_PATH|@cat:"template/style.css"}
2{combine_script id='ZeroClipboard' path=$USER_COLLEC_PATH|@cat:"template/resources/ZeroClipboard.min.js"}
3
4{combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'}
5{combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"}
6
7{footer_script require='jquery'}
8{if $user_collections.allow_public}
9ZeroClipboard.setDefaults( {ldelim} moviePath: "{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/ZeroClipboard.swf" } );
10var clip = new ZeroClipboard();
11clip.glue(jQuery("#publicURL .button").get());
12clip.addEventListener('onMouseOver', function() {ldelim}
13  clip.setText(jQuery("#publicURL .url").val());
14});
15clip.addEventListener('complete', function() {ldelim}
16  jQuery('.confirm').remove();
17  jQuery("#publicURL .url").select();
18  jQuery('<span class="confirm" style="display:none;">{'Copied'|@translate}</span>').appendTo("#publicURL")
19    .fadeIn(400).delay(1000).fadeOut(400, function(){ldelim} jQuery(this).remove(); });
20});
21
22jQuery("#publicURL .url").click(function() {ldelim}
23  jQuery(this).select();
24});
25
26jQuery("input[name='public']").change(function() {ldelim}
27  jQuery("#publicURL").fadeToggle("fast");
28});
29{/if}
30
31{if $collection.PUBLIC && $user_collections.allow_mails}
32  jQuery(window).load(function(){ldelim}
33    jQuery(".mail_colorbox_open").colorbox({ldelim}
34      {if isset($uc_mail_errors)}open: true, transition:"none",{/if}
35      inline:true
36    });
37    jQuery(".mail_colorbox_close").click(function() {ldelim}
38      jQuery(".mail_colorbox_open").colorbox.close();
39      return false;
40    })
41  });
42  jQuery("#mail_form").css('background-color', jQuery("#the_page #content").css('background-color'));
43{/if}
44{/footer_script}
45
46
47{* <!-- Menubar & titrePage --> *}
48{if $themeconf.name == "stripped" or $themeconf.parent == "stripped"}
49  {include file=$USER_COLLEC_ABS_PATH|@cat:'template/themes/stripped.tpl'}
50  {assign var="clear" value="true"}
51{elseif $themeconf.name == "simple-grey" or $themeconf.parent == "simple"}
52  {include file=$USER_COLLEC_ABS_PATH|@cat:'template/themes/simple.tpl'}
53  {assign var="clear" value="true"}
54{else}
55  {include file=$USER_COLLEC_ABS_PATH|@cat:'template/themes/default.tpl'}
56{/if}
57
58{if isset($errors) or not empty($infos)}
59{include file='infos_errors.tpl'}
60{/if}
61
62
63{if $collection}
64{* <!-- edit collection -->*}
65<form action="{$F_ACTION}" method="post">
66<fieldset id="colProperties">
67  <legend>{'Properties'|@translate}</legend>
68 
69  <p class="title"><label for="name">{'Name'|@translate}</label></p>
70  <p><input type="text" name="name" id="name" value="{$collection.NAME|escape:html}" size="60"></p>
71{if $user_collections.allow_public}
72  <p class="title">{'Public collection'|@translate}</p>
73  <p>
74    <label><input type="radio" name="public" value="0" {if not $collection.PUBLIC}checked="checked"{/if}> {'No'|@translate}</label>
75    <label><input type="radio" name="public" value="1" {if $collection.PUBLIC}checked="checked"{/if}> {'Yes'|@translate}</label>
76    <span id="publicURL" {if not $collection.PUBLIC}style="display:none;"{/if}><!--
77    --><span class="button" title="{'Copy to clipboard'|@translate}">&nbsp;</span><!--
78    --><input type="text" class="url" value="{$collection.U_PUBLIC}" size="{$collection.U_PUBLIC|strlen}"><!--
79  --></span>
80  </p>
81{/if}
82  <p>
83    <input type="submit" name="save_col" value="{'Save'|@translate}">
84    <a href="{$U_LIST}" rel="nofollow">{'Return to collections list'|@translate}</a>
85  </p>
86</fieldset>
87</form>
88
89{* <!-- send collection by mail -->*}
90{if $user_collections.allow_public && $user_collections.allow_mails}
91<div style="display:none;">
92  <form id="mail_form" action="{$F_ACTION}" method="post">
93  {if isset($uc_mail_errors)}
94    {assign var=errors value=$uc_mail_errors}
95    {include file='infos_errors.tpl'}
96  {/if}
97
98    <table>
99      <tr>
100        <td class="title"><label for="sender_name">{'Your name'|@translate}</label></td>
101        <td>
102          <input type="text" name="sender_name" id="sender_name" size="40" value="{$contact.sender_name}">
103        </td>
104      </tr>
105      <tr>
106        <td class="title"><label for="sender_email">{'Your e-mail'|@translate}</label></td>
107        <td>
108          <input type="text" name="sender_email" id="sender_email" size="40" value="{$contact.sender_email}">
109        </td>
110      </tr>
111      <tr>
112        <td class="title"><label for="recipient_name">{'Recipient name'|@translate}</label></td>
113        <td>
114          <input type="text" name="recipient_name" id="recipient_name" size="40" value="{$contact.recipient_name}">
115        </td>
116      </tr>
117      <tr>
118        <td class="title"><label for="recipient_email">{'Recipient e-mail'|@translate}</label></td>
119        <td>
120          <input type="text" name="recipient_email" id="recipient_email" size="40" value="{$contact.recipient_email}">
121        </td>
122      </tr>
123      <tr>
124        <td class="title"><label for="nb_images">{'Number of images'|@translate}</label></td>
125        <td>
126          <select name="nb_images">
127            <option value="2" {if $contact.nb_images==2}selected="selected"{/if}>2</option>
128            <option value="4" {if $contact.nb_images==4}selected="selected"{/if}>4</option>
129            <option value="8" {if $contact.nb_images==8}selected="selected"{/if}>8</option>
130          </select>
131        </td>
132      </tr>
133      <tr>
134        <td class="title"><label for="message">{'Message (optional)'|@translate}</label></td>
135        <td><textarea name="message" id="message" rows="6" style="width:350px;">{$contact.message}</textarea></td>
136      </tr>
137      <tr>
138        <td class="title">&nbsp;</td>
139        <td>
140          <input class="submit" type="submit" name="send_mail" value="{'Send'|@translate}">
141          <a class="mail_colorbox_close" href="#">{'Cancel'|@translate}</a>
142          <input type="hidden" name="key" value="{$contact.KEY}" />
143        </td>
144      </tr>
145    </table>
146  </form>
147</div>
148{/if}
149
150{* <!-- collection content -->*}
151{if $collection.NB_IMAGES > 0}
152<ul class="thumbnails" id="thumbnails">
153{$THUMBNAILS}
154</ul>
155{else}
156<p><i>{'This collection is empty'|@translate}</i></p>
157{/if}
158
159{if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
160{/if}
161
162{if $clear}<div style="clear: both;"></div>
163</div>{/if}
164</div>{* <!-- content --> *}
Note: See TracBrowser for help on using the repository browser.