diff --git a/default/Makefile.am b/default/Makefile.am index 9e73a4e20..2f4427c5b 100644 --- a/default/Makefile.am +++ b/default/Makefile.am @@ -321,6 +321,7 @@ nobase_default_DATA = \ web_tt2/remove_arc.tt2 \ web_tt2/rename_list_request.tt2 \ web_tt2/renewpasswd.tt2 \ + web_tt2/report_abuse.tt2 \ web_tt2/requestpasswd.tt2 \ web_tt2/request_topic.tt2 \ web_tt2/reviewbouncing.tt2 \ diff --git a/default/web_tt2/list_menu.tt2 b/default/web_tt2/list_menu.tt2 index a3d0322a4..989d09dde 100644 --- a/default/web_tt2/list_menu.tt2 +++ b/default/web_tt2/list_menu.tt2 @@ -156,4 +156,10 @@ [% PROCESS additional_list_menu_links.tt2 %] [% CATCH %] [% END %] + +[% IF conf.show_report_abuse %] +
  • + [% PROCESS report_abuse.tt2 ~%] +
  • +[% END %] diff --git a/default/web_tt2/report_abuse.tt2 b/default/web_tt2/report_abuse.tt2 new file mode 100644 index 000000000..df22ecdd9 --- /dev/null +++ b/default/web_tt2/report_abuse.tt2 @@ -0,0 +1,3 @@ + +[% | mailto("${conf.listmaster_email}@${domain}",{subject=>"Sympa abuse report: ${list}"}) %][%|loc%]Report abuse[%END%][%END%] + diff --git a/src/cgi/wwsympa.fcgi.in b/src/cgi/wwsympa.fcgi.in index 4fca69e1f..cf41d2307 100644 --- a/src/cgi/wwsympa.fcgi.in +++ b/src/cgi/wwsympa.fcgi.in @@ -1146,6 +1146,7 @@ while ($query = CGI::Fast->new) { 'automatic_list_families', 'spam_protection', 'pictures_max_size', + 'show_report_abuse', ) { $param->{'conf'}{$p} = Conf::get_robot_conf($robot, $p); diff --git a/src/lib/Sympa/ConfDef.pm b/src/lib/Sympa/ConfDef.pm index c684fc9bf..2dc9fb4ec 100644 --- a/src/lib/Sympa/ConfDef.pm +++ b/src/lib/Sympa/ConfDef.pm @@ -2123,6 +2123,15 @@ our @params = ( 'file' => 'wwsympa.conf', 'optional' => 1, }, + { 'name' => 'show_report_abuse', + 'gettext_id' => + 'Add a "Report abuse" link in the side menu of the lists (0|1)', + 'gettext_comment' => + 'The link is a mailto link, you can change that by overriding web_tt2/report_abuse.tt2', + 'default' => '0', + 'file' => 'sympa.conf', + 'optional' => 1, + }, ## Not implemented yet. ## {