[vhffs-dev] [1875] VHFFS public: do not display a link to mailing lists archives if they are not public |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1875
Author: xavier
Date: 2011-07-09 13:09:19 +0200 (Sat, 09 Jul 2011)
Log Message:
-----------
VHFFS public: do not display a link to mailing lists archives if they are not public
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Panel/MailingList.pm
trunk/vhffs-public/templates/content/group-details.tt
Modified: trunk/vhffs-api/src/Vhffs/Panel/MailingList.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/MailingList.pm 2011-07-01 01:21:39 UTC (rev 1874)
+++ trunk/vhffs-api/src/Vhffs/Panel/MailingList.pm 2011-07-09 11:09:19 UTC (rev 1875)
@@ -95,7 +95,7 @@
my ($main, $gid) = @_;
my $dbh = $main->get_db_object;
- my $sql = 'SELECT l.local_part || \'@\' || l.domain AS listname, l.local_part, l.domain, o.description FROM vhffs_ml l INNER JOIN vhffs_object o ON l.object_id = o.object_id WHERE o.owner_gid = ? AND o.state = ?';
+ my $sql = 'SELECT l.local_part || \'@\' || l.domain AS listname, l.local_part, l.domain, l.open_archive, o.description FROM vhffs_ml l INNER JOIN vhffs_object o ON l.object_id = o.object_id WHERE o.owner_gid = ? AND o.state = ?';
return $dbh->selectall_arrayref($sql, { Slice => {} }, $gid, Vhffs::Constants::ACTIVATED);
}
Modified: trunk/vhffs-public/templates/content/group-details.tt
===================================================================
--- trunk/vhffs-public/templates/content/group-details.tt 2011-07-01 01:21:39 UTC (rev 1874)
+++ trunk/vhffs-public/templates/content/group-details.tt 2011-07-09 11:09:19 UTC (rev 1875)
@@ -99,8 +99,12 @@
<ul class="ml-info">
[% FOREACH list = ml.lists %]
<li>
+[% IF list.open_archive %]
<p><a class="list-archives-link" href="[% ml.archives_url %]/[% list.domain %]/[% list.local_part %]">
[% list.listname | mail %]</a></p>
+[% ELSE %]
+<p>[% list.listname | mail %]</p>
+[% END %]
<p>[% list.description %]</p>
</li>
[% END %]