Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
8fd4de36
Commit
8fd4de36
authored
Dec 22, 2013
by
Sunil Joshi
Committed by
Frédéric Buclin
Dec 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 918013: Add Bugzilla messaging system in quips page
r=LpSolit a=justdave
parent
ec486265
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
24 deletions
+27
-24
quips.cgi
quips.cgi
+3
-0
messages.html.tmpl
template/en/default/global/messages.html.tmpl
+24
-0
quips.html.tmpl
template/en/default/list/quips.html.tmpl
+0
-24
No files found.
quips.cgi
View file @
8fd4de36
...
...
@@ -75,6 +75,7 @@ if ($action eq "add") {
undef
,
(
$user
->
id
,
$comment
,
$approved
));
$vars
->
{
'added_quip'
}
=
$comment
;
$vars
->
{
'message'
}
=
'quips_added'
;
}
if
(
$action
eq
'approve'
)
{
...
...
@@ -115,6 +116,7 @@ if ($action eq 'approve') {
join
(
","
,
@unapproved
)
.
")"
)
if
(
$#unapproved
>
-
1
);
$vars
->
{
'approved'
}
=
\
@approved
;
$vars
->
{
'unapproved'
}
=
\
@unapproved
;
$vars
->
{
'message'
}
=
'quips_approved_unapproved'
;
}
if
(
$action
eq
"delete"
)
{
...
...
@@ -130,6 +132,7 @@ if ($action eq "delete") {
"SELECT quip FROM quips WHERE quipid = ?"
,
undef
,
$quipid
);
$dbh
->
do
(
"DELETE FROM quips WHERE quipid = ?"
,
undef
,
$quipid
);
$vars
->
{
'message'
}
=
'quips_deleted'
;
}
print
$cgi
->
header
();
...
...
template/en/default/global/messages.html.tmpl
View file @
8fd4de36
...
...
@@ -798,6 +798,30 @@
or you don't have access to it. The following is a list of the
products you can choose from.
[% ELSIF message_tag == "quips_added" %]
Your quip <em>[% added_quip FILTER html %]</em> has been added.
[% IF Param("quip_list_entry_control") == "moderated" AND
!user.in_group('bz_quip_moderators') %]
It will be used as soon as it gets approved.
[% END %]
[% ELSIF message_tag == "quips_deleted" %]
The quip <em>[% deleted_quip FILTER html %]</em> has been deleted.
[% ELSIF message_tag == "quips_approved_unapproved" %]
[% IF approved.size == 1 %]
One quip
[% ELSE %]
[% approved.size %] quips
[% END %]
approved and
[% IF unapproved.size == 1 %]
one quip
[% ELSE %]
[%+ unapproved.size %] quips
[% END %]
unapproved.
[% ELSIF message_tag == "report_created" %]
OK, you have a new saved report named <em>[% reportname FILTER html %]</em>.
...
...
template/en/default/list/quips.html.tmpl
View file @
8fd4de36
...
...
@@ -19,30 +19,6 @@
header = "Add your own clever headline"
%]
[% IF added_quip %]
<p>
<font color="red">
Your quip '<tt>[% added_quip FILTER html %]</tt>' has been added.
[% IF Param("quip_list_entry_control") == "moderated" AND !user.in_group('bz_quip_moderators') %]
It will be used as soon as it gets approved.
[% END %]
</font>
</p>
[% END %]
[% IF deleted_quip %]
<p>
<font color="red">
The quip '<tt>[% deleted_quip FILTER html %]</tt>' has been deleted.
</font>
</p>
[% END %]
[% IF approved or unapproved %]
<p>[% approved.size %] quips approved and [% unapproved.size %] quips unapproved</p>
[% END %]
<p>
[% terms.Bugzilla %] will pick a random quip for the headline on each
[% terms.bug %] list.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment