my.tt2 4.65 KB
Newer Older
1
<!-- $Id$ -->
2
3
4
5
6
7
8
9
10

<div class="block">
[% IF user.email %]
  <h2>[%|loc%]Manage your subscriptions[%END%] <a class="input" href="[%path_cgi %]/help/suspend">[%|loc%]Help[%END%]</a></h2>
  
  <p>[%|loc%]You are subscribed to the following lists[%END%]</p>
  
  <form class="noborder" action="[% path_cgi %]" method="post" name="suspend_request">
    [% IF which.size %]
sikeda's avatar
sikeda committed
11
      <div class="item_list">
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
      [% FOREACH l = which %]
        [% suspended = 0 %]
        [% suspendable = 0 %]
        [% additional_class = '' %]
        [% IF l.value.is_subscriber %]
          [% suspendable = 1 %]
        [% END %]
        [% IF l.value.listsuspend %]
          [% suspended = 1 %]
          [% additional_class = ' suspended' %]
        [% END %]
        <div class="item[% additional_class %]">
        <div class="item_content">
          <a class="item_title" href="[% path_cgi %]/info/[% l.key %]">
            [% hidden_head %][% l.key %][% hidden_end %]
sikeda's avatar
sikeda committed
27
28
29
30
31
32
33
34
35
36
37
            [% IF l.value.is_owner || l.value.is_editor || l.value.is_subscriber ~%]
              <span class="highlighted">(
              [%~ IF l.value.is_owner ~%]
                [%|loc%]Owner[%END ~%]
                [% IF l.value.is_subscriber %][%|loc%], [%END%][%END ~%]
              [% ELSIF l.value.is_editor ~%]
                [%|loc%]Editor[%END ~%]
                [% IF l.value.is_subscriber %][%|loc%], [%END%][%END ~%]
              [% END ~%]
              [% IF l.value.is_subscriber %][%|loc%]Subscriber[%END%][%END ~%]
              )</span>
38
39
40
41
42
43
44
45
46
47
48
            [% END %]
          </a>
          [% IF suspendable %]
            [% IF suspended %]
              [%|loc(l.value.liststartdate)%]Suspended from %1 to[% END %]
              [% IF l.value.listenddate %]
                [% l.value.listenddate %]
              [% ELSE %]
                [%|loc%]indefinite end date[%END%]
              [% END %]<br/>
              <input id="listname.[% l.key %]" type="checkbox" checked="checked" name="listname" value="[% l.key %]" />
49
              <label for="listname.[% l.key %]">[%|loc(l.key)%]Check to restore reception from list %1[% END %]</label>
50
51
            [% ELSE %]
              <input id="listname.[% l.key %]" type="checkbox" checked="checked" name="listname" value="[% l.key %]" />
52
              <label for="listname.[% l.key %]">[%|loc(l.key)%]Check to suspend or unsubscribe from list %1[% END %]</label>
53
54
55
56
57
58
59
60
            [% END %]
          [% ELSE %]
            <p class="note">[%|loc%]You are not allowed to suspend your subscription / unsusbscribe from this list.[% END %]
          [% END %]
          <p class="list_subject">[% l.value.subject %]</p>
          
          
          <ul>
sikeda's avatar
sikeda committed
61
            [% IF l.value.is_owner %]
62
63
64
65
66
67
68
69
70
71
              <li><a href="[% path_cgi %]/review/[% l.key %]">[%|loc%]Review members[%END%]</a></li>
            [% END %]
            
            [% IF is_user_allowed_to('archive.web_access', l.key) %]
              <li><a href="[% path_cgi %]/arc/[% l.key %]">[%|loc%]Archives[%END%]</a></li>
            [% END %]
          </ul>
        </div>
        </div>
      [% END %]
sikeda's avatar
sikeda committed
72
      </div>
73
74
75
    
    [% ELSE %]
    
sikeda's avatar
sikeda committed
76
      <p>[%|loc%]No subscription.[%END%]</p>
77
    
sikeda's avatar
sikeda committed
78
    [% END %]
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
    
    <p>[%|loc%]You can bulk suspend or revoke your memberships by selecting relevant lists and using the buttons below. The suspend option prevents delivery of emails, this can be useful if you are out of the office for some time.[%END%]</p>
    
    <input class="MainMenuLinks" type="button" value="[%|loc%]Toggle selection[%END%]" onclick="toggle_selection(document.suspend_request.listname)" />
    <br />
    
    <input type="hidden" name="action" value="suspend_request_action"/>
    <input class="MainMenuLinks" type="submit" name="sub_action_suspendsave" value="[%|loc%]Suspend my subscriptions[%END%]"/>
    [%|loc%]From:[%END%] <noscript>(dd-mm-yyyy)</noscript><input type="text" id="date_deb" name="date_deb" maxlength="10" size="10" value="[% d_day %]" onfocus="visuCal(this,param_ddeb);" onblur="masqueCal(this);" />
    [%|loc%]To:[%END%] <noscript>(dd-mm-yyyy)</noscript><input type="text" id="date_fin" name="date_fin" maxlength="10" size="10" onfocus="visuCal(this,param_dfin)" onblur="masqueCal(this)" />
    <input type="checkbox" name="indefinite" />[%|loc%]Suspend my membership indefinitely[%END%]
    <br />
    
    [% IF suspended %]
    <input class="MainMenuLinks" type="submit" name="sub_action_suspendstop" value="[%|loc%]Resume my subscriptions[%END%]"/>
    <br />
    [% END %]
    
    <input class="MainMenuLinks" type="submit" name="sub_action_signoff" value="[%|loc%]Unsubscribe[%END%]"/>
  </form>

[% ELSE %]
   [%|loc%]You need to be logged in to access this page.[%END%]
[% END %]
</div>
<!-- end suspend_request.tt2 -->