summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@mozilla.com>2015-05-01 06:03:57 +0200
committerDylan William Hardison <dylan@hardison.net>2015-05-01 06:03:57 +0200
commitc3c2eccd987259a577108fd05f57dc809950b0e6 (patch)
tree44cbe5438ce68ae36d8f36c205e2e523dd3dd5db /template/en/default
parent0e68998f22b847d90753daac3808bedc4500cde6 (diff)
downloadbugzilla-c3c2eccd987259a577108fd05f57dc809950b0e6.tar.gz
bugzilla-c3c2eccd987259a577108fd05f57dc809950b0e6.tar.xz
Bug 69267: Add the ability to deactivate keywords
r/a=glob
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/admin/keywords/edit.html.tmpl11
-rw-r--r--template/en/default/admin/keywords/list.html.tmpl56
-rw-r--r--template/en/default/bug/create/create.html.tmpl2
-rw-r--r--template/en/default/bug/edit.html.tmpl2
-rw-r--r--template/en/default/global/user-error.html.tmpl2
-rw-r--r--template/en/default/reports/keywords.html.tmpl73
6 files changed, 94 insertions, 52 deletions
diff --git a/template/en/default/admin/keywords/edit.html.tmpl b/template/en/default/admin/keywords/edit.html.tmpl
index 23158d36f..7e6617a84 100644
--- a/template/en/default/admin/keywords/edit.html.tmpl
+++ b/template/en/default/admin/keywords/edit.html.tmpl
@@ -18,14 +18,19 @@
<form method="post" action="editkeywords.cgi">
<table id="admin_table_edit">
<tr>
- <th>Name:</th>
- <td><input size="64" maxlength="64" name="name"
+ <th><label for="name">Name:</label></th>
+ <td><input size="64" maxlength="64" name="name" id="name"
value="[% keyword.name FILTER html %]" required></td>
</tr>
<tr>
- <th>Description:</th>
+ <th><label for="is_active">Enabled For [% terms.Bugs %]</label></th>
+ <td><input id="is_active" name="is_active" type="checkbox" [% "checked" IF keyword.is_active %]></td>
+ </tr>
+ <tr>
+ <th><label for="decription">Description:</label></th>
<td>
[% INCLUDE global/textarea.html.tmpl
+ id = 'description'
name = 'description'
minrows = 4
cols = 64
diff --git a/template/en/default/admin/keywords/list.html.tmpl b/template/en/default/admin/keywords/list.html.tmpl
index c3f4a5292..9d920036e 100644
--- a/template/en/default/admin/keywords/list.html.tmpl
+++ b/template/en/default/admin/keywords/list.html.tmpl
@@ -10,6 +10,7 @@
# keywords: array keyword objects having the properties:
# - id: number. The ID of the keyword.
# - name: string. The name of the keyword.
+ # - is_active: boolean. true if the keyword can be used.
# - description: string. The description of the keyword.
# - bug_count: number. The number of bugs with the keyword.
#%]
@@ -20,34 +21,39 @@
%]
[% columns = [
- {
- name => "name"
- heading => "Edit keyword..."
- contentlink => "editkeywords.cgi?action=edit&amp;id=%%id%%"
- },
- {
- name => "description"
- heading => "Description"
- allow_html_content => 1
- },
- {
- name => "bug_count"
- heading => "$terms.Bugs"
- class => "right"
- contentlink => "buglist.cgi?keywords=%%name%%"
- },
- {
- heading => "Action"
- content => "Delete"
- contentlink => "editkeywords.cgi?action=del&amp;id=%%id%%"
- }
- ]
+ {
+ name => "name"
+ heading => "Edit keyword..."
+ contentlink => "editkeywords.cgi?action=edit&amp;id=%%id%%"
+ },
+ {
+ name => "description"
+ heading => "Description"
+ allow_html_content => 1
+ },
+ {
+ name => "is_active",
+ heading => "Active",
+ yesno_field => 1
+ },
+ {
+ name => "bug_count"
+ heading => "$terms.Bugs"
+ class => "right"
+ contentlink => "buglist.cgi?keywords=%%name%%"
+ },
+ {
+ heading => "Action"
+ content => "Delete"
+ contentlink => "editkeywords.cgi?action=del&amp;id=%%id%%"
+ }
+]
%]
[% PROCESS admin/table.html.tmpl
- columns = columns
- data = keywords
- footer = footer_row
+ columns = columns
+ data = keywords
+ footer = footer_row
%]
<p><a href="editkeywords.cgi?action=add">Add a new keyword</a></p>
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index 29b17d410..c9a7c7db9 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -537,7 +537,7 @@ TUI_hide_default('attachment_text_field');
<tr>
[% INCLUDE bug/field.html.tmpl
bug = default, field = bug_fields.keywords, editable = 1,
- value = keywords, possible_values = all_keywords,
+ value = keywords, possible_values = active_keywords,
desc_url = "describekeywords.cgi", value_span = 3
%]
</tr>
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index c5cf88f04..5402624f6 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -552,7 +552,7 @@
[% INCLUDE bug/field.html.tmpl
bug = bug, field = bug_fields.keywords, value = bug.keywords
editable = bug.check_can_change_field("keywords", 0, 1),
- desc_url = "describekeywords.cgi", possible_values = all_keywords
+ desc_url = "describekeywords.cgi", possible_values = active_keywords
%]
</tr>
[% END %]
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index c74ba1efc..8306657e3 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -1452,7 +1452,7 @@
Either you mis-typed the name or that user has not yet registered
for a [% terms.Bugzilla %] account.
[% ELSIF class == "Bugzilla::Keyword" %]
- See the list of available <a href="describekeywords.cgi">keywords</a>.
+ See the list of available <a href="describekeywords.cgi?show_inactive_keywords=1">keywords</a>.
[% END %]
[% ELSIF error == "old_password_incorrect" %]
diff --git a/template/en/default/reports/keywords.html.tmpl b/template/en/default/reports/keywords.html.tmpl
index 598979d33..6e7ad0c50 100644
--- a/template/en/default/reports/keywords.html.tmpl
+++ b/template/en/default/reports/keywords.html.tmpl
@@ -18,36 +18,67 @@
title = "$terms.Bugzilla Keyword Descriptions"
style_urls = ['skins/standard/admin.css']
%]
+[% cgi = Bugzilla.cgi %]
+[% show_inactive_keywords = cgi.param("show_inactive_keywords") %]
-<table id="admin_table">
+<script>
+ $(document).ready(function () {
+ var show_inactive_keywords = [% show_inactive_keywords ? "true" : "false" FILTER none %];
+ link = $("#keywords_show_hide"),
+ rows = $("tr.keyword_inactive");
+
+ link.click(function (event) {
+ if (show_inactive_keywords) {
+ show_inactive_keywords = false;
+ rows.show();
+ link.html("Hide inactive keywords");
+ }
+ else {
+ show_inactive_keywords = true;
+ rows.hide();
+ link.html("Show inactive keywords");
+ }
+ event.preventDefault();
+ }).click();
+ });
+</script>
+
+<p>
+ <a href="[% urlbase FILTER html %]?show_inactive_keywords=[% show_inactive_keywords ? "1" : "0" FILTER none %]"
+ id="keywords_show_hide">[% show_inactive_keywords ? "Show" : "Hide" FILTER html %] inactive keywords</a>
+</p>
+
+<table id="admin_table" class="describe_keywords">
<tr class="column_header">
<th>Name</th>
<th>Description</th>
+ <th>Active</th>
<th>Open [% terms.Bugs %]</th>
<th>Total [% terms.Bugs %]</th>
</tr>
[% FOREACH keyword = keywords %]
- <tr id="[% keyword.name FILTER html %]">
- <td>[% keyword.name FILTER html %]</td>
- <td>[% keyword.description FILTER html_light %]</td>
- <td class="center">
- [% IF keyword.bug_count > 0 %]
- <a href="buglist.cgi?keywords=[% keyword.name FILTER uri %]&amp;resolution=---">
- Search</a>
- [% ELSE %]
- none
- [% END %]
- </td>
- <td class="right">
- [% IF keyword.bug_count > 0 %]
- <a href="buglist.cgi?keywords=[% keyword.name FILTER uri %]">
- [% keyword.bug_count %]</a>
- [% ELSE %]
- none
- [% END %]
- </td>
- </tr>
+ <tr id="[% keyword.name FILTER html %]" class="[% keyword.is_active ? "keyword_active" : "keyword_inactive" FILTER html %]">
+ <td>[% keyword.name FILTER html %]</td>
+ <td>[% keyword.description FILTER html_light %]</td>
+ <td>[% keyword.is_active ? "Yes" : "No" FILTER html %]</td>
+ <td class="center">
+ [% IF keyword.bug_count > 0 %]
+ <a href="buglist.cgi?keywords=[% keyword.name FILTER uri %]&amp;resolution=---">
+ Search</a>
+ [% ELSE %]
+ none
+ [% END %]
+ </td>
+ <td class="right">
+ [% IF keyword.bug_count > 0 %]
+ <a href="buglist.cgi?keywords=[% keyword.name FILTER uri %]">
+ [% keyword.bug_count %]</a>
+ [% ELSE %]
+ none
+ [% END %]
+ </td>
+ </tr>
[% END %]
</table>