Commit 1a60f15e authored by sikeda's avatar sikeda
Browse files

[-dev] Repairing templates:

- lists.tt2 could not show lists.
- info.tt2 did not show notice for pure editor (non-owner editor).
- On lists.tt2 with selected topics (category), "All" link resets selection.
- Restore stats menu item.
- RSS menu is hidden by default.
- Adding a few translation strings.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@11857 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent d7d9d4ce
......@@ -5,46 +5,47 @@
<br />
[% IF !group %]
[% IF GROUP == 'description' %][% SET class = 'menuLinksCurrentPage' %][% ELSE %][% SET class = 'menuLinks' %][% END %]
<p>[%|loc%]Here you can edit your list's configuration parameters.[% END %]</p>
[% IF GROUP == 'description' %][% SET class = 'menuLinksCurrentPage' %][% ELSE %][% SET class = 'menuLinks' %][% END %]
<p>[%|loc%]Here you can edit your list's configuration parameters.[% END %]</p>
[% ELSE %]
<form class="bold_label" action="[% path_cgi %]" method="post">
<fieldset>
<input type="hidden" name="serial" value="[% serial %]" />
[% FOREACH p = param %]
<fieldset>
<input type="hidden" name="serial" value="[% serial %]" />
[% FOREACH p = param %]
[% IF p.may_edit != 'hidden' %]
[% IF p.changed == '1' %]
<div class="CurrentBlock">
<div class="CurrentBlock">
[% ELSE %]
<div class="block">
[% END %]
<h4>
[% IF p.title %]
[% p.title %]
[% IF is_listmaster %]
([% p.name %])
[% END %]
[% ELSE %]
[% p.name %]
[% END %]
[% IF is_listmaster %]
[% IF p.default == '1' %]
(default)
[% END %]
[% END %]
<span class="edit_list_request_help">
[% IF p.type == 'scenario' %]
[% IF is_listmaster %]
&nbsp;<a class="input" href="[% path_cgi %]/dump_scenario/[% list %]/[% p.name %]" title="[%|loc%]scenario source[%END%]">[%|loc%]scenario source[%END%]</a>
[% END %]
[% END %]
<a class="input" href="[% path_cgi %]/nomenu/help/editlist#[% p.name %]" title="[%|loc%]Open in a new window[%END%]" onclick="window.open('','wws_help','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=400')" target="wws_help">[%|loc%]Help[%END%]</a>
</span>
</h4>
<div class="edit_list_request_enum">
<h4>
[% IF p.title %]
[% p.title %]
[% IF is_listmaster %]
([% p.name %])
[% END %]
[% ELSE %]
[% p.name %]
[% END %]
[% IF is_listmaster %]
[% IF p.default == '1' %]
[%|loc%](default)[%END%]
[% END %]
[% END %]
<span class="edit_list_request_help">
[% IF p.type == 'scenario' %]
[% IF is_listmaster %]
&nbsp;<a class="input" href="[% path_cgi %]/dump_scenario/[% list %]/[% p.name %]" title="[%|loc%]scenario source[%END%]">[%|loc%]scenario source[%END%]</a>
[% END %]
[% END %]
<a class="input" href="[% path_cgi %]/nomenu/help/editlist#[% p.name %]" title="[%|loc%]Open in a new window[%END%]" onclick="window.open('','wws_help','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=400')" target="wws_help">[%|loc%]Help[%END%]</a>
</span>
</h4>
<div class="edit_list_request_enum">
[% IF p.occurrence == 'multiple' %]
<!-- Multiple params -->
......@@ -81,7 +82,7 @@
[% ELSE %]
[% o_INDEX = 0 %]
[% FOREACH o = p.value %]
<br />
<br />
<!-- Foreach occurrence -->
[% IF p.type == 'paragraph' %]
......@@ -90,7 +91,7 @@
[% IF key.may_edit != 'hidden' %]
<label for="single_param.[% p.name %].[% o_INDEX %].[% key.name %]">
[% IF key.title %]
[% key.title %][%|loc%]:[%END%]
[% key.title %][% IF is_listmaster %] ([% key.name %])[% END %][%|loc%]:[%END%]
[% ELSE %]
[% key.name %][%|loc%]:[%END%]
[% END %]
......@@ -118,7 +119,7 @@
[% END %]
[% END %]
[% END %]
<br />
<br />
</div>
[% ELSIF key.type == 'datasource' %]
<!-- Datasource -->
......@@ -132,7 +133,7 @@
>[% source.value.title %]</option>
[% END %]
</select></div>
<br />
<br />
[% ELSIF key.may_edit == 'read' %]
[% FOREACH source = key.value %]
[% IF source.value.selected == '1' %]
......@@ -177,7 +178,7 @@
[%END%]
<!-- ENDIF Enum -->
<br />
<br />
[% ELSE %]
<!-- Single params -->
......@@ -187,16 +188,16 @@
[% IF p.may_edit == 'write' %]
<select name="single_param.[% p.name %].name" id="single_param.[% p.name %].name" onchange="this.form.submit();">
[% FOREACH scenario = p.value %]
[% UNLESS scenario.value.name.match('(default)\s*$') %]
[% UNLESS scenario.value.name.match('(default)\s*$') %]
<option value="[% scenario.value.name %]"
[% IF scenario.value.selected == '1' %]
selected="selected"
[% END %]
>[% scenario.value.web_title %] ([% scenario.value.name %])</option>
[% END %]
[% END %]
[% END %]
</select>
<br />
<br />
[% ELSIF p.may_edit == 'read' %]
[% FOREACH scenario = p.value %]
[% IF scenario.value.selected == '1' %]
......@@ -250,7 +251,7 @@
[% IF key.may_edit != 'hidden' %]
<label for="single_param.[% p.name %].[% key.name %].name">
[% IF key.title %]
[% key.title %][%|loc%]:[%END%]
[% key.title %][% IF is_listmaster %] ([% key.name %])[% END %][%|loc%]:[%END%]
[% ELSE %]
[% key.name %][%|loc%]:[%END%]
[% END %]
......@@ -268,7 +269,7 @@
>[% scenario.value.web_title %] ([% scenario.value.name %])</option>
[% END %]
</select>
<br />
<br />
[% ELSIF key.may_edit == 'read' %]
[% FOREACH scenario = key.value %]
[% IF scenario.value.selected == '1' %]
......@@ -339,7 +340,7 @@
[% END %]
[% END %]
</select></div>
<br />
<br />
[% ELSIF key.may_edit == 'read' %]
[% FOREACH enum = key.value %]
[% IF enum.value.selected == '1' %]
......@@ -363,12 +364,12 @@
<!-- Scalar -->
[% IF key.may_edit == 'write' %]
<input type="text" name="single_param.[% p.name %].[% key.name %]" id="single_param.[% p.name %].[% key.name %].name" value="[% key.value %]" size="[% key.length %]" />
[% ELSIF key.may_edit == 'read' %]
[% key.value %]
[% END %]
[% key.unit %]
<br />
<br />
[% END %]
......@@ -424,22 +425,22 @@
[% END %]
[% END %]
</div><!-- /div class="edit_list_request_enum" -->
[% IF p.default == '1' %]
<span class="default">[%|loc%]default[%END%]</span>
[% END %]
</div><br />
</div>[%# /div class="edit_list_request_enum" #%]
[% IF p.default == '1' %]
<span class="default">[%|loc%]default[%END%]</span>
[% END %]
</div><br />
[% END %]
[% END %]
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="group" value="[% group %]" />
<input type="hidden" name="action" value="edit_list" />
[% IF is_form_editable == '1' %]
<input class="MainMenuLinks" type="submit" name="action_edit_list" value="[%|loc%]Update[%END%]" />
[% END %]
</fieldset>
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="group" value="[% group %]" />
<input type="hidden" name="action" value="edit_list" />
[% IF is_form_editable == '1' %]
<input class="MainMenuLinks" type="submit" name="action_edit_list" value="[%|loc%]Update[%END%]" />
[% END %]
</fieldset>
</form>
[% END %]
......
<!-- $Id$ -->
[% IF homepage_content %]
[% homepage_content %]
[% homepage_content %]
[% ELSE %]
<p><b>[%|loc%]Description:[%END%]</b> [% IF is_owner %]<a href="[% path_cgi %]/editfile/[% list %]/info">[%|loc%](Edit)[%END%]</a>[% END %] [% info_content %]</p>
<p><b>[%|loc%]Description:[%END%]</b> [% IF is_owner %]<a href="[% path_cgi %]/editfile/[% list %]/info">[%|loc%](Edit)[%END%]</a>[% END %] [% info_content %]</p>
[% IF is_owner %]
<hr />
<h3>[%|loc%]Administrative Options[%END%]</h3>
[% IF is_owner || is_editor %]
<hr />
<h3>[%|loc%]Administrative Options[%END%]</h3>
[% IF is_editor %]
[% IF mod_message > 0 %]
<div id="noticeMsg">
[%|loc(mod_message)%]There are %1 message(s) awaiting moderation.[%END%] <a href="[% path_cgi %]/modindex/[% list %]">[%|loc%](Review)[%END%]</a>
</div>
[% END %]
[% END %]
[% IF is_owner %]
[% IF mod_subscription > 0 %]
<div id="noticeMsg">
[%|loc(mod_subscription)%]There are %1 subscription(s) awaiting moderation.[%END%] <a href="[% path_cgi %]/subindex/[% list %]">[%|loc%](Review)[%END%]
</div>
[% END %]
[% END %]
[% IF is_owner || is_editor %]
[% IF mod_message > 0 %]
<div id="noticeMsg">
[%|loc(mod_message)%]There are %1 message(s) awaiting moderation.[%END%] <a href="[% path_cgi %]/modindex/[% list %]">[%|loc%](Review)[%END%]</a>
</div>
[% END %]
[% END %]
[% IF is_owner %]
[% IF mod_subscription > 0 %]
<div id="noticeMsg">
[%|loc(mod_subscription)%]There are %1 subscription(s) awaiting moderation.[%END%] <a href="[% path_cgi %]/subindex/[% list %]">[%|loc%](Review)[%END%]
</div>
[% END %]
[% END %]
<div class="item_list">
<p>[%|loc%]Common administrative options are linked below; full administrative options are available by selecting Admin beneath List Options in the Left Navigation menu.[%END%]</p>
<div class="item">
<img class="item_icon" src="[% static_content_url %]/icons/subscribe.png" />
<div class="item_content">
<a class="item_title" href="[% path_cgi %]/review/[% list %]">View or Manage Subscribers</a>
<ul>
<li>[%|loc%]View the list of subscribers[%END%]</li>
<li>[%|loc%]Review subscription requests[%END%]</li>
<li>[%|loc%]Add/delete subscribers[%END%]</li>
</ul>
</div>
</div>
<div class="item">
<img class="item_icon" src="[% static_content_url %]/icons/config.png" />
<div class="item_content">
<a class="item_title" href="[% path_cgi %]/admin/[% list %]">[%|loc%]List Configuration[%END%]</a>
<ul>
<li><a href="[% path_cgi %]/edit_list_request/[% list %]/description">[%|loc%]Modify owners or moderators (editors)[%END%]</a></li>
<li><a href="[% path_cgi %]/edit_list_request/[% list %]/description">[%|loc%]Modify list subject and visibility[%END%]</a></li>
<li><a href="[% path_cgi %]/edit_list_request/[% list %]/sending">[%|loc%]Change who can post to this list[%END%]</a></li>
<li><a href="[% path_cgi %]/edit_list_request/[% list %]/command">[%|loc%]Change who can (un)subscribe and view list information[%END%]</a></li>
<li><a href="[% path_cgi %]/admin/[% list %]">[%|loc%]Close this list[%END%]</a></li>
</ul>
</div>
</div>
<div class="item">
<img class="item_icon" src="[% static_content_url %]/icons/arc.png" />
<div class="item_content">
<a class="item_title" href="[% path_cgi %]/arc/[% list %]">[%|loc%]List Archives[%END%]</a>
<ul>
<li><a href="[% path_cgi %]/edit_list_request/[% list %]/archives">[%|loc%]Change settings for who can view archives[%END%]</a></li>
<li><a href="[% path_cgi %]/arc_manage/[% list %]">[%|loc%]Download archives[%END%]</a></li>
</ul>
</div>
</div>
<div class="item">
<img class="item_icon" src="[% static_content_url %]/icons/datasources.png" />
<div class="item_content">
<a class="item_title" href="[% path_cgi %]/edit_list_request/[% list %]/data_source">[%|loc%]Data Sources Configuration[%END%]</a>
<ul>
<li>[%|loc%]Configure data sources (SQL, LDAP, text file) for list membership[%END%]</li>
<li>[%|loc%]Include (nest) Sympa lists[%END%]</li>
</ul>
</div>
</div>
</div>
[% IF is_owner %]
<div class="item_list">
<p>[%|loc%]Common administrative options are linked below; full administrative options are available by selecting Admin beneath List Options in the Left Navigation menu.[%END%]</p>
<div class="item">
<img class="item_icon" src="[% static_content_url %]/icons/subscribe.png" />
<div class="item_content">
<a class="item_title" href="[% path_cgi %]/review/[% list %]">[%|loc%]View or Manage Subscribers[%END%]</a>
<ul>
<li>[%|loc%]View the list of subscribers[%END%]</li>
<li>[%|loc%]Review subscription requests[%END%]</li>
<li>[%|loc%]Add/delete subscribers[%END%]</li>
</ul>
</div>
</div>
<div class="item">
<img class="item_icon" src="[% static_content_url %]/icons/config.png" />
<div class="item_content">
<a class="item_title" href="[% path_cgi %]/admin/[% list %]">[%|loc%]List Configuration[%END%]</a>
<ul>
<li><a href="[% path_cgi %]/edit_list_request/[% list %]/description">[%|loc%]Modify owners or moderators (editors)[%END%]</a></li>
<li><a href="[% path_cgi %]/edit_list_request/[% list %]/description">[%|loc%]Modify list subject and visibility[%END%]</a></li>
<li><a href="[% path_cgi %]/edit_list_request/[% list %]/sending">[%|loc%]Change who can post to this list[%END%]</a></li>
<li><a href="[% path_cgi %]/edit_list_request/[% list %]/command">[%|loc%]Change who can (un)subscribe and view list information[%END%]</a></li>
<li><a href="[% path_cgi %]/admin/[% list %]">[%|loc%]Close this list[%END%]</a></li>
</ul>
</div>
</div>
<div class="item">
<img class="item_icon" src="[% static_content_url %]/icons/arc.png" />
<div class="item_content">
<a class="item_title" href="[% path_cgi %]/arc/[% list %]">[%|loc%]List Archives[%END%]</a>
<ul>
<li><a href="[% path_cgi %]/edit_list_request/[% list %]/archives">[%|loc%]Change settings for who can view archives[%END%]</a></li>
<li><a href="[% path_cgi %]/arc_manage/[% list %]">[%|loc%]Download archives[%END%]</a></li>
</ul>
</div>
</div>
<div class="item">
<img class="item_icon" src="[% static_content_url %]/icons/datasources.png" />
<div class="item_content">
<a class="item_title" href="[% path_cgi %]/edit_list_request/[% list %]/data_source">[%|loc%]Data Sources Configuration[%END%]</a>
<ul>
<li>[%|loc%]Configure data sources (SQL, LDAP, text file) for list membership[%END%]</li>
<li>[%|loc%]Include (nest) Sympa lists[%END%]</li>
</ul>
</div>
</div>
</div>
[% END %]
[% END %]
[% END %]
[% END %]
<!-- end info.tt2 -->
......@@ -48,9 +48,8 @@
[% IF action == 'subindex' %][% SET class = 'menuLinksCurrentPage' %][% ELSE %][% SET class = 'menuLinks' %][% END %]
<li class="[% class %]"><a href="[% path_cgi %]/subindex/[% list %]">[%|loc%]Subscriptions[%END%] ([% mod_subscription %])</a></li>
[% END %]
</ul>
</ul>
</li>
[% END %]
......@@ -71,7 +70,11 @@
<div class="menuInactive2">[%|loc%]Post[%END%]</div><br />
[% END %]
[% IF 0 %][%# Change if you want to display menu item. %]
[% IF action == 'rss_request' %][% SET class = 'menuLinksCurrentPage' %][% ELSE %][% SET class = 'menuLinks' %][% END %]
<li class="[% class %]"><a href="[% path_cgi %]/rss_request/[% list %]" >[%|loc
%]RSS[%END%]</a></li>
[% END %]
[% IF shared == 'exist' %]
[% IF may_d_read %]
......@@ -85,7 +88,11 @@
[% IF may_review %]
[% IF action == 'review' %][% SET class = 'menuLinksCurrentPage' %][% ELSE %][% SET class = 'menuLinks' %][% END %]
<li class="[% class %]"><a href="[% path_cgi %]/review/[% list %]" >[%|loc%]Review members[%END%]</a></li>
[% END %]
[% IF is_owner %]
[% IF action == 'stats' %][% SET class = 'menuLinksCurrentPage' %][% ELSE %][% SET class = 'menuLinks' %][% END %]
<li class="[% class %]"><a href="[% path_cgi %]/stats/[% list %]">[%|loc%]Statistics[%END%]</a></li>
[% END %]
</div>
</div>
......
......@@ -11,7 +11,7 @@
<p>[%|loc(email)%]<strong>%1</strong> is subscribed to the following mailing lists[%END%]</p>
[% END %]
[% IF which %]
[% IF which && which.size %]
[% FOREACH letter IN letters %]
[% IF orderedlist.$letter.0 %]
......@@ -35,17 +35,16 @@
[% END %]
[% END %]
<br />
<br />
[% IF action == 'which' %]
[% IF ! which %]
&nbsp;&nbsp;<span class="color_dark">[%|loc(user.email)%]No subscriptions with address <strong>%1</strong>![%END%]</span>
<br />
[% IF action == 'which' %]
[% IF ! which %]
&nbsp;&nbsp;<span class="color_dark">[%|loc(user.email)%]No subscriptions with address <strong>%1</strong>![%END%]</span>
<br />
[% END %]
[% END %]
[% END %]
[% ELSE %]
<p>[%|loc%]No mailing list available.[%END%]</p>
<p>[%|loc%]No mailing list available.[%END%]</p>
[% END %]
[% IF all_letters.size %]
......
......@@ -8,7 +8,7 @@
<form class="noborder" action="[% path_cgi %]" method="post" name="suspend_request">
[% IF which.size %]
<div class="item_list">
<div class="item_list">
[% FOREACH l = which %]
[% suspended = 0 %]
[% suspendable = 0 %]
......@@ -24,10 +24,17 @@
<div class="item_content">
<a class="item_title" href="[% path_cgi %]/info/[% l.key %]">
[% hidden_head %][% l.key %][% hidden_end %]
[% IF l.value.is_owner %]
<span class="highlighted">[%|loc%](Owner)[%END%]</span>
[% ELSIF l.value.is_editor %]
<span class="highlighted">[%|loc%](Editor)[%END%]</span>
[% 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>
[% END %]
</a>
[% IF suspendable %]
......@@ -51,7 +58,7 @@
<ul>
[% IF l.value.admin %]
[% IF l.value.is_owner %]
<li><a href="[% path_cgi %]/review/[% l.key %]">[%|loc%]Review members[%END%]</a></li>
[% END %]
......@@ -62,13 +69,13 @@
</div>
</div>
[% END %]
</div>
</div>
[% ELSE %]
<p>[%|loc%]No subscription.[%END%]</p>
<p>[%|loc%]No subscription.[%END%]</p>
[% END %]
[% END %]
<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>
......
......@@ -53,7 +53,8 @@
<li class="nolink letter">[%IF letter == 'others'%][%|loc%]others[%END%][%ELSE%][%letter%][%END%]</li>
[% END %]
[% END %]
<li class="MainMenuLinks letter"><a href="[% path_cgi %]/lists" onclick="show('loading'); hide('content-inner');">[%|loc%]All[%END%]</a> </li>
<li class="MainMenuLinks letter">
<a href="[% path_cgi %]/lists[%IF topic%]/[%topic%][%IF subtopic%]/[%subtopic%][%END%][%END%]" onclick="show('loading'); hide('content-inner');">[%|loc%]All[%END%]</a> </li>
</ul>
</nav>
[% END %]
......
......@@ -93,5 +93,5 @@
<p>[%|loc(id.value.beginning_date_counter,id.value.end_date_counter,id.value.variation_counter)%]from %1 to %2: +%3[%END%]</p>
<br>
[% END %]
[% END %]
[%# END %]
<!-- end stats.tt2 -->
......@@ -4966,14 +4966,33 @@ sub do_lists {
$list->{'admin'}{'creation'}{'date_epoch'};
$list_info->{'date'} = $list->{'admin'}{'creation'}{'date'};
$list_info->{'topics'} = $list->{'admin'}{'topics'};
if ($param->{'user'}{'email'}
&& ( $list->am_i('owner', $param->{'user'}{'email'})
|| $list->am_i('editor', $param->{'user'}{'email'}))
and $list->am_i(
'privileged_owner', $param->{'user'}{'email'},
{strict => 1}
)
) {
$list_info->{'is_privileged_owner'} = 1;
$list_info->{'is_owner'} = 1;
# Compat. < 6.2b.2.
$list_info->{'admin'} = 1;
}
if ( $param->{'user'}{'email'}
and $list->am_i('owner', $param->{'user'}{'email'}, {strict => 1})
) {
$list_info->{'is_owner'} = 1;
# Compat. < 6.2b.2.
$list_info->{'admin'} = 1;
}
if ( $param->{'user'}{'email'}
and $list->am_i('editor', $param->{'user'}{'email'})) {
$list_info->{'is_editor'} = 1;
# Compat. < 6.2b.2.
$list_info->{'admin'} = 1;
}
if ( $param->{'user'}{'email'}
&& $list->is_list_member($param->{'user'}{'email'})) {
if ( $param->{'user'}{'email'}
and $list->is_list_member($param->{'user'}{'email'})) {
$list_info->{'is_subscriber'} = 1;
}
 
......@@ -21516,20 +21535,20 @@ sub _set_my_lists_info {
 
$which->{$l}{'subject'} = $list->{'admin'}{'subject'};
$which->{$l}{'host'} = $list->{'admin'}{'host'};
$which->{$l}{'is_owner'} = 1; # New on 6.2b.2.
$which->{$l}{'is_owner'} = 1; # New on 6.2b.2.
# Compat. < 6.2b.1.
$which->{$l}{'info'} = 1;
$which->{$l}{'admin'} = 1;
$which->{$l}{'info'} = 1;
$which->{$l}{'admin'} = 1;
}
foreach my $list (@{$get_which{editor}}) {
my $l = $list->{'name'};
 
$which->{$l}{'subject'} = $list->{'admin'}{'subject'};
$which->{$l}{'host'} = $list->{'admin'}{'host'};
$which->{$l}{'is_editor'} = 1; # New on 6.2b.2.
$which->{$l}{'is_editor'} = 1; # New on 6.2b.2.
# Compat. < 6.2b.1.
$which->{$l}{'info'} = 1;
$which->{$l}{'admin'} = 1;
$which->{$l}{'info'} = 1;
$which->{$l}{'admin'} = 1;
}
}
 
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment