Skip to content

Commit 701e82d

Browse files
committed
Fix sympa-community#323 — Add "Report abuse" button to lists side menu
1 parent 5b8e3bd commit 701e82d

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

default/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ nobase_default_DATA = \
321321
web_tt2/remove_arc.tt2 \
322322
web_tt2/rename_list_request.tt2 \
323323
web_tt2/renewpasswd.tt2 \
324+
web_tt2/report_abuse.tt2 \
324325
web_tt2/requestpasswd.tt2 \
325326
web_tt2/request_topic.tt2 \
326327
web_tt2/reviewbouncing.tt2 \

default/web_tt2/list_menu.tt2

+6
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,10 @@
156156
[% PROCESS additional_list_menu_links.tt2 %]
157157
[% CATCH %]
158158
[% END %]
159+
160+
[% IF conf.show_report_abuse %]
161+
<li>
162+
[% PROCESS report_abuse.tt2 ~%]
163+
</li>
164+
[% END %]
159165
<!-- end list_menu.tt2 -->

default/web_tt2/report_abuse.tt2

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<!-- report_abuse.tt2 -->
2+
[% | mailto("${conf.listmaster_email}@${domain}",{subject=>"Sympa abuse report: ${list}"}) %][%|loc%]Report abuse[%END%][%END%]
3+
<!-- end report_abuse.tt2 -->

src/cgi/wwsympa.fcgi.in

+1
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,7 @@ while ($query = CGI::Fast->new) {
11591159
'automatic_list_families',
11601160
'spam_protection',
11611161
'pictures_max_size',
1162+
'show_report_abuse',
11621163
) {
11631164

11641165
$param->{'conf'}{$p} = Conf::get_robot_conf($robot, $p);

src/lib/Sympa/ConfDef.pm

+9
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,15 @@ our @params = (
21232123
'file' => 'wwsympa.conf',
21242124
'optional' => 1,
21252125
},
2126+
{ 'name' => 'show_report_abuse',
2127+
'gettext_id' =>
2128+
'Add a "Report abuse" link in the side menu of the lists (0|1)',
2129+
'gettext_comment' =>
2130+
'The link is a mailto link, you can change that by overriding web_tt2/report_abuse.tt2',
2131+
'default' => '0',
2132+
'file' => 'sympa.conf',
2133+
'optional' => 1,
2134+
},
21262135

21272136
## Not implemented yet.
21282137
## {

0 commit comments

Comments
 (0)