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

Last change on this file since 20090 was 20090, checked in by mistic100, 8 years ago
  • add webservices
  • add mail function
  • add admin list
  • add admin export function
  • try to deal with Gthumb+
  • activate multisize dropdown menu of collection page

TODO : use webservices instead of toggle_image.php

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