Merge lp:~rockstar/launchpad/sourcelist-template into lp:launchpad

Proposed by Paul Hummer on 2009-09-21
Status: Merged
Approved by: Brad Crittenden on 2009-09-21
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~rockstar/launchpad/sourcelist-template
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~rockstar/launchpad/sourcelist-template
Reviewer Review Type Date Requested Status
Brad Crittenden (community) release-critical 2009-09-21 Approve on 2009-09-21
Aaron Bentley (community) code 2009-09-21 Approve on 2009-09-21
Review via email: mp+12195@code.launchpad.net
To post a comment you must log in.
Paul Hummer (rockstar) wrote :

Hi Aaron-

  This branch ports two (quite unrelated) templates to 3.0. The first is the
sources-list.pt template. It was missed by the Code team the first pass since
it was still living in canonical/launchpad/templates - My first order of
business was to re-locate it, and then I switched it to use the 3.0 template.
You can see this template at https://code.launchpad.dev/+code-import-list

  The second template is the template found at https://answers.launchpad.net
and was just as straightforward as the previous template.

  There is some lint, but it's unrelated to these changes, and since this
branch is going to be an RC, I thought I'd leave it for now.

 reviewer abentley code
 reviewer bac release-critical

Cheers,
Paul

Aaron Bentley (abentley) :
review: Approve (code)
Brad Crittenden (bac) wrote :

Niiice.

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/answers/browser/question.py'
2--- lib/lp/answers/browser/question.py 2009-09-10 20:49:25 +0000
3+++ lib/lp/answers/browser/question.py 2009-09-21 20:29:08 +0000
4@@ -197,6 +197,9 @@
5 schema = IAnswersFrontPageSearchForm
6 custom_widget('scope', ProjectScopeWidget)
7
8+ page_title = 'Questions and Answers'
9+ label = page_title
10+
11 @property
12 def scope_css_class(self):
13 """The CSS class for used in the scope widget."""
14
15=== modified file 'lib/lp/answers/templates/questions-index.pt'
16--- lib/lp/answers/templates/questions-index.pt 2009-08-13 21:32:59 +0000
17+++ lib/lp/answers/templates/questions-index.pt 2009-09-21 20:42:18 +0000
18@@ -2,76 +2,66 @@
19 xmlns="http://www.w3.org/1999/xhtml"
20 xmlns:tal="http://xml.zope.org/namespaces/tal"
21 xmlns:metal="http://xml.zope.org/namespaces/metal"
22- xml:lang="en"
23- lang="en"
24- dir="ltr"
25- metal:use-macro="view/macro:page/applicationhome">
26+ metal:use-macro="view/macro:page/main_only">
27 <body>
28- <h1 metal:fill-slot="heading">Questions and answers</h1>
29 <div metal:fill-slot="main">
30
31- <ul class="rollover buttons">
32- <li>
33- <a href="/+tour/community-support"
34- tal:attributes="href string:${rooturl}+tour/community-support">
35- <img
36- alt="Take a tour"
37- src="/+icing/but-lrg-takeatour.gif"
38- />
39- </a>
40- </li>
41- </ul>
42- <form class="central" action="" method="get"
43- tal:attributes="action request/URL">
44- <table>
45- <tbody>
46- <tr>
47- <td style="text-align: right;">
48- <input
49- id="text"
50- type="text"
51- name="field.search_text"
52- size="50"
53- />
54- </td>
55- <td>
56- <input
57- tal:replace="structure view/search_action/render"
58- type="submit"
59- value="Find Answers"
60- />
61- </td>
62- </tr>
63- <tr tal:define="target_widget nocall:view/widgets/scope/target_widget">
64- <td tal:attributes="class view/scope_css_class"
65- style="text-align: right;">
66-
67- <tal:scope
68- replace="structure view/widgets/scope/renderScopeOptions" />
69-
70- <tal:input replace="structure target_widget/inputField" />
71-
72- <tal:sort
73- replace="structure view/widgets/sort/hidden" />
74- <tal:status
75- replace="structure view/widgets/status/hidden" />
76- <div class="message"
77- tal:condition="view/scope_error"
78- tal:content="structure view/scope_error">
79- Error message
80- </div>
81- </td>
82- <td tal:content="structure target_widget/chooseLink" />
83- </tr>
84- </tbody>
85- </table>
86- </form>
87- <p id="application-summary">
88- Launchpad Answers helps you build a
89- community support network and knowledge base for
90- your project. Encourage new users to ask questions
91- rather than file bugs! (<a href="https://help.launchpad.net/Answers">Read our guide</a>)
92- </p>
93+ <div class="yui-g">
94+ <p id="application-summary">
95+ Launchpad Answers helps you build a
96+ community support network and knowledge base for
97+ your project. Encourage new users to ask questions
98+ rather than file bugs! (<a href="https://help.launchpad.net/Answers">Read our guide</a>)
99+ </p>
100+ </div>
101+
102+ <div class="yui-g">
103+ <form class="central" action="" method="get"
104+ tal:attributes="action request/URL">
105+ <table>
106+ <tbody>
107+ <tr>
108+ <td style="text-align: right;">
109+ <input
110+ id="text"
111+ type="text"
112+ name="field.search_text"
113+ size="50"
114+ />
115+ </td>
116+ <td>
117+ <input
118+ tal:replace="structure view/search_action/render"
119+ type="submit"
120+ value="Find Answers"
121+ />
122+ </td>
123+ </tr>
124+ <tr tal:define="target_widget nocall:view/widgets/scope/target_widget">
125+ <td tal:attributes="class view/scope_css_class"
126+ style="text-align: right;">
127+
128+ <tal:scope
129+ replace="structure view/widgets/scope/renderScopeOptions" />
130+
131+ <tal:input replace="structure target_widget/inputField" />
132+
133+ <tal:sort
134+ replace="structure view/widgets/sort/hidden" />
135+ <tal:status
136+ replace="structure view/widgets/status/hidden" />
137+ <div class="message"
138+ tal:condition="view/scope_error"
139+ tal:content="structure view/scope_error">
140+ Error message
141+ </div>
142+ </td>
143+ <td tal:content="structure target_widget/chooseLink" />
144+ </tr>
145+ </tbody>
146+ </table>
147+ </form>
148+ </div>
149
150 <div class="columns">
151 <div id="most-active-projects" class="three column left">
152@@ -95,7 +85,7 @@
153 />
154 </table>
155 </div>
156-
157+
158 <div id="latest-questions-solved" class="three column right">
159 <h2>Latest questions solved</h2>
160 <table>
161@@ -132,22 +122,5 @@
162
163 </div><!--main-->
164
165- <metal:help fill-slot="help">
166- <p>This page gives you a quick overview of the recent
167- activity in the Launchpad Answer Tracker.
168- </p>
169- <p>To post a new question, navigate to the project
170- you are having a problem with and use the <emph>Ask a Question</emph>
171- button.
172- </p>
173- <p>You can enter a question id in the search text field to quickly
174- navigate to the question.
175- </p>
176- <p><a href="https://help.launchpad.net/AnswerTrackerDocumentation">Extensive
177- documention</a> for the Answer Tracker application is available in the
178- Help wiki.</p>
179- </metal:help>
180-
181 </body>
182 </html>
183-<!-- 1-0 inprogress needs search of all answers -->
184
185=== modified file 'lib/lp/code/browser/configure.zcml'
186--- lib/lp/code/browser/configure.zcml 2009-09-19 05:01:40 +0000
187+++ lib/lp/code/browser/configure.zcml 2009-09-21 20:04:09 +0000
188@@ -60,7 +60,7 @@
189 for="canonical.launchpad.webapp.interfaces.ILaunchpadApplication"
190 name="+code-import-list"
191 class="lp.registry.browser.productseries.ProductSeriesSourceListView"
192- template="../../../canonical/launchpad/templates/sources-list.pt"
193+ template="../templates/sources-list.pt"
194 permission="zope.Public"
195 />
196 <browser:page
197
198=== renamed file 'lib/canonical/launchpad/templates/sources-list.pt' => 'lib/lp/code/templates/sources-list.pt'
199--- lib/canonical/launchpad/templates/sources-list.pt 2009-07-17 17:59:07 +0000
200+++ lib/lp/code/templates/sources-list.pt 2009-09-21 20:18:02 +0000
201@@ -3,16 +3,11 @@
202 xmlns:tal="http://xml.zope.org/namespaces/tal"
203 xmlns:metal="http://xml.zope.org/namespaces/metal"
204 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
205- xml:lang="en"
206- lang="en"
207- dir="ltr"
208- metal:use-macro="view/macro:page/applicationhome"
209+ metal:use-macro="view/macro:page/main_only"
210 i18n:domain="bazaar">
211
212 <body>
213
214- <h1 metal:fill-slot="heading">Available code imports</h1>
215-
216 <div metal:fill-slot="main" class="visualPadding"
217 tal:define="batch view/batchnav/currentBatch">
218
219
220=== modified file 'lib/lp/registry/browser/productseries.py'
221--- lib/lp/registry/browser/productseries.py 2009-09-15 02:16:19 +0000
222+++ lib/lp/registry/browser/productseries.py 2009-09-21 20:18:02 +0000
223@@ -710,6 +710,9 @@
224 See `ICodeImportSet.getActiveImports` for our definition of running.
225 """
226
227+ page_title = 'Available code imports'
228+ label = page_title
229+
230 def initialize(self):
231 """See `LaunchpadFormView`."""
232 self.text = self.request.get('text')