Merge lp:~salgado/launchpad/coc-three-o into lp:launchpad
- coc-three-o
- Merge into devel
Proposed by
Guilherme Salgado
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | not available | ||||
Proposed branch: | lp:~salgado/launchpad/coc-three-o | ||||
Merge into: | lp:launchpad | ||||
Diff against target: | None lines | ||||
To merge this branch: | bzr merge lp:~salgado/launchpad/coc-three-o | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Eleanor Berger (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Guilherme Salgado (salgado) wrote : | # |
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Guilherme Salgado (salgado) wrote : | # |
I should also point that with the exception of the +sign (lib/lp/
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Eleanor Berger (intellectronica) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/lp/registry/browser/codeofconduct.py' |
2 | --- lib/lp/registry/browser/codeofconduct.py 2009-07-17 18:46:25 +0000 |
3 | +++ lib/lp/registry/browser/codeofconduct.py 2009-08-17 15:36:10 +0000 |
4 | @@ -10,8 +10,8 @@ |
5 | 'CodeOfConductSetNavigation', |
6 | 'CodeOfConductContextMenu', |
7 | 'CodeOfConductSetContextMenu', |
8 | - 'SignedCodeOfConductSetContextMenu', |
9 | - 'SignedCodeOfConductContextMenu', |
10 | + 'SignedCodeOfConductSetOverviewMenu', |
11 | + 'SignedCodeOfConductOverviewMenu', |
12 | 'CodeOfConductView', |
13 | 'CodeOfConductDownloadView', |
14 | 'CodeOfConductSetView', |
15 | @@ -27,8 +27,8 @@ |
16 | from zope.component import getUtility |
17 | |
18 | from canonical.launchpad.webapp import ( |
19 | - canonical_url, ContextMenu, Link, enabled_with_permission, |
20 | - GetitemNavigation) |
21 | + ApplicationMenu, canonical_url, ContextMenu, Link, |
22 | + enabled_with_permission, GetitemNavigation) |
23 | from canonical.launchpad.webapp.launchpadform import action, LaunchpadFormView |
24 | from canonical.launchpad.webapp.interfaces import ILaunchBag |
25 | from lp.registry.interfaces.codeofconduct import ( |
26 | @@ -78,9 +78,10 @@ |
27 | return Link('console', text, icon='edit') |
28 | |
29 | |
30 | -class SignedCodeOfConductSetContextMenu(ContextMenu): |
31 | +class SignedCodeOfConductSetOverviewMenu(ApplicationMenu): |
32 | |
33 | usedfor = ISignedCodeOfConductSet |
34 | + facet = 'overview' |
35 | links = ['register'] |
36 | |
37 | def register(self): |
38 | @@ -88,17 +89,18 @@ |
39 | return Link('+new', text, icon='add') |
40 | |
41 | |
42 | -class SignedCodeOfConductContextMenu(ContextMenu): |
43 | +class SignedCodeOfConductOverviewMenu(ApplicationMenu): |
44 | |
45 | usedfor = ISignedCodeOfConduct |
46 | + facet = 'overview' |
47 | links = ['activation', 'adminconsole'] |
48 | |
49 | def activation(self): |
50 | if self.context.active: |
51 | - text = 'Deactivate Signature' |
52 | + text = 'deactivate' |
53 | return Link('+deactivate', text, icon='edit') |
54 | else: |
55 | - text = 'Activate Signature' |
56 | + text = 'activate' |
57 | return Link('+activate', text, icon='edit') |
58 | |
59 | def adminconsole(self): |
60 | @@ -248,6 +250,9 @@ |
61 | return True |
62 | |
63 | |
64 | +# XXX: salgado, bug=414861, 2009-08-17: This view must be converted to a |
65 | +# LaunchpadFormView and define a 'cancel_url' so that the form gets a cancel |
66 | +# link. |
67 | class SignedCodeOfConductActiveView(EditView): |
68 | """Active a SignedCodeOfConduct Entry. |
69 | When activating a signature: |
70 | @@ -287,6 +292,10 @@ |
71 | # XXX: cprov 2005-02-26: |
72 | # How to proceed with no admincomment ? |
73 | |
74 | + |
75 | +# XXX: salgado, bug=414857, 2009-08-17: This view must be converted to a |
76 | +# LaunchpadFormView and define a 'cancel_url' so that the form gets a cancel |
77 | +# link. |
78 | class SignedCodeOfConductDeactiveView(EditView): |
79 | """Deactive a SignedCodeOfConduct Entry. |
80 | When deactivating a signature: |
81 | |
82 | === modified file 'lib/lp/registry/browser/configure.zcml' |
83 | --- lib/lp/registry/browser/configure.zcml 2009-08-14 00:52:28 +0000 |
84 | +++ lib/lp/registry/browser/configure.zcml 2009-08-17 15:36:10 +0000 |
85 | @@ -154,19 +154,17 @@ |
86 | classes=" |
87 | CodeOfConductContextMenu |
88 | CodeOfConductSetContextMenu |
89 | - SignedCodeOfConductContextMenu |
90 | - SignedCodeOfConductSetContextMenu"/> |
91 | + SignedCodeOfConductOverviewMenu |
92 | + SignedCodeOfConductSetOverviewMenu"/> |
93 | <browser:defaultView |
94 | for="lp.registry.interfaces.codeofconduct.ICodeOfConduct" |
95 | name="+index"/> |
96 | - <browser:pages |
97 | + <browser:page |
98 | for="lp.registry.interfaces.codeofconduct.ICodeOfConduct" |
99 | class="lp.registry.browser.codeofconduct.CodeOfConductView" |
100 | - permission="zope.Public"> |
101 | - <browser:page |
102 | - template="../templates/codeofconduct-index.pt" |
103 | - name="+index"/> |
104 | - </browser:pages> |
105 | + permission="zope.Public" |
106 | + template="../templates/codeofconduct-index.pt" |
107 | + name="+index"/> |
108 | <browser:page |
109 | name="+download" |
110 | for="lp.registry.interfaces.codeofconduct.ICodeOfConduct" |
111 | @@ -178,8 +176,7 @@ |
112 | for="lp.registry.interfaces.codeofconduct.ICodeOfConduct" |
113 | class="lp.registry.browser.codeofconduct.SignedCodeOfConductAddView" |
114 | permission="launchpad.AnyPerson" |
115 | - template="../templates/signedcodeofconduct-add.pt"> |
116 | - </browser:page> |
117 | + template="../templates/signedcodeofconduct-add.pt"/> |
118 | <browser:url |
119 | for="lp.registry.interfaces.codeofconduct.ICodeOfConductSet" |
120 | path_expression="string:codeofconduct" |
121 | @@ -246,14 +243,12 @@ |
122 | <browser:defaultView |
123 | for="lp.registry.interfaces.codeofconduct.ISignedCodeOfConductSet" |
124 | name="+index"/> |
125 | - <browser:pages |
126 | + <browser:page |
127 | for="lp.registry.interfaces.codeofconduct.ISignedCodeOfConductSet" |
128 | class="lp.registry.browser.codeofconduct.SignedCodeOfConductAdminView" |
129 | - permission="launchpad.Admin"> |
130 | - <browser:page |
131 | - template="../templates/codeofconduct-admin.pt" |
132 | - name="+index"/> |
133 | - </browser:pages> |
134 | + permission="launchpad.Admin" |
135 | + template="../templates/codeofconduct-admin.pt" |
136 | + name="+index"/> |
137 | <browser:addform |
138 | name="+new" |
139 | for="lp.registry.interfaces.codeofconduct.ISignedCodeOfConductSet" |
140 | |
141 | === modified file 'lib/lp/registry/templates/codeofconduct-admin.pt' |
142 | --- lib/lp/registry/templates/codeofconduct-admin.pt 2009-08-13 21:32:59 +0000 |
143 | +++ lib/lp/registry/templates/codeofconduct-admin.pt 2009-08-17 15:36:10 +0000 |
144 | @@ -3,10 +3,7 @@ |
145 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
146 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
147 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
148 | - xml:lang="en" |
149 | - lang="en" |
150 | - dir="ltr" |
151 | - metal:use-macro="context/@@main_template/master" |
152 | + metal:use-macro="view/macro:page/locationless" |
153 | i18n:domain="launchpad" |
154 | > |
155 | <body> |
156 | @@ -15,7 +12,9 @@ |
157 | <p> |
158 | As an admin, you can |
159 | approve or reject code of conduct signatures, |
160 | - and also register signatures that were not submitted digitally. |
161 | + and also |
162 | + <a tal:attributes="href context/menu:overview/register/url">register |
163 | + signatures</a> that were not submitted digitally. |
164 | </p> |
165 | |
166 | <form name="search" action="." method="POST"> |
167 | |
168 | === modified file 'lib/lp/registry/templates/signedcodeofconduct-acknowledge.pt' |
169 | --- lib/lp/registry/templates/signedcodeofconduct-acknowledge.pt 2009-07-17 17:59:07 +0000 |
170 | +++ lib/lp/registry/templates/signedcodeofconduct-acknowledge.pt 2009-08-17 15:36:10 +0000 |
171 | @@ -3,10 +3,7 @@ |
172 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
173 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
174 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
175 | - xml:lang="en" |
176 | - lang="en" |
177 | - dir="ltr" |
178 | - metal:use-macro="context/@@main_template/master" |
179 | + metal:use-macro="view/macro:page/locationless" |
180 | i18n:domain="launchpad" |
181 | > |
182 | <body> |
183 | |
184 | === modified file 'lib/lp/registry/templates/signedcodeofconduct-activate.pt' |
185 | --- lib/lp/registry/templates/signedcodeofconduct-activate.pt 2009-07-17 17:59:07 +0000 |
186 | +++ lib/lp/registry/templates/signedcodeofconduct-activate.pt 2009-08-17 15:36:10 +0000 |
187 | @@ -3,10 +3,7 @@ |
188 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
189 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
190 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
191 | - xml:lang="en" |
192 | - lang="en" |
193 | - dir="ltr" |
194 | - metal:use-macro="context/@@main_template/master" |
195 | + metal:use-macro="view/macro:page/locationless" |
196 | i18n:domain="launchpad" |
197 | > |
198 | <body> |
199 | |
200 | === modified file 'lib/lp/registry/templates/signedcodeofconduct-add.pt' |
201 | --- lib/lp/registry/templates/signedcodeofconduct-add.pt 2009-07-17 17:59:07 +0000 |
202 | +++ lib/lp/registry/templates/signedcodeofconduct-add.pt 2009-08-17 15:36:10 +0000 |
203 | @@ -3,10 +3,7 @@ |
204 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
205 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
206 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
207 | - xml:lang="en" |
208 | - lang="en" |
209 | - dir="ltr" |
210 | - metal:use-macro="context/@@main_template/master" |
211 | + metal:use-macro="view/macro:page/locationless" |
212 | i18n:domain="launchpad" |
213 | > |
214 | <body> |
215 | |
216 | === modified file 'lib/lp/registry/templates/signedcodeofconduct-deactivate.pt' |
217 | --- lib/lp/registry/templates/signedcodeofconduct-deactivate.pt 2009-07-17 17:59:07 +0000 |
218 | +++ lib/lp/registry/templates/signedcodeofconduct-deactivate.pt 2009-08-17 15:36:10 +0000 |
219 | @@ -3,10 +3,7 @@ |
220 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
221 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
222 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
223 | - xml:lang="en" |
224 | - lang="en" |
225 | - dir="ltr" |
226 | - metal:use-macro="context/@@main_template/master" |
227 | + metal:use-macro="view/macro:page/locationless" |
228 | i18n:domain="launchpad" |
229 | > |
230 | <body> |
231 | |
232 | === modified file 'lib/lp/registry/templates/signedcodeofconduct-index.pt' |
233 | --- lib/lp/registry/templates/signedcodeofconduct-index.pt 2009-07-17 17:59:07 +0000 |
234 | +++ lib/lp/registry/templates/signedcodeofconduct-index.pt 2009-08-17 15:36:10 +0000 |
235 | @@ -3,10 +3,7 @@ |
236 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
237 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
238 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
239 | - xml:lang="en" |
240 | - lang="en" |
241 | - dir="ltr" |
242 | - metal:use-macro="context/@@main_template/master" |
243 | + metal:use-macro="view/macro:page/locationless" |
244 | i18n:domain="launchpad" |
245 | > |
246 | <body> |
247 | @@ -16,13 +13,14 @@ |
248 | |
249 | <h1>Signed code of conduct entry</h1> |
250 | |
251 | - <p><dfn>Display name:</dfn> |
252 | - <span tal:replace="context/displayname">CoC</span></p> |
253 | - |
254 | + <p>Signed <tal:date replace="context/datecreated/fmt:date" /> |
255 | + by <a tal:replace="structure context/owner/fmt:link" />. |
256 | + </p> |
257 | |
258 | <p><dfn>Status:</dfn> |
259 | <span tal:omit-tag="" tal:condition="context/active">Active</span> |
260 | <span tal:omit-tag="" tal:condition="not:context/active">Inactive</span> |
261 | + <a tal:replace="structure context/menu:overview/activation/fmt:icon" /> |
262 | </p> |
263 | |
264 | <p><dfn>Created:</dfn> |
265 | @@ -45,6 +43,11 @@ |
266 | <pre tal:content="context/signedcode">SIGNEDCODE</pre> |
267 | </tal:block> |
268 | |
269 | + <br /> |
270 | + <p> |
271 | + <a tal:attributes="href context/menu:overview/adminconsole/url">Go |
272 | + back to the admin console</a>. |
273 | + </p> |
274 | </div> |
275 | |
276 | </body> |
277 |
= Summary =
Convert a bunch of ISignedCodeOfCo nduct pages to 3.0 /devpad. canonical. com/~salgado/ coc/
Before/after screenshots at https:/
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: registry/ browser/ configure. zcml registry/ templates/ codeofconduct- admin.pt registry/ browser/ codeofconduct. py registry/ templates/ signedcodeofcon duct-deactivate .pt registry/ templates/ signedcodeofcon duct-index. pt registry/ templates/ signedcodeofcon duct-acknowledg e.pt registry/ templates/ signedcodeofcon duct-add. pt registry/ templates/ signedcodeofcon duct-activate. pt
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/