From 64fd94e3c85af86131f34694a188aca380462f99 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 19 May 2015 11:48:57 +0800 Subject: Bug 1160430: Backport bug 69267 to BMO (Add the ability to deactivate keywords) --- template/en/default/admin/keywords/edit.html.tmpl | 11 ++- template/en/default/admin/keywords/list.html.tmpl | 83 ++++++++++------------- template/en/default/bug/field.html.tmpl | 2 +- template/en/default/global/user-error.html.tmpl | 2 +- template/en/default/reports/keywords.html.tmpl | 32 ++++++++- 5 files changed, 78 insertions(+), 52 deletions(-) (limited to 'template/en') diff --git a/template/en/default/admin/keywords/edit.html.tmpl b/template/en/default/admin/keywords/edit.html.tmpl index 65a62290b..d07bf908d 100644 --- a/template/en/default/admin/keywords/edit.html.tmpl +++ b/template/en/default/admin/keywords/edit.html.tmpl @@ -33,14 +33,19 @@
- - - + + + + + + [% END %] - + +
Name: +
Description:
[% 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 c400a2362..9d920036e 100644 --- a/template/en/default/admin/keywords/list.html.tmpl +++ b/template/en/default/admin/keywords/list.html.tmpl @@ -1,68 +1,59 @@ -[%# The contents of this file are subject to the Mozilla Public - # License Version 1.1 (the "License"); you may not use this file - # except in compliance with the License. You may obtain a copy of - # the License at http://www.mozilla.org/MPL/ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. # - # Software distributed under the License is distributed on an "AS - # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - # implied. See the License for the specific language governing - # rights and limitations under the License. - # - # The Original Code is the Bugzilla Bug Tracking System. - # - # The Initial Developer of the Original Code is Netscape Communications - # Corporation. Portions created by Netscape are - # Copyright (C) 1998 Netscape Communications Corporation. All - # Rights Reserved. - # - # Contributor(s): Terry Weissman - # Vlad Dascalu - # Jouni Heikniemi + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. #%] [%# INTERFACE: # 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. #%] -[% PROCESS global/variables.none.tmpl %] - [% PROCESS global/header.html.tmpl title = "Select keyword" + style_urls = ['skins/standard/admin.css'] %] [% columns = [ - { - name => "name" - heading => "Edit keyword..." - contentlink => "editkeywords.cgi?action=edit&id=%%id%%" - }, - { - name => "description" - heading => "Description" - allow_html_content => 1 - }, - { - name => "bug_count" - heading => "$terms.Bugs" - align => "right" - contentlink => "buglist.cgi?keywords=%%name%%" - }, - { - heading => "Action" - content => "Delete" - contentlink => "editkeywords.cgi?action=del&id=%%id%%" - } - ] + { + name => "name" + heading => "Edit keyword..." + contentlink => "editkeywords.cgi?action=edit&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&id=%%id%%" + } +] %] [% PROCESS admin/table.html.tmpl - columns = columns - data = keywords - footer = footer_row + columns = columns + data = keywords + footer = footer_row %]

Add a new keyword

diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl index 1d1e38874..366fe1144 100644 --- a/template/en/default/bug/field.html.tmpl +++ b/template/en/default/bug/field.html.tmpl @@ -243,7 +243,7 @@ + +

+ [% show_inactive_keywords ? "Show" : "Hide" FILTER html %] inactive keywords +

+ [% FOREACH keyword = keywords %] [% IF loop.index % 50 == 0 %] [% IF loop.index != 0 %] @@ -44,16 +71,19 @@
Name DescriptionActive Open [% terms.Bugs %] Total [% terms.Bugs %]
[% keyword.name FILTER html %] [% keyword.description FILTER html_light %][% keyword.is_active ? "Yes" : "No" FILTER html %] [% IF keyword.bug_count > 0 %] -- cgit v1.2.3-24-g4f1b