Merge lp://staging/~intellectronica/launchpad/cve-templates-bug-423061 into lp://staging/launchpad

Proposed by Eleanor Berger
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~intellectronica/launchpad/cve-templates-bug-423061
Merge into: lp://staging/launchpad
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~intellectronica/launchpad/cve-templates-bug-423061
Reviewer Review Type Date Requested Status
Michael Nelson (community) ui Approve
Abel Deuring (community) code Approve
Review via email: mp+11507@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Eleanor Berger (intellectronica) wrote :

This branch converts some of the templates for working with CVE entries to the new LP 3.0 format.

To demo, visit:

https://launchpad.dev/bugs/cve
https://launchpad.dev/bugs/cve/2005-2737
https://launchpad.dev/bugs/cve/+all

Revision history for this message
Abel Deuring (adeuring) wrote :

looks good. Please remove the the remaining <metal:left-portlets> node

review: Approve (code)
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Hi Tom,

So we chatted about replacing the manual links that you've added with standard breadcrumbs on:

https://launchpad.dev/bugs/cve/+all (link: Search CVEs)
https://launchpad.dev/bugs/cve/2005-2737 and (link: Launchpad CVE tracker)

It's up to you - I think it would be good to do, but you said that these pages are very un-important and not worth the extra time investment - your call.

I would recommend completely removing the "CVE-2005-2737 details" portlet at:
https://launchpad.dev/bugs/cve/2005-2737

AIUI, object details should never be in the side-bar, and there's only one piece of info there which is not already in the main content - the link to the details at cve.mitre.org. I think you should just move that link into the main content.

With that removed, ui=me.

<noodles775> intellectronica: I'm just looking at your branch now. You've added some manual links on a few of the pages that seem like they could really be part of normal breadcrumbs... what's the reason for not using standard breadcrumbs?
<intellectronica> noodles775: that's just the way they were before, so i didn't consider the option. i suppose it's not a bad idea, but i also don't want to invest much more time in these templates, since they are not very important

review: Approve (ui)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/browser/cve.py'
2--- lib/lp/bugs/browser/cve.py 2009-09-02 12:37:58 +0000
3+++ lib/lp/bugs/browser/cve.py 2009-09-07 19:43:17 +0000
4@@ -110,6 +110,8 @@
5
6 page_title = label
7
8+ heading = 'Remove links to bug reports'
9+
10
11 class CveSetView:
12
13
14=== modified file 'lib/lp/bugs/templates/buglinktarget-unlinkbugs.pt'
15--- lib/lp/bugs/templates/buglinktarget-unlinkbugs.pt 2009-07-17 17:59:07 +0000
16+++ lib/lp/bugs/templates/buglinktarget-unlinkbugs.pt 2009-09-07 19:43:17 +0000
17@@ -6,16 +6,10 @@
18 lang="en"
19 dir="ltr"
20 metal:define-macro="master"
21- metal:extend-macro="context/@@main_template/master">
22+ metal:extend-macro="view/macro:page/main_only">
23
24 <body>
25
26-<metal:rightportlets fill-slot="portlets_two">
27- <metal:slot define-slot="portlets_two">
28- <div tal:replace="structure context/@@+portlet-bugs" />
29- </metal:slot>
30-</metal:rightportlets>
31-
32 <div metal:fill-slot="main">
33 <tal:nobugs condition="not:context/bugs">
34 <p class="informational message">
35@@ -33,11 +27,6 @@
36 <tal:form condition="view/bugsWithPermission">
37 <div metal:use-macro="context/@@launchpad_form/form">
38 <metal:heading fill-slot="heading">
39- <metal:slot define-slot="heading">
40- <div tal:content="structure context/fmt:link" />
41- <h1 tal:condition="view/label"
42- tal:content="view/label">Heading from ZCML label="xxx"</h1>
43- </metal:slot>
44 </metal:heading>
45
46 <metal:description fill-slot="extra_info">
47
48=== modified file 'lib/lp/bugs/templates/cve-index.pt'
49--- lib/lp/bugs/templates/cve-index.pt 2009-07-17 17:59:07 +0000
50+++ lib/lp/bugs/templates/cve-index.pt 2009-09-07 13:38:16 +0000
51@@ -5,18 +5,14 @@
52 xml:lang="en"
53 lang="en"
54 dir="ltr"
55- metal:use-macro="context/@@main_template/master"
56->
57+ metal:use-macro="view/macro:page/main_side">
58 <body>
59
60-<metal:leftportlets fill-slot="portlets_one">
61+<div metal:fill-slot="side">
62+ <div tal:replace="structure context/@@+portlet-bugs" />
63 <div tal:replace="structure context/@@+portlet-details" />
64 <div tal:replace="structure context/@@+portlet-references" />
65-</metal:leftportlets>
66-
67-<metal:rightportlets fill-slot="portlets_two">
68- <div tal:replace="structure context/@@+portlet-bugs" />
69-</metal:rightportlets>
70+</div>
71
72 <div metal:fill-slot="main">
73
74
75=== modified file 'lib/lp/bugs/templates/cve-linkbug.pt'
76--- lib/lp/bugs/templates/cve-linkbug.pt 2009-07-17 17:59:07 +0000
77+++ lib/lp/bugs/templates/cve-linkbug.pt 2009-09-07 13:44:43 +0000
78@@ -5,19 +5,11 @@
79 xml:lang="en"
80 lang="en"
81 dir="ltr"
82- metal:use-macro="context/@@main_template/master"
83+ metal:use-macro="view/macro:page/main_only"
84 >
85
86 <body>
87
88- <metal:leftportlets fill-slot="portlets_one">
89- <div tal:replace="structure context/@@+portlet-details" />
90- </metal:leftportlets>
91-
92- <metal:rightportlets fill-slot="portlets_two">
93- <div tal:replace="structure context/@@+portlet-bugs" />
94- </metal:rightportlets>
95-
96 <div metal:fill-slot="main">
97 <div metal:use-macro="context/@@launchpad_form/form">
98 <metal:heading fill-slot="heading">
99
100=== modified file 'lib/lp/bugs/templates/cve-portlet-bugs2.pt'
101--- lib/lp/bugs/templates/cve-portlet-bugs2.pt 2009-07-17 17:59:07 +0000
102+++ lib/lp/bugs/templates/cve-portlet-bugs2.pt 2009-09-07 13:38:16 +0000
103@@ -18,6 +18,15 @@
104
105 <p tal:condition="not: links"><i>No related bugs.</i></p>
106 </div>
107+
108+ <ul>
109+ <li>
110+ <a href="+linkbug" class="sprite add">Link to bug</a>
111+ </li>
112+ <li condition="context/bugs">
113+ <a href="+unlinkbug" class="sprite remove">Remove bug link</a>
114+ </li>
115+ </ul>
116
117 </div>
118
119
120=== modified file 'lib/lp/bugs/templates/cve-portlet-references.pt'
121--- lib/lp/bugs/templates/cve-portlet-references.pt 2009-07-17 17:59:07 +0000
122+++ lib/lp/bugs/templates/cve-portlet-references.pt 2009-09-07 13:38:16 +0000
123@@ -8,7 +8,7 @@
124
125 <div class="portletBody portletContent">
126
127- <ul>
128+ <ul style="margin-left: 20px">
129 <li class="webref" tal:repeat="ref context/references">
130 <span tal:replace="ref/source">SOURCE</span>:
131 <a tal:condition="ref/url"
132
133=== modified file 'lib/lp/bugs/templates/cve-unlinkbugs.pt'
134--- lib/lp/bugs/templates/cve-unlinkbugs.pt 2009-07-17 17:59:07 +0000
135+++ lib/lp/bugs/templates/cve-unlinkbugs.pt 2009-09-07 19:43:17 +0000
136@@ -9,19 +9,17 @@
137 >
138
139 <body>
140- <metal:heading fill-slot="heading">
141+ <div metal:fill-slot="extra_info" class="documentDescription">
142 <div><a href="/bugs/cve">CVE reports</a>:</div>
143 <div>
144 <a tal:attributes="href context/fmt:url">CVE
145 <tal:num replace="context/sequence">CVE-1234-5678</tal:num></a>
146 </div>
147- <h1>Remove links to bug reports</h1>
148- </metal:heading>
149-
150- <div metal:fill-slot="extra_info" class="documentDescription">
151- This will <em>remove</em> the link between
152- <span tal:replace="context/displayname">CVE-1999-1234</span> and
153- the selected bug reports.
154+ <div>
155+ This will <em>remove</em> the link between
156+ <span tal:replace="context/displayname">CVE-1999-1234</span> and
157+ the selected bug reports.
158+ </div>
159 </div>
160 </body>
161 </html>
162
163=== modified file 'lib/lp/bugs/templates/cveset-all.pt'
164--- lib/lp/bugs/templates/cveset-all.pt 2009-07-17 17:59:07 +0000
165+++ lib/lp/bugs/templates/cveset-all.pt 2009-09-07 13:38:16 +0000
166@@ -6,7 +6,7 @@
167 xml:lang="en"
168 lang="en"
169 dir="ltr"
170- metal:use-macro="context/@@main_template/master"
171+ metal:use-macro="view/macro:page/main_only"
172 i18n:domain="malone"
173 >
174 <body>
175@@ -15,13 +15,17 @@
176 </metal:heading>
177
178 <metal:leftportlets fill-slot="portlets_one">
179- <div tal:replace="structure context/@@+portlet-details" />
180+
181 </metal:leftportlets>
182
183 <div metal:fill-slot="main"
184 tal:define="batchnav view/getAllBatched;
185 batch batchnav/currentBatch">
186
187+ <div style="margin-top: 1em; margin-bottom: 1em;">
188+ <a href="/bugs/cve">Search CVEs</a>
189+ </div>
190+
191 <tal:navigation replace="structure batchnav/@@+navigation-links-upper" />
192
193 <div tal:repeat="cve batch"
194@@ -29,6 +33,8 @@
195
196 <tal:navigation replace="structure batchnav/@@+navigation-links-lower" />
197
198+ <div tal:replace="structure context/@@+portlet-details" />
199+
200 </div>
201 </body>
202 </html>
203
204=== modified file 'lib/lp/bugs/templates/cveset-index.pt'
205--- lib/lp/bugs/templates/cveset-index.pt 2009-07-17 17:59:07 +0000
206+++ lib/lp/bugs/templates/cveset-index.pt 2009-09-07 13:38:16 +0000
207@@ -6,20 +6,16 @@
208 xml:lang="en"
209 lang="en"
210 dir="ltr"
211- metal:use-macro="context/@@main_template/master"
212+ metal:use-macro="view/macro:page/main_only"
213 i18n:domain="malone"
214 >
215 <body>
216
217-<metal:leftportlets fill-slot="portlets_one">
218- <div tal:replace="structure context/@@+portlet-details" />
219-</metal:leftportlets>
220-
221 <div metal:fill-slot="main">
222
223- <h1>Launchpad CVE tracker</h1>
224+ <h1>Launchpad CVE tracker</h1>
225
226- <form method="post">
227+ <form method="post" style="margin-top: 1em; margin-bottom: 1em;">
228 <div>Find CVEs by number or keywords:</div>
229 <div>
230 <input name="text" size="20" tal:attributes="value view/text" />
231@@ -30,6 +26,10 @@
232 </div>
233 </form>
234
235+ <div style="margin-top: 1em; margin-bottom: 1em;">
236+ <a href="/bugs/cve/+all">Show all registered CVEs</a>
237+ </div>
238+
239 <p class="error message" tal:repeat="notice view/notices"
240 tal:content="notice">
241 Message Goes Here
242@@ -74,6 +74,8 @@
243 tal:replace="structure cve/@@+listing-detailed" />
244 </tal:not_searching>
245
246+ <div tal:replace="structure context/@@+portlet-details" />
247+
248 </div>
249 </body>
250 </html>
251
252=== modified file 'lib/lp/bugs/templates/cveset-portlet-details.pt'
253--- lib/lp/bugs/templates/cveset-portlet-details.pt 2009-07-17 17:59:07 +0000
254+++ lib/lp/bugs/templates/cveset-portlet-details.pt 2009-09-07 13:38:16 +0000
255@@ -3,8 +3,7 @@
256 xmlns:metal="http://xml.zope.org/namespaces/metal"
257 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
258 class="portlet" id="portlet-details">
259- <h2>About the CVE system</h2>
260- <div class="portletBody portletContent">
261+ <div>
262 Launchpad includes full support for
263 <a href="http://cve.mitre.org/">the CVE framework</a>.
264 We update the Launchpad CVE database daily to ensure it includes details of