Merge lp:~salgado/launchpad/team-page-tweaks into lp:launchpad
- team-page-tweaks
- Merge into devel
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~salgado/launchpad/team-page-tweaks |
Merge into: | lp:launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~salgado/launchpad/team-page-tweaks |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Guilherme Salgado (salgado) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Curtis Hovey (sinzui) wrote : | # |
Hi Guilherme.
I really appreciate these fixes. I looked at the UI and we agreed that the top two portlets are guaranteed to display so we can place them in their own <div class="yui-g"> to make them align.
I recorded our IRC conversation inline.
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
...
> @@ -884,11 +878,15 @@
> return Link(target, text, icon='info')
>
> def ppa(self):
> + # XXX: salgado, 2009-09-09, bug=426899: Need to conditionally disable
> + # this link.
> target = '+ppa-packages'
> text = 'PPA Packages'
> return Link(target, text, icon='info')
>
> def projects(self):
> + # XXX: salgado, 2009-09-09, bug=426900: Need to conditionally disable
> + # this link.
We agreed this is harder to do than the time we have allotted to fix these
issues.
...
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
...
> @@ -60,9 +62,10 @@
> Show polls
>
> >>> browser.open('http://
> - >>> print extract_
> - Polls
> - No polls created.
> + >>> from BeautifulSoup import BeautifulSoup, SoupStrainer
> + >>> print BeautifulSoup(
> + ... browser.contents, parseOnlyThese=
> + <BLANKLINE>
We agreed that this is the better way to test:
>>> print find_tag_
None
Preview Diff
1 | === modified file 'lib/lp/registry/browser/configure.zcml' | |||
2 | --- lib/lp/registry/browser/configure.zcml 2009-09-09 09:24:47 +0000 | |||
3 | +++ lib/lp/registry/browser/configure.zcml 2009-09-09 18:50:13 +0000 | |||
4 | @@ -1042,6 +1042,12 @@ | |||
5 | 1042 | template="../templates/team-index.pt"/> | 1042 | template="../templates/team-index.pt"/> |
6 | 1043 | <browser:page | 1043 | <browser:page |
7 | 1044 | for="lp.registry.interfaces.person.ITeam" | 1044 | for="lp.registry.interfaces.person.ITeam" |
8 | 1045 | class="lp.registry.browser.person.TeamIndexView" | ||
9 | 1046 | permission="zope.Public" | ||
10 | 1047 | name="+portlet-polls" | ||
11 | 1048 | template="../templates/team-portlet-polls.pt"/> | ||
12 | 1049 | <browser:page | ||
13 | 1050 | for="lp.registry.interfaces.person.ITeam" | ||
14 | 1045 | permission="zope.Public" | 1051 | permission="zope.Public" |
15 | 1046 | class="lp.registry.browser.team.TeamMapView" | 1052 | class="lp.registry.browser.team.TeamMapView" |
16 | 1047 | name="+map" | 1053 | name="+map" |
17 | 1048 | 1054 | ||
18 | === modified file 'lib/lp/registry/browser/person.py' | |||
19 | --- lib/lp/registry/browser/person.py 2009-09-08 14:07:32 +0000 | |||
20 | +++ lib/lp/registry/browser/person.py 2009-09-09 18:50:13 +0000 | |||
21 | @@ -853,12 +853,6 @@ | |||
22 | 853 | text = 'Change home page' | 853 | text = 'Change home page' |
23 | 854 | return Link(target, text, icon='edit') | 854 | return Link(target, text, icon='edit') |
24 | 855 | 855 | ||
25 | 856 | def related_projects(self): | ||
26 | 857 | target = '+related-software#projects' | ||
27 | 858 | text = 'List related projects' | ||
28 | 859 | summary = 'Projects %s is involved with' % self.context.displayname | ||
29 | 860 | return Link(target, text, summary, icon='product') | ||
30 | 861 | |||
31 | 862 | @enabled_with_permission('launchpad.Edit') | 856 | @enabled_with_permission('launchpad.Edit') |
32 | 863 | def activate_ppa(self): | 857 | def activate_ppa(self): |
33 | 864 | target = "+activate-ppa" | 858 | target = "+activate-ppa" |
34 | @@ -867,14 +861,14 @@ | |||
35 | 867 | 'Package Archive and create a new PPA.') | 861 | 'Package Archive and create a new PPA.') |
36 | 868 | return Link(target, text, summary, icon='add') | 862 | return Link(target, text, summary, icon='add') |
37 | 869 | 863 | ||
39 | 870 | def summary(self): | 864 | def related_software_summary(self): |
40 | 871 | target = '+related-software' | 865 | target = '+related-software' |
41 | 872 | text = 'Summary' | 866 | text = 'Summary' |
42 | 873 | return Link(target, text, icon='info') | 867 | return Link(target, text, icon='info') |
43 | 874 | 868 | ||
44 | 875 | def maintained(self): | 869 | def maintained(self): |
45 | 876 | target = '+maintained-packages' | 870 | target = '+maintained-packages' |
47 | 877 | text = 'Maintained Packages' | 871 | text = 'Maintained packages' |
48 | 878 | enabled = bool(self.person.getLatestMaintainedPackages()) | 872 | enabled = bool(self.person.getLatestMaintainedPackages()) |
49 | 879 | return Link(target, text, enabled=enabled, icon='info') | 873 | return Link(target, text, enabled=enabled, icon='info') |
50 | 880 | 874 | ||
51 | @@ -884,11 +878,15 @@ | |||
52 | 884 | return Link(target, text, icon='info') | 878 | return Link(target, text, icon='info') |
53 | 885 | 879 | ||
54 | 886 | def ppa(self): | 880 | def ppa(self): |
55 | 881 | # XXX: salgado, 2009-09-09, bug=426899: Need to conditionally disable | ||
56 | 882 | # this link. | ||
57 | 887 | target = '+ppa-packages' | 883 | target = '+ppa-packages' |
58 | 888 | text = 'PPA Packages' | 884 | text = 'PPA Packages' |
59 | 889 | return Link(target, text, icon='info') | 885 | return Link(target, text, icon='info') |
60 | 890 | 886 | ||
61 | 891 | def projects(self): | 887 | def projects(self): |
62 | 888 | # XXX: salgado, 2009-09-09, bug=426900: Need to conditionally disable | ||
63 | 889 | # this link. | ||
64 | 892 | target = '+related-projects' | 890 | target = '+related-projects' |
65 | 893 | text = 'Related Projects' | 891 | text = 'Related Projects' |
66 | 894 | return Link(target, text, icon='info') | 892 | return Link(target, text, icon='info') |
67 | @@ -903,7 +901,7 @@ | |||
68 | 903 | 'editircnicknames', 'editjabberids', 'editpassword', | 901 | 'editircnicknames', 'editjabberids', 'editpassword', |
69 | 904 | 'editsshkeys', 'editpgpkeys', 'editlocation', 'memberships', | 902 | 'editsshkeys', 'editpgpkeys', 'editlocation', 'memberships', |
70 | 905 | 'mentoringoffers', 'codesofconduct', 'karma', | 903 | 'mentoringoffers', 'codesofconduct', 'karma', |
72 | 906 | 'administer', 'related_projects', 'activate_ppa', 'maintained', | 904 | 'administer', 'projects', 'activate_ppa', 'maintained', |
73 | 907 | 'view_ppa_subscriptions'] | 905 | 'view_ppa_subscriptions'] |
74 | 908 | 906 | ||
75 | 909 | @enabled_with_permission('launchpad.Edit') | 907 | @enabled_with_permission('launchpad.Edit') |
76 | @@ -1080,7 +1078,8 @@ | |||
77 | 1080 | 1078 | ||
78 | 1081 | usedfor = IPersonRelatedSoftwareMenu | 1079 | usedfor = IPersonRelatedSoftwareMenu |
79 | 1082 | facet = 'overview' | 1080 | facet = 'overview' |
81 | 1083 | links = ('summary', 'maintained', 'uploaded', 'ppa', 'projects') | 1081 | links = ('related_software_summary', 'maintained', 'uploaded', 'ppa', |
82 | 1082 | 'projects') | ||
83 | 1084 | 1083 | ||
84 | 1085 | @property | 1084 | @property |
85 | 1086 | def person(self): | 1085 | def person(self): |
86 | @@ -1297,8 +1296,7 @@ | |||
87 | 1297 | 'editemail', 'configure_mailing_list', 'moderate_mailing_list', | 1296 | 'editemail', 'configure_mailing_list', 'moderate_mailing_list', |
88 | 1298 | 'editlanguages', 'map', 'polls', | 1297 | 'editlanguages', 'map', 'polls', |
89 | 1299 | 'add_poll', 'join', 'leave', 'add_my_teams', 'mentorships', | 1298 | 'add_poll', 'join', 'leave', 'add_my_teams', 'mentorships', |
92 | 1300 | 'reassign', 'related_projects', | 1299 | 'reassign', 'projects', 'activate_ppa', 'maintained', 'ppa'] |
91 | 1301 | 'activate_ppa', 'maintained'] | ||
93 | 1302 | 1300 | ||
94 | 1303 | 1301 | ||
95 | 1304 | class TeamOverviewNavigationMenu(NavigationMenu, TeamMenuMixin): | 1302 | class TeamOverviewNavigationMenu(NavigationMenu, TeamMenuMixin): |
96 | @@ -2780,6 +2778,10 @@ | |||
97 | 2780 | else: | 2778 | else: |
98 | 2781 | raise AssertionError('Unknown group to contact.') | 2779 | raise AssertionError('Unknown group to contact.') |
99 | 2782 | 2780 | ||
100 | 2781 | def should_show_polls_portlet(self): | ||
101 | 2782 | menu = TeamOverviewMenu(self.context) | ||
102 | 2783 | return self.hasCurrentPolls() or menu.add_poll().enabled | ||
103 | 2784 | |||
104 | 2783 | def hasCurrentPolls(self): | 2785 | def hasCurrentPolls(self): |
105 | 2784 | """Return True if this team has any non-closed polls.""" | 2786 | """Return True if this team has any non-closed polls.""" |
106 | 2785 | assert self.context.isTeam() | 2787 | assert self.context.isTeam() |
107 | 2786 | 2788 | ||
108 | === modified file 'lib/lp/registry/stories/foaf/xx-team-home.txt' | |||
109 | --- lib/lp/registry/stories/foaf/xx-team-home.txt 2009-09-01 00:49:34 +0000 | |||
110 | +++ lib/lp/registry/stories/foaf/xx-team-home.txt 2009-09-09 18:50:13 +0000 | |||
111 | @@ -36,8 +36,12 @@ | |||
112 | 36 | 2005-06-06 | 36 | 2005-06-06 |
113 | 37 | 37 | ||
114 | 38 | >>> print extract_text( | 38 | >>> print extract_text( |
115 | 39 | ... find_tag_by_id(browser.contents, 'subscription-policy')) | ||
116 | 40 | Subscription policy: | ||
117 | 41 | Moderated Team | ||
118 | 42 | |||
119 | 43 | >>> print extract_text( | ||
120 | 39 | ... find_tag_by_id(browser.contents, 'membership-summary')) | 44 | ... find_tag_by_id(browser.contents, 'membership-summary')) |
121 | 40 | This is a Moderated Team. | ||
122 | 41 | 10 active members, 1 invited members, 2 proposed members... | 45 | 10 active members, 1 invited members, 2 proposed members... |
123 | 42 | 46 | ||
124 | 43 | >>> print extract_text( | 47 | >>> print extract_text( |
125 | @@ -49,10 +53,8 @@ | |||
126 | 49 | ... find_tag_by_id(browser.contents, 'contact-languages')) | 53 | ... find_tag_by_id(browser.contents, 'contact-languages')) |
127 | 50 | Languages: | 54 | Languages: |
128 | 51 | English | 55 | English |
129 | 52 | Set preferred languages | ||
130 | 53 | 56 | ||
133 | 54 | The polls portlet only shows a link to view all polls if current | 57 | The polls portlet is only shown if current polls exist. |
132 | 55 | polls exist. | ||
134 | 56 | 58 | ||
135 | 57 | >>> print extract_text(find_tag_by_id(browser.contents, 'polls')) | 59 | >>> print extract_text(find_tag_by_id(browser.contents, 'polls')) |
136 | 58 | Polls | 60 | Polls |
137 | @@ -60,9 +62,10 @@ | |||
138 | 60 | Show polls | 62 | Show polls |
139 | 61 | 63 | ||
140 | 62 | >>> browser.open('http://launchpad.dev/~launchpad') | 64 | >>> browser.open('http://launchpad.dev/~launchpad') |
144 | 63 | >>> print extract_text(find_tag_by_id(browser.contents, 'polls')) | 65 | >>> from BeautifulSoup import BeautifulSoup, SoupStrainer |
145 | 64 | Polls | 66 | >>> print BeautifulSoup( |
146 | 65 | No polls created. | 67 | ... browser.contents, parseOnlyThese=SoupStrainer(id='polls')) |
147 | 68 | <BLANKLINE> | ||
148 | 66 | 69 | ||
149 | 67 | The subteam-of portlet is not shown if the team is not a subteam. | 70 | The subteam-of portlet is not shown if the team is not a subteam. |
150 | 68 | 71 | ||
151 | @@ -129,6 +132,7 @@ | |||
152 | 129 | Email: | 132 | Email: |
153 | 130 | Contact this team's email address | 133 | Contact this team's email address |
154 | 131 | support@ubuntu.com | 134 | support@ubuntu.com |
155 | 135 | Set contact address | ||
156 | 132 | 136 | ||
157 | 133 | Member can contact their team even if the team does not have a contact | 137 | Member can contact their team even if the team does not have a contact |
158 | 134 | address: | 138 | address: |
159 | 135 | 139 | ||
160 | === modified file 'lib/lp/registry/templates/person-macros.pt' | |||
161 | --- lib/lp/registry/templates/person-macros.pt 2009-09-01 00:32:01 +0000 | |||
162 | +++ lib/lp/registry/templates/person-macros.pt 2009-09-09 18:50:13 +0000 | |||
163 | @@ -35,8 +35,7 @@ | |||
164 | 35 | <div style="white-space: nowrap"> | 35 | <div style="white-space: nowrap"> |
165 | 36 | <img src="/@@/mail" alt="mail" /> | 36 | <img src="/@@/mail" alt="mail" /> |
166 | 37 | <tal:email replace="email">foo2@bar.com</tal:email> | 37 | <tal:email replace="email">foo2@bar.com</tal:email> |
169 | 38 | <a class="sprite edit" | 38 | <a tal:replace="structure overview_menu/editemail/fmt:icon"></a> |
168 | 39 | tal:attributes="href overview_menu/editemail/fmt:url"></a> | ||
170 | 40 | </div> | 39 | </div> |
171 | 41 | </tal:emails> | 40 | </tal:emails> |
172 | 42 | <a tal:condition="not: view/visible_email_addresses" | 41 | <a tal:condition="not: view/visible_email_addresses" |
173 | @@ -65,9 +64,15 @@ | |||
174 | 65 | <dt>Languages:</dt> | 64 | <dt>Languages:</dt> |
175 | 66 | <dd> | 65 | <dd> |
176 | 67 | <tal:languages content="view/languages">English</tal:languages> | 66 | <tal:languages content="view/languages">English</tal:languages> |
180 | 68 | <a tal:attributes="href overview_menu/editlanguages/fmt:url" | 67 | <a tal:replace="structure overview_menu/editlanguages/fmt:icon" /> |
181 | 69 | class="sprite edit"> | 68 | </dd> |
182 | 70 | <span class="invisible-link">Set preferred languages</span></a> | 69 | </dl> |
183 | 70 | <dl id="subscription-policy"> | ||
184 | 71 | <dt>Subscription policy:</dt> | ||
185 | 72 | <dd> | ||
186 | 73 | <span tal:replace="context/subscriptionpolicy/title" /> | ||
187 | 74 | <img src="/@@/maybe" | ||
188 | 75 | tal:attributes="title context/subscriptionpolicy/description" /> | ||
189 | 71 | </dd> | 76 | </dd> |
190 | 72 | </dl> | 77 | </dl> |
191 | 73 | 78 | ||
192 | 74 | 79 | ||
193 | === modified file 'lib/lp/registry/templates/person-related-software-navlinks.pt' | |||
194 | --- lib/lp/registry/templates/person-related-software-navlinks.pt 2009-09-08 14:37:17 +0000 | |||
195 | +++ lib/lp/registry/templates/person-related-software-navlinks.pt 2009-09-09 18:50:13 +0000 | |||
196 | @@ -6,7 +6,8 @@ | |||
197 | 6 | 6 | ||
198 | 7 | <ul id="navlinks" class="horizontal"> | 7 | <ul id="navlinks" class="horizontal"> |
199 | 8 | <li> | 8 | <li> |
201 | 9 | <a tal:replace="structure view/menu:navigation/summary/render"/></li> | 9 | <a tal:replace="structure |
202 | 10 | view/menu:navigation/related_software_summary/render"/></li> | ||
203 | 10 | <li> | 11 | <li> |
204 | 11 | <a tal:replace="structure view/menu:navigation/maintained/render"/></li> | 12 | <a tal:replace="structure view/menu:navigation/maintained/render"/></li> |
205 | 12 | <li> | 13 | <li> |
206 | 13 | 14 | ||
207 | === modified file 'lib/lp/registry/templates/team-index.pt' | |||
208 | --- lib/lp/registry/templates/team-index.pt 2009-08-28 00:57:32 +0000 | |||
209 | +++ lib/lp/registry/templates/team-index.pt 2009-09-09 18:50:13 +0000 | |||
210 | @@ -43,54 +43,8 @@ | |||
211 | 43 | </ul> | 43 | </ul> |
212 | 44 | 44 | ||
213 | 45 | <tal:menu replace="structure view/@@+global-actions" /> | 45 | <tal:menu replace="structure view/@@+global-actions" /> |
262 | 46 | 46 | <tal:polls replace="structure context/@@+portlet-polls" /> | |
263 | 47 | <div id="polls" class="portlet"> | 47 | |
216 | 48 | <h2>Polls</h2> | ||
217 | 49 | <p tal:condition="not: view/hasCurrentPolls"> | ||
218 | 50 | No polls created. | ||
219 | 51 | </p> | ||
220 | 52 | |||
221 | 53 | <ul tal:condition="view/hasCurrentPolls"> | ||
222 | 54 | <li tal:repeat="poll view/openpolls"> | ||
223 | 55 | <a tal:attributes="href poll/fmt:url"> | ||
224 | 56 | <span tal:replace="poll/title" /> | ||
225 | 57 | </a> - closes | ||
226 | 58 | <span | ||
227 | 59 | tal:attributes="title poll/datecloses/fmt:datetime" | ||
228 | 60 | tal:content="poll/datecloses/fmt:displaydate" />. | ||
229 | 61 | |||
230 | 62 | <tal:block define="user request/lp:person" condition="user"> | ||
231 | 63 | <tal:block condition="python: poll.personVoted(user)"> | ||
232 | 64 | You have | ||
233 | 65 | <span tal:replace="poll/closesIn/fmt:approximateduration" /> | ||
234 | 66 | to change your vote if you wish. | ||
235 | 67 | </tal:block> | ||
236 | 68 | |||
237 | 69 | <tal:block condition="python: not poll.personVoted(user)"> | ||
238 | 70 | You have | ||
239 | 71 | <span tal:replace="poll/closesIn/fmt:approximateduration" /> | ||
240 | 72 | left to vote in this poll. | ||
241 | 73 | </tal:block> | ||
242 | 74 | </tal:block> | ||
243 | 75 | |||
244 | 76 | </li> | ||
245 | 77 | |||
246 | 78 | <li tal:condition="view/userIsOwner" | ||
247 | 79 | tal:repeat="poll view/notyetopenedpolls"> | ||
248 | 80 | <a tal:attributes="href poll/fmt:url"> | ||
249 | 81 | <span tal:replace="poll/title" /> | ||
250 | 82 | </a> - opens | ||
251 | 83 | <span | ||
252 | 84 | tal:attributes="title poll/dateopens/fmt:datetime" | ||
253 | 85 | tal:content="poll/dateopens/fmt:displaydate" /> | ||
254 | 86 | </li> | ||
255 | 87 | </ul> | ||
256 | 88 | |||
257 | 89 | <a tal:condition="view/hasCurrentPolls" | ||
258 | 90 | tal:replace="structure overview_menu/polls/fmt:link" /> | ||
259 | 91 | <a tal:replace="structure overview_menu/add_poll/fmt:link" /> | ||
260 | 92 | |||
261 | 93 | </div> | ||
264 | 94 | </div> | 48 | </div> |
265 | 95 | 49 | ||
266 | 96 | <!-- heading slot. --> | 50 | <!-- heading slot. --> |
267 | @@ -111,6 +65,20 @@ | |||
268 | 111 | class="description" | 65 | class="description" |
269 | 112 | tal:content="structure context/teamdescription/fmt:text-to-html" | 66 | tal:content="structure context/teamdescription/fmt:text-to-html" |
270 | 113 | /> | 67 | /> |
271 | 68 | <ul class="horizontal"> | ||
272 | 69 | <li | ||
273 | 70 | tal:define="link context/menu:overview/projects" | ||
274 | 71 | tal:condition="link/enabled" | ||
275 | 72 | tal:content="structure link/fmt:link" /> | ||
276 | 73 | <li | ||
277 | 74 | tal:define="link context/menu:overview/maintained" | ||
278 | 75 | tal:condition="link/enabled" | ||
279 | 76 | tal:content="structure link/fmt:link" /> | ||
280 | 77 | <li | ||
281 | 78 | tal:define="link context/menu:overview/ppa" | ||
282 | 79 | tal:condition="link/enabled" | ||
283 | 80 | tal:content="structure link/fmt:link" /> | ||
284 | 81 | </ul> | ||
285 | 114 | </div> | 82 | </div> |
286 | 115 | 83 | ||
287 | 116 | <!-- main slot. --> | 84 | <!-- main slot. --> |
288 | @@ -120,16 +88,16 @@ | |||
289 | 120 | <div class="yui-g"> | 88 | <div class="yui-g"> |
290 | 121 | <!-- First portlet column. --> | 89 | <!-- First portlet column. --> |
291 | 122 | <div class="first yui-u"> | 90 | <div class="first yui-u"> |
293 | 123 | <div tal:content="structure context/@@+portlet-membership" /> | 91 | <metal:details use-macro="context/@@+person-macros/team-details" /> |
294 | 124 | <div tal:content="structure context/@@+portlet-ppas" /> | 92 | <div tal:content="structure context/@@+portlet-ppas" /> |
296 | 125 | <metal:subteam-of use-macro="context/@@+person-macros/subteam-of" /> | 93 | <div tal:content="structure context/@@+portlet-mailinglist" /> |
297 | 126 | </div> | 94 | </div> |
298 | 127 | 95 | ||
299 | 128 | <!-- Second portlet column. --> | 96 | <!-- Second portlet column. --> |
300 | 129 | <div class="yui-u"> | 97 | <div class="yui-u"> |
302 | 130 | <metal:details use-macro="context/@@+person-macros/team-details" /> | 98 | <div tal:content="structure context/@@+portlet-membership" /> |
303 | 131 | <div tal:content="structure context/@@+portlet-related-projects" /> | 99 | <div tal:content="structure context/@@+portlet-related-projects" /> |
305 | 132 | <div tal:content="structure context/@@+portlet-mailinglist" /> | 100 | <metal:subteam-of use-macro="context/@@+person-macros/subteam-of" /> |
306 | 133 | </div> | 101 | </div> |
307 | 134 | </div> | 102 | </div> |
308 | 135 | 103 | ||
309 | 136 | 104 | ||
310 | === modified file 'lib/lp/registry/templates/team-portlet-membership.pt' | |||
311 | --- lib/lp/registry/templates/team-portlet-membership.pt 2009-09-03 17:20:42 +0000 | |||
312 | +++ lib/lp/registry/templates/team-portlet-membership.pt 2009-09-09 18:53:47 +0000 | |||
313 | @@ -17,13 +17,6 @@ | |||
314 | 17 | <div id="membership-summary" class="portletBody portletContent" | 17 | <div id="membership-summary" class="portletBody portletContent" |
315 | 18 | style="margin-bottom: 1.5em;"> | 18 | style="margin-bottom: 1.5em;"> |
316 | 19 | <div id="membership-summary"> | 19 | <div id="membership-summary"> |
317 | 20 | This is a | ||
318 | 21 | <span> | ||
319 | 22 | <strong id="subscription-policy" | ||
320 | 23 | tal:content="context/subscriptionpolicy/title" />. | ||
321 | 24 | <img src="/@@/maybe" | ||
322 | 25 | tal:attributes="title context/subscriptionpolicy/description" /> | ||
323 | 26 | </span> | ||
324 | 27 | <div> | 20 | <div> |
325 | 28 | <img src="/@@/team" alt="team" /> | 21 | <img src="/@@/team" alt="team" /> |
326 | 29 | <strong><tal:active content="context/all_member_count" /></strong> | 22 | <strong><tal:active content="context/all_member_count" /></strong> |
327 | @@ -128,4 +121,5 @@ | |||
328 | 128 | </tr> | 121 | </tr> |
329 | 129 | </table> | 122 | </table> |
330 | 130 | </tal:can-view> | 123 | </tal:can-view> |
331 | 124 | </div> | ||
332 | 131 | </tal:root> | 125 | </tal:root> |
333 | 132 | 126 | ||
334 | === added file 'lib/lp/registry/templates/team-portlet-polls.pt' | |||
335 | --- lib/lp/registry/templates/team-portlet-polls.pt 1970-01-01 00:00:00 +0000 | |||
336 | +++ lib/lp/registry/templates/team-portlet-polls.pt 2009-09-09 18:50:13 +0000 | |||
337 | @@ -0,0 +1,56 @@ | |||
338 | 1 | <tal:root | ||
339 | 2 | xmlns:tal="http://xml.zope.org/namespaces/tal" | ||
340 | 3 | xmlns:metal="http://xml.zope.org/namespaces/metal" | ||
341 | 4 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | ||
342 | 5 | omit-tag=""> | ||
343 | 6 | |||
344 | 7 | <div id="polls" class="portlet" | ||
345 | 8 | tal:define="overview_menu context/menu:overview" | ||
346 | 9 | tal:condition="view/should_show_polls_portlet"> | ||
347 | 10 | <h2>Polls</h2> | ||
348 | 11 | <p tal:condition="not: view/hasCurrentPolls"> | ||
349 | 12 | No polls created. | ||
350 | 13 | </p> | ||
351 | 14 | |||
352 | 15 | <ul tal:condition="view/hasCurrentPolls"> | ||
353 | 16 | <li tal:repeat="poll view/openpolls"> | ||
354 | 17 | <a tal:attributes="href poll/fmt:url"> | ||
355 | 18 | <span tal:replace="poll/title" /> | ||
356 | 19 | </a> - closes | ||
357 | 20 | <span | ||
358 | 21 | tal:attributes="title poll/datecloses/fmt:datetime" | ||
359 | 22 | tal:content="poll/datecloses/fmt:displaydate" />. | ||
360 | 23 | |||
361 | 24 | <tal:block define="user request/lp:person" condition="user"> | ||
362 | 25 | <tal:block condition="python: poll.personVoted(user)"> | ||
363 | 26 | You have | ||
364 | 27 | <span tal:replace="poll/closesIn/fmt:approximateduration" /> | ||
365 | 28 | to change your vote if you wish. | ||
366 | 29 | </tal:block> | ||
367 | 30 | |||
368 | 31 | <tal:block condition="python: not poll.personVoted(user)"> | ||
369 | 32 | You have | ||
370 | 33 | <span tal:replace="poll/closesIn/fmt:approximateduration" /> | ||
371 | 34 | left to vote in this poll. | ||
372 | 35 | </tal:block> | ||
373 | 36 | </tal:block> | ||
374 | 37 | |||
375 | 38 | </li> | ||
376 | 39 | |||
377 | 40 | <li tal:condition="view/userIsOwner" | ||
378 | 41 | tal:repeat="poll view/notyetopenedpolls"> | ||
379 | 42 | <a tal:attributes="href poll/fmt:url"> | ||
380 | 43 | <span tal:replace="poll/title" /> | ||
381 | 44 | </a> - opens | ||
382 | 45 | <span | ||
383 | 46 | tal:attributes="title poll/dateopens/fmt:datetime" | ||
384 | 47 | tal:content="poll/dateopens/fmt:displaydate" /> | ||
385 | 48 | </li> | ||
386 | 49 | </ul> | ||
387 | 50 | |||
388 | 51 | <a tal:condition="view/hasCurrentPolls" | ||
389 | 52 | tal:replace="structure overview_menu/polls/fmt:link" /> | ||
390 | 53 | <a tal:replace="structure overview_menu/add_poll/fmt:link" /> | ||
391 | 54 | |||
392 | 55 | </div> | ||
393 | 56 | </tal:root> | ||
394 | 0 | 57 | ||
395 | === modified file 'lib/lp/soyuz/templates/person-portlet-ppas.pt' | |||
396 | --- lib/lp/soyuz/templates/person-portlet-ppas.pt 2009-08-21 15:16:48 +0000 | |||
397 | +++ lib/lp/soyuz/templates/person-portlet-ppas.pt 2009-09-09 18:50:13 +0000 | |||
398 | @@ -15,10 +15,6 @@ | |||
399 | 15 | tal:condition="link/enabled" | 15 | tal:condition="link/enabled" |
400 | 16 | tal:content="structure link/fmt:icon-link" /> | 16 | tal:content="structure link/fmt:icon-link" /> |
401 | 17 | 17 | ||
402 | 18 | <li tal:define="link context/menu:overview/maintained" | ||
403 | 19 | tal:condition="link/enabled" | ||
404 | 20 | tal:replace="structure link/fmt:icon-link" /> | ||
405 | 21 | |||
406 | 22 | <tal:is-person condition="not: context/is_team"> | 18 | <tal:is-person condition="not: context/is_team"> |
407 | 23 | <li tal:define="link context/menu:overview/view_ppa_subscriptions" | 19 | <li tal:define="link context/menu:overview/view_ppa_subscriptions" |
408 | 24 | tal:condition="link/enabled" | 20 | tal:condition="link/enabled" |
409 | 25 | 21 |
= Summary =
Fix a bunch of trivial bugs on the team-index page.
== Proposed fix ==
Fix
Bug 423080
Bug 423085
Bug 423091
Bug 423681
As part of it I moved the polls portlet into a separate file and got rid
of a now-unused menu link from CommonLinksMixin
= 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/ team-index. pt registry/ templates/ team-portlet- polls.pt registry/ stories/ foaf/xx- team-home. txt registry/ browser/ person. py registry/ templates/ person- related- software- navlinks. pt soyuz/templates /person- portlet- ppas.pt registry/ templates/ person- macros. pt registry/ templates/ team-portlet- membership. pt
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ registry/ browser/ person. py interface' (No module
118: [F0401] Unable to import 'lazr.delegates' (No module named
delegates)
119: [F0401] Unable to import 'lazr.config' (No module named config)
120: [F0401] Unable to import 'lazr.restful.
named restful)