Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #323 — Add "Report abuse" button to lists side menu #471

Merged
merged 1 commit into from
Nov 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions default/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
6 changes: 6 additions & 0 deletions default/web_tt2/list_menu.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,10 @@
[% PROCESS additional_list_menu_links.tt2 %]
[% CATCH %]
[% END %]

[% IF conf.show_report_abuse %]
<li>
[% PROCESS report_abuse.tt2 ~%]
</li>
[% END %]
<!-- end list_menu.tt2 -->
3 changes: 3 additions & 0 deletions default/web_tt2/report_abuse.tt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!-- report_abuse.tt2 -->
[% | mailto("${conf.listmaster_email}@${domain}",{subject=>"Sympa abuse report: ${list}"}) %][%|loc%]Report abuse[%END%][%END%]
<!-- end report_abuse.tt2 -->
1 change: 1 addition & 0 deletions src/cgi/wwsympa.fcgi.in
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 9 additions & 0 deletions src/lib/Sympa/ConfDef.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
## {
Expand Down