source: extensions/Subscribe_to_comments/template/subscriptions_page.tpl @ 26139

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

update for 2.6

File size: 4.5 KB
Line 
1{combine_css path=$SUBSCRIBE_TO_PATH|cat:'template/style.css'}
2
3
4{if $IN_VALIDATE or $IN_UNSUBSCRIBE}
5<p>
6  {if !empty($element)}<a href="{$element.url}" title="{$element.name}">{'Return to item page'|@translate}</a><br>{/if}
7  <a href="{$MANAGE_LINK}">{'Manage my subscriptions'|@translate}</a>
8</p>
9
10{else}
11<form action="{$MANAGE_LINK}" method="post">
12  {if !empty($global_subscriptions)}
13  <fieldset>
14    <legend>{'Global subscriptions'|@translate}</legend>
15    <table class="subscriptions_list">
16      {foreach from=$global_subscriptions item=sub name=subs_loop}
17      <tr class="{if $smarty.foreach.subs_loop.index is odd}row1{else}row2{/if}">
18        <td>
19          {if $sub.type == 'all-images'}
20            {assign var=str value='all pictures of the gallery'|@translate}
21            <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/image.png">
22          {else $sub.type == 'all-albums'}
23            {assign var=str value='all albums of the gallery'|@translate}
24            <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album.png">
25          {/if}
26          {'You are currently subscribed to comments on %s.'|@translate|sprintf:$str}
27        </td>
28        <td style="white-space:nowrap;">
29          <div class="actions">
30            <a href="{$MANAGE_LINK}&amp;unsubscribe={$sub.id}" class="unsub">{'Unsubscribe'|@translate}</a>
31            {if $sub.validated == 'false'}<br> <a href="{$MANAGE_LINK}&amp;validate={$sub.id}">{'Validate'|@translate}</a>{/if}
32          </div>
33        </td>
34        <td style="white-space:nowrap;">
35          <i>{$sub.registration_date}</i>
36        </td>
37      </tr>
38      {/foreach}
39    </table>
40  </fieldset>
41  {/if}
42
43  {if !empty($subscriptions)}
44  <fieldset>
45    <legend>{'Manage my subscriptions'|@translate}</legend>
46    <table class="subscriptions_list">
47      <tr class="header">
48        <th class="chkb"><input type="checkbox" id="check_all"></th>
49        <th colspan="2" class="info">{'Subject'|@translate}</th>
50        <th class="date">{'Followed on'|@translate}</th>
51      </tr>
52
53      {foreach from=$subscriptions item=sub name=subs_loop}
54      <tr class="{if $smarty.foreach.subs_loop.index is odd}row1{else}row2{/if} {if $sub.validated == 'false'}not-validated{/if}">
55        <td class="chkb"><input type="checkbox" name="selected[]" value="{$sub.id}" id="sub-{$sub.id}"></td>
56        <td class="thumb"><label for="sub-{$sub.id}"><img src="{$sub.infos.thumbnail}" alt="{$sub.infos.name}" class="thumbnail"></label></td>
57        <td class="info">
58          <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/{$sub.type}.png">
59          <b><a href="{$sub.infos.url}">{$sub.infos.name}</a></b>
60
61          <div class="actions">
62            <a href="{$MANAGE_LINK}&amp;unsubscribe={$sub.id}" class="unsub">{'Unsubscribe'|@translate}</a>
63            {if $sub.validated == 'false'}| <a href="{$MANAGE_LINK}&amp;validate={$sub.id}">{'Validate'|@translate}</a>{/if}
64          </div>
65        </td>
66        <td class="date">
67          <i>{$sub.registration_date}</i>
68        </td>
69      </tr>
70      {/foreach}
71
72      <tr class="footer {if $smarty.foreach.subs_loop.index is odd}row1{else}row2{/if}"><td colspan="4">
73        <select name="action">
74          <option value="-1">{'Choose an action'|@translate}</option>
75          <option value="unsubscribe">{'Unsubscribe'|@translate}</option>
76          <option value="validate">{'Validate'|@translate}</option>
77        </select>
78        <input type="submit" name="apply_bulk" value="{'Apply action'|@translate}">
79      </td></tr>
80    </table>
81
82    <p>
83      <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/image.png"> {'comments on a picture'|@translate}.
84      <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album-images.png"> {'comments on all pictures of an album'|@translate}.
85      {if $COA_ACTIVATED}<img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album.png"> {'comments on an album'|@translate}.{/if}
86    </p>
87  </fieldset>
88  {/if}
89
90  {if !empty($global_subscriptions) or !empty($subscriptions)}
91    <p>
92      <label><input type="checkbox" name="unsubscribe_all_check" value="1"> {'Unsubscribe from all email notifications'|@translate}</label>
93      <input type="submit" name="unsubscribe_all" value="{'Submit'|@translate}">
94    </p>
95  {/if}
96</form>
97
98{footer_script require="jquery"}
99jQuery("#check_all").change(function() {
100  if (jQuery(this).is(":checked")) {
101    jQuery("input[name^='selected']").attr('checked', 'checked');
102  }
103  else {
104    jQuery("input[name^='selected']").removeAttr('checked');
105  }
106});
107{/footer_script}
108
109{/if}
Note: See TracBrowser for help on using the repository browser.