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
=== modified file 'lib/lp/bugs/browser/cve.py'
--- lib/lp/bugs/browser/cve.py 2009-09-02 12:37:58 +0000
+++ lib/lp/bugs/browser/cve.py 2009-09-07 19:43:17 +0000
@@ -110,6 +110,8 @@
110110
111 page_title = label111 page_title = label
112112
113 heading = 'Remove links to bug reports'
114
113115
114class CveSetView:116class CveSetView:
115117
116118
=== modified file 'lib/lp/bugs/templates/buglinktarget-unlinkbugs.pt'
--- lib/lp/bugs/templates/buglinktarget-unlinkbugs.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/buglinktarget-unlinkbugs.pt 2009-09-07 19:43:17 +0000
@@ -6,16 +6,10 @@
6 lang="en"6 lang="en"
7 dir="ltr"7 dir="ltr"
8 metal:define-macro="master"8 metal:define-macro="master"
9 metal:extend-macro="context/@@main_template/master">9 metal:extend-macro="view/macro:page/main_only">
1010
11<body>11<body>
1212
13<metal:rightportlets fill-slot="portlets_two">
14 <metal:slot define-slot="portlets_two">
15 <div tal:replace="structure context/@@+portlet-bugs" />
16 </metal:slot>
17</metal:rightportlets>
18
19<div metal:fill-slot="main">13<div metal:fill-slot="main">
20 <tal:nobugs condition="not:context/bugs">14 <tal:nobugs condition="not:context/bugs">
21 <p class="informational message">15 <p class="informational message">
@@ -33,11 +27,6 @@
33 <tal:form condition="view/bugsWithPermission">27 <tal:form condition="view/bugsWithPermission">
34 <div metal:use-macro="context/@@launchpad_form/form">28 <div metal:use-macro="context/@@launchpad_form/form">
35 <metal:heading fill-slot="heading">29 <metal:heading fill-slot="heading">
36 <metal:slot define-slot="heading">
37 <div tal:content="structure context/fmt:link" />
38 <h1 tal:condition="view/label"
39 tal:content="view/label">Heading from ZCML label="xxx"</h1>
40 </metal:slot>
41 </metal:heading>30 </metal:heading>
4231
43 <metal:description fill-slot="extra_info">32 <metal:description fill-slot="extra_info">
4433
=== modified file 'lib/lp/bugs/templates/cve-index.pt'
--- lib/lp/bugs/templates/cve-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/cve-index.pt 2009-09-07 13:38:16 +0000
@@ -5,18 +5,14 @@
5 xml:lang="en"5 xml:lang="en"
6 lang="en"6 lang="en"
7 dir="ltr"7 dir="ltr"
8 metal:use-macro="context/@@main_template/master"8 metal:use-macro="view/macro:page/main_side">
9>
10 <body>9 <body>
1110
12<metal:leftportlets fill-slot="portlets_one">11<div metal:fill-slot="side">
12 <div tal:replace="structure context/@@+portlet-bugs" />
13 <div tal:replace="structure context/@@+portlet-details" />13 <div tal:replace="structure context/@@+portlet-details" />
14 <div tal:replace="structure context/@@+portlet-references" />14 <div tal:replace="structure context/@@+portlet-references" />
15</metal:leftportlets>15</div>
16
17<metal:rightportlets fill-slot="portlets_two">
18 <div tal:replace="structure context/@@+portlet-bugs" />
19</metal:rightportlets>
2016
21<div metal:fill-slot="main">17<div metal:fill-slot="main">
2218
2319
=== modified file 'lib/lp/bugs/templates/cve-linkbug.pt'
--- lib/lp/bugs/templates/cve-linkbug.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/cve-linkbug.pt 2009-09-07 13:44:43 +0000
@@ -5,19 +5,11 @@
5 xml:lang="en"5 xml:lang="en"
6 lang="en"6 lang="en"
7 dir="ltr"7 dir="ltr"
8 metal:use-macro="context/@@main_template/master"8 metal:use-macro="view/macro:page/main_only"
9>9>
1010
11<body>11<body>
1212
13 <metal:leftportlets fill-slot="portlets_one">
14 <div tal:replace="structure context/@@+portlet-details" />
15 </metal:leftportlets>
16
17 <metal:rightportlets fill-slot="portlets_two">
18 <div tal:replace="structure context/@@+portlet-bugs" />
19 </metal:rightportlets>
20
21 <div metal:fill-slot="main">13 <div metal:fill-slot="main">
22 <div metal:use-macro="context/@@launchpad_form/form">14 <div metal:use-macro="context/@@launchpad_form/form">
23 <metal:heading fill-slot="heading">15 <metal:heading fill-slot="heading">
2416
=== modified file 'lib/lp/bugs/templates/cve-portlet-bugs2.pt'
--- lib/lp/bugs/templates/cve-portlet-bugs2.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/cve-portlet-bugs2.pt 2009-09-07 13:38:16 +0000
@@ -18,6 +18,15 @@
1818
19 <p tal:condition="not: links"><i>No related bugs.</i></p>19 <p tal:condition="not: links"><i>No related bugs.</i></p>
20 </div>20 </div>
21
22 <ul>
23 <li>
24 <a href="+linkbug" class="sprite add">Link to bug</a>
25 </li>
26 <li condition="context/bugs">
27 <a href="+unlinkbug" class="sprite remove">Remove bug link</a>
28 </li>
29 </ul>
2130
22</div>31</div>
2332
2433
=== modified file 'lib/lp/bugs/templates/cve-portlet-references.pt'
--- lib/lp/bugs/templates/cve-portlet-references.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/cve-portlet-references.pt 2009-09-07 13:38:16 +0000
@@ -8,7 +8,7 @@
88
9 <div class="portletBody portletContent">9 <div class="portletBody portletContent">
1010
11 <ul>11 <ul style="margin-left: 20px">
12 <li class="webref" tal:repeat="ref context/references">12 <li class="webref" tal:repeat="ref context/references">
13 <span tal:replace="ref/source">SOURCE</span>:13 <span tal:replace="ref/source">SOURCE</span>:
14 <a tal:condition="ref/url"14 <a tal:condition="ref/url"
1515
=== modified file 'lib/lp/bugs/templates/cve-unlinkbugs.pt'
--- lib/lp/bugs/templates/cve-unlinkbugs.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/cve-unlinkbugs.pt 2009-09-07 19:43:17 +0000
@@ -9,19 +9,17 @@
9>9>
1010
11<body>11<body>
12 <metal:heading fill-slot="heading">12 <div metal:fill-slot="extra_info" class="documentDescription">
13 <div><a href="/bugs/cve">CVE reports</a>:</div>13 <div><a href="/bugs/cve">CVE reports</a>:</div>
14 <div>14 <div>
15 <a tal:attributes="href context/fmt:url">CVE15 <a tal:attributes="href context/fmt:url">CVE
16 <tal:num replace="context/sequence">CVE-1234-5678</tal:num></a>16 <tal:num replace="context/sequence">CVE-1234-5678</tal:num></a>
17 </div>17 </div>
18 <h1>Remove links to bug reports</h1>18 <div>
19 </metal:heading>19 This will <em>remove</em> the link between
2020 <span tal:replace="context/displayname">CVE-1999-1234</span> and
21 <div metal:fill-slot="extra_info" class="documentDescription">21 the selected bug reports.
22 This will <em>remove</em> the link between22 </div>
23 <span tal:replace="context/displayname">CVE-1999-1234</span> and
24 the selected bug reports.
25 </div>23 </div>
26</body>24</body>
27</html>25</html>
2826
=== modified file 'lib/lp/bugs/templates/cveset-all.pt'
--- lib/lp/bugs/templates/cveset-all.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/cveset-all.pt 2009-09-07 13:38:16 +0000
@@ -6,7 +6,7 @@
6 xml:lang="en"6 xml:lang="en"
7 lang="en"7 lang="en"
8 dir="ltr"8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"9 metal:use-macro="view/macro:page/main_only"
10 i18n:domain="malone"10 i18n:domain="malone"
11>11>
12 <body>12 <body>
@@ -15,13 +15,17 @@
15 </metal:heading>15 </metal:heading>
1616
17<metal:leftportlets fill-slot="portlets_one">17<metal:leftportlets fill-slot="portlets_one">
18 <div tal:replace="structure context/@@+portlet-details" />18
19</metal:leftportlets>19</metal:leftportlets>
2020
21<div metal:fill-slot="main"21<div metal:fill-slot="main"
22 tal:define="batchnav view/getAllBatched;22 tal:define="batchnav view/getAllBatched;
23 batch batchnav/currentBatch">23 batch batchnav/currentBatch">
2424
25 <div style="margin-top: 1em; margin-bottom: 1em;">
26 <a href="/bugs/cve">Search CVEs</a>
27 </div>
28
25 <tal:navigation replace="structure batchnav/@@+navigation-links-upper" />29 <tal:navigation replace="structure batchnav/@@+navigation-links-upper" />
2630
27 <div tal:repeat="cve batch"31 <div tal:repeat="cve batch"
@@ -29,6 +33,8 @@
2933
30 <tal:navigation replace="structure batchnav/@@+navigation-links-lower" />34 <tal:navigation replace="structure batchnav/@@+navigation-links-lower" />
3135
36 <div tal:replace="structure context/@@+portlet-details" />
37
32</div>38</div>
33</body>39</body>
34</html>40</html>
3541
=== modified file 'lib/lp/bugs/templates/cveset-index.pt'
--- lib/lp/bugs/templates/cveset-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/cveset-index.pt 2009-09-07 13:38:16 +0000
@@ -6,20 +6,16 @@
6 xml:lang="en"6 xml:lang="en"
7 lang="en"7 lang="en"
8 dir="ltr"8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"9 metal:use-macro="view/macro:page/main_only"
10 i18n:domain="malone"10 i18n:domain="malone"
11>11>
12 <body>12 <body>
1313
14<metal:leftportlets fill-slot="portlets_one">
15 <div tal:replace="structure context/@@+portlet-details" />
16</metal:leftportlets>
17
18<div metal:fill-slot="main">14<div metal:fill-slot="main">
1915
20 <h1>Launchpad CVE tracker</h1>16 <h1>Launchpad CVE tracker</h1>
2117
22 <form method="post">18 <form method="post" style="margin-top: 1em; margin-bottom: 1em;">
23 <div>Find CVEs by number or keywords:</div>19 <div>Find CVEs by number or keywords:</div>
24 <div>20 <div>
25 <input name="text" size="20" tal:attributes="value view/text" />21 <input name="text" size="20" tal:attributes="value view/text" />
@@ -30,6 +26,10 @@
30 </div>26 </div>
31 </form>27 </form>
3228
29 <div style="margin-top: 1em; margin-bottom: 1em;">
30 <a href="/bugs/cve/+all">Show all registered CVEs</a>
31 </div>
32
33 <p class="error message" tal:repeat="notice view/notices"33 <p class="error message" tal:repeat="notice view/notices"
34 tal:content="notice">34 tal:content="notice">
35 Message Goes Here35 Message Goes Here
@@ -74,6 +74,8 @@
74 tal:replace="structure cve/@@+listing-detailed" />74 tal:replace="structure cve/@@+listing-detailed" />
75 </tal:not_searching>75 </tal:not_searching>
7676
77 <div tal:replace="structure context/@@+portlet-details" />
78
77</div>79</div>
78</body>80</body>
79</html>81</html>
8082
=== modified file 'lib/lp/bugs/templates/cveset-portlet-details.pt'
--- lib/lp/bugs/templates/cveset-portlet-details.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/cveset-portlet-details.pt 2009-09-07 13:38:16 +0000
@@ -3,8 +3,7 @@
3 xmlns:metal="http://xml.zope.org/namespaces/metal"3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5 class="portlet" id="portlet-details">5 class="portlet" id="portlet-details">
6 <h2>About the CVE system</h2>6 <div>
7 <div class="portletBody portletContent">
8 Launchpad includes full support for7 Launchpad includes full support for
9 <a href="http://cve.mitre.org/">the CVE framework</a>.8 <a href="http://cve.mitre.org/">the CVE framework</a>.
10 We update the Launchpad CVE database daily to ensure it includes details of9 We update the Launchpad CVE database daily to ensure it includes details of