Merge lp:~deryck/launchpad/convert-tags-management-page-424383 into lp:launchpad

Proposed by Deryck Hodge
Status: Merged
Merged at revision: not available
Proposed branch: lp:~deryck/launchpad/convert-tags-management-page-424383
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~deryck/launchpad/convert-tags-management-page-424383
Reviewer Review Type Date Requested Status
Paul Hummer (community) ui Approve
Abel Deuring (community) Approve
Review via email: mp+11217@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Deryck Hodge (deryck) wrote :

This branch updates the official tag management page to the 3.0 UI.
These are just mechanical changes. The is tracked as bug 424383.

This is a pretty straight forward conversion, making the changes to the
template, dropping the entry from pagetitles, and adding label and
page_title properties to the view.

A screenshot of the work is here:

http://launchpadlibrarian.net/31318614/tag-management-update.png

I did constrain the management form to a column in the YUI grid, which I
personally liked better than the form spreading out the width of the
page. But if UI reviewers don't like this, I can certainly and easily
go back to the old form layout.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/bugs/browser/bugtarget.py
  lib/canonical/launchpad/pagetitles.py
  lib/lp/bugs/templates/official-bug-target-manage-tags.pt

Revision history for this message
Abel Deuring (adeuring) :
review: Approve
Revision history for this message
Paul Hummer (rockstar) wrote :

Thanks for the screenshot!

review: Approve (ui)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/pagetitles.py'
2--- lib/canonical/launchpad/pagetitles.py 2009-09-04 10:02:37 +0000
3+++ lib/canonical/launchpad/pagetitles.py 2009-09-04 17:03:00 +0000
4@@ -687,8 +687,6 @@
5
6 openidrpconfigset_index = 'OpenID Relying Party Configurations'
7
8-official_bug_target_manage_tags = 'Manage Official Bug Tags'
9-
10 def package_bugs(context, view):
11 """Return the page title bug in a package."""
12 return 'Bugs in %s' % context.name
13
14=== modified file 'lib/lp/bugs/browser/bugtarget.py'
15--- lib/lp/bugs/browser/bugtarget.py 2009-08-24 20:28:33 +0000
16+++ lib/lp/bugs/browser/bugtarget.py 2009-09-04 17:03:00 +0000
17@@ -1292,6 +1292,16 @@
18 schema = IOfficialBugTagTargetPublic
19 custom_widget('official_bug_tags', LargeBugTagsWidget)
20
21+ @property
22+ def label(self):
23+ """The form label."""
24+ return 'Manage official bug tags for %s' % self.context.title
25+
26+ @property
27+ def page_title(self):
28+ """The page title."""
29+ return self.label
30+
31 @action('Save', name='save')
32 def save_action(self, action, data):
33 """Action for saving new official bug tags."""
34
35=== modified file 'lib/lp/bugs/templates/official-bug-target-manage-tags.pt'
36--- lib/lp/bugs/templates/official-bug-target-manage-tags.pt 2009-07-17 17:59:07 +0000
37+++ lib/lp/bugs/templates/official-bug-target-manage-tags.pt 2009-09-04 17:03:00 +0000
38@@ -3,11 +3,8 @@
39 xmlns:tal="http://xml.zope.org/namespaces/tal"
40 xmlns:metal="http://xml.zope.org/namespaces/metal"
41 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
42- xml:lang="en"
43- lang="en"
44- dir="ltr"
45- metal:use-macro="view/macro:page/onecolumn"
46- i18n:domain="malone"
47+ metal:use-macro="view/macro:page/main_only"
48+ i18n:domain="launchpad"
49 >
50 <body>
51 <metal:block fill-slot="head_epilogue">
52@@ -18,92 +15,98 @@
53
54 </metal:block>
55 <div metal:fill-slot="main">
56- <h1 tal:content="CONTEXTS/fmt:pagetitle">Manage Official Bug Tags</h1>
57-
58- <noscript>
59- <div metal:use-macro="context/@@launchpad_form/form" />
60- </noscript>
61-
62- <script type="text/javascript"
63- tal:define="lp_js string:${icingroot}/build"
64- tal:attributes="src string:${lp_js}/bugs/offical_bug_tags.js">
65- </script>
66- <script tal:replace="structure view/tags_js_data" />
67- <script type="text/javascript">
68- YUI().use('event', 'bugs.official_bug_tag_management', function(Y) {
69- Y.on('domready', function(e) {
70- Y.bugs.setup_official_bug_tag_management();
71+ <div class="top-portlet">
72+ <h1 tal:content="view/page_title">Manage Official Bug Tags</h1>
73+ </div>
74+
75+ <div class="yui-g">
76+ <div class="yui-u first">
77+ <noscript>
78+ <div metal:use-macro="context/@@launchpad_form/form" />
79+ </noscript>
80+
81+ <script type="text/javascript"
82+ tal:define="lp_js string:${icingroot}/build"
83+ tal:attributes="src string:${lp_js}/bugs/offical_bug_tags.js">
84+ </script>
85+ <script tal:replace="structure view/tags_js_data" />
86+ <script type="text/javascript">
87+ YUI().use('event', 'bugs.official_bug_tag_management', function(Y) {
88+ Y.on('domready', function(e) {
89+ Y.bugs.setup_official_bug_tag_management();
90+ });
91 });
92- });
93- </script>
94+ </script>
95
96- <table id="layout-table" class="official-tags-layout-table" style="display:none">
97- <tr>
98- <th>Official tags</th>
99- <th />
100- <th>Other tags</th>
101- </tr>
102- <tr>
103- <td id="left-column" class="left-column">
104- <div class="list-scrollable-area">
105- <ul id="official-tags-list">
106- </ul>
107- </div>
108- </td>
109- <td id="middle-column" class="middle-column">
110- <input type="submit" value="&larr;"
111- id="add-official-tags" class="arrow-button"
112- disabled="true" />
113- <br />
114- <input type="submit" value="&rarr;"
115- id="remove-official-tags" class="arrow-button"
116- disabled="true" />
117- <br />
118- <br />
119- <form action="+manage-official-tags" method="post" id="save-form">
120- <input type="hidden" id="field-official_bug_tags" name="field.official_bug_tags" />
121- <input type="hidden" name="field.actions.save" value="Save" />
122- </form>
123- </td>
124- <td id="right-column" class="right-column">
125- <div class="list-scrollable-area">
126- <ul id="other-tags-list">
127- </ul>
128- </div>
129- </td>
130- </tr>
131- <tr>
132- <td class="left-column">
133- <br />
134- <table class="input-field-layout-table">
135- <tr>
136- <td colspan="2">
137- Add a new official tag:
138- </td>
139- </tr>
140- <tr>
141- <td style="width: 100%">
142- <input type="text" id="new-tag-text" style="width: 100%" />
143- </td>
144- <td>
145- <input type="submit" value="Add"
146- id="new-tag-add" disabled="true" />
147- </td>
148- </tr>
149- </table>
150- </td>
151- <td class="middle-column">
152- </td>
153- <td class="right-column">
154- </td>
155- </tr>
156- <tr>
157- <td class="actions" colspan="3">
158- <input type="submit" value="Save" id="save-button" disabled="true" />
159- or <a id="cancel-link" tal:attributes="href view/cancel_url">Cancel</a>
160- </td>
161- </tr>
162- </table>
163+ <table id="layout-table" class="official-tags-layout-table" style="display:none">
164+ <tr>
165+ <th>Official tags</th>
166+ <th />
167+ <th>Other tags</th>
168+ </tr>
169+ <tr>
170+ <td id="left-column" class="left-column">
171+ <div class="list-scrollable-area">
172+ <ul id="official-tags-list">
173+ </ul>
174+ </div>
175+ </td>
176+ <td id="middle-column" class="middle-column">
177+ <input type="submit" value="&larr;"
178+ id="add-official-tags" class="arrow-button"
179+ disabled="true" />
180+ <br />
181+ <input type="submit" value="&rarr;"
182+ id="remove-official-tags" class="arrow-button"
183+ disabled="true" />
184+ <br />
185+ <br />
186+ <form action="+manage-official-tags" method="post" id="save-form">
187+ <input type="hidden" id="field-official_bug_tags" name="field.official_bug_tags" />
188+ <input type="hidden" name="field.actions.save" value="Save" />
189+ </form>
190+ </td>
191+ <td id="right-column" class="right-column">
192+ <div class="list-scrollable-area">
193+ <ul id="other-tags-list">
194+ </ul>
195+ </div>
196+ </td>
197+ </tr>
198+ <tr>
199+ <td class="left-column">
200+ <br />
201+ <table class="input-field-layout-table">
202+ <tr>
203+ <td colspan="2">
204+ Add a new official tag:
205+ </td>
206+ </tr>
207+ <tr>
208+ <td style="width: 100%">
209+ <input type="text" id="new-tag-text" style="width: 100%" />
210+ </td>
211+ <td>
212+ <input type="submit" value="Add"
213+ id="new-tag-add" disabled="true" />
214+ </td>
215+ </tr>
216+ </table>
217+ </td>
218+ <td class="middle-column">
219+ </td>
220+ <td class="right-column">
221+ </td>
222+ </tr>
223+ <tr>
224+ <td class="actions" colspan="3">
225+ <input type="submit" value="Save" id="save-button" disabled="true" />
226+ or <a id="cancel-link" tal:attributes="href view/cancel_url">Cancel</a>
227+ </td>
228+ </tr>
229+ </table>
230+ </div>
231+ </div>
232 </div>
233 </body>
234 </html>