1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
<tal:root
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
omit-tag="">
<!-- contact-details macro. -->
<metal:macro define-macro="team-details">
<div class="portlet"
id="contact-details">
<h2 tal:condition="context/is_team">Team details</h2>
<dl id="contact-email">
<dt>Email:</dt>
<dd>
<tal:not_logged_in
condition="view/email_address_visibility/is_login_required">
<a href="+login">Log in</a> for email information.
</tal:not_logged_in>
<tal:no_preferredemail
condition="view/email_address_visibility/are_none_available">
No contact email
</tal:no_preferredemail>
<tal:emails repeat="email view/visible_email_addresses">
<div style="white-space: nowrap">
<img src="/@@/mail" alt="mail" />
<tal:email replace="email">foo2@bar.com</tal:email>
<a tal:replace="structure overview_menu/editemail/fmt:icon"></a>
</div>
</tal:emails>
<a tal:condition="not: view/visible_email_addresses"
tal:replace="structure overview_menu/editemail/fmt:link"></a>
</dd>
</dl>
<div class="two-column-list">
<dl id="team-owner">
<dt>Owner:</dt>
<dd>
<tal:owner replace="structure context/teamowner/fmt:link"/>
</dd>
</dl>
<dl id="team-datecreated">
<dt>Created on:</dt>
<dd>
<span id="created-date"
tal:attributes="title context/datecreated/fmt:datetime"
tal:content="context/datecreated/fmt:date" />
</dd>
</dl>
<dl id="contact-languages">
<dt>Languages:</dt>
<dd>
<tal:languages content="view/languages">English</tal:languages>
<a tal:replace="structure overview_menu/editlanguages/fmt:icon" />
</dd>
</dl>
<dl id="subscription-policy">
<dt>Subscription policy:</dt>
<dd
tal:attributes="title context/subscriptionpolicy/description">
<span tal:replace="context/subscriptionpolicy/title" />
<a class="sprite maybe" href="/+help/team-subscription-policy.html"
target="help"> </a>
</dd>
</dl>
</div>
</div>
</metal:macro>
<!-- contact macro -->
<metal:macro define-macro="contact">
<div class="portlet" id="contact-user"
tal:condition="view/can_contact">
<a href="+contactuser" class="sprite mail"
tal:attributes="title view/contact_link_title"
tal:content="view/specific_contact_text">Contact
this person</a>
</div>
</metal:macro>
<!-- subteam-of macro. -->
<metal:macro define-macro="subteam-of">
<div class="portlet"
id="subteam-of"
tal:condition="view/can_show_subteam_portlet"
>
<h2>Subteam of</h2>
<p tal:condition="not: context/super_teams">
“<span tal:replace="context/displayname"/>”
itself is not a member of any other team.
</p>
<tal:is-a-subteam condition="context/super_teams">
<p>
“<span tal:replace="context/displayname"/>”
is a member of these teams:
</p>
<ul class="iconed">
<li tal:repeat="team context/super_teams">
<tal:block replace="structure team/fmt:link" />
</li>
</ul>
</tal:is-a-subteam>
<ul class="horizontal">
<li
tal:condition="context/super_teams"
tal:replace="structure overview_menu/memberships/fmt:link" />
<li
tal:condition="context/open_membership_invitations"
tal:replace="structure overview_menu/received_invitations/fmt:link" />
</ul>
</div>
</metal:macro>
<metal:macro define-macro="sourcepackagerelease-rows">
<tal:comment replace="nothing">
This macro expects the following variables defined:
:sourcepackagereleases: A list of SourcePackageRelease objects
</tal:comment>
<tr tal:repeat="sourcepackagerelease sourcepackagereleases">
<tal:define define="spr sourcepackagerelease;
distroseries spr/upload_distroseries">
<td>
<a tal:attributes="href string:${distroseries/distribution/fmt:url}/+source/${spr/name}"
class="distrosrcpackage"
tal:content="spr/sourcepackagename/name">
</a>
</td>
<td>
<a tal:attributes="href string:${distroseries/fmt:url}/+source/${spr/name}"
class="distroseriessrcpackage"
tal:content="distroseries/fullseriesname">
</a>
</td>
<td>
<a tal:attributes="href string:${distroseries/distribution/fmt:url}/+source/${spr/name}/${spr/version}"
class="distrosrcpackagerelease"
tal:content="spr/version">
</a>
</td>
<td
tal:attributes="title spr/dateuploaded/fmt:datetime"
tal:content="spr/dateuploaded/fmt:approximatedate">
2005-10-24
</td>
<td>
<tal:needs_building condition="spr/needs_building">
Not yet built
</tal:needs_building>
<tal:built condition="not: spr/needs_building">
<tal:failed repeat="build spr/failed_builds">
<a tal:attributes="href build/fmt:url"
tal:content="build/distro_arch_series/architecturetag" />
</tal:failed>
<tal:not_failed condition="not: spr/failed_builds">
None
</tal:not_failed>
</tal:built>
</td>
<td style="text-align: right">
<a tal:attributes="href string:${spr/distrosourcepackage/fmt:url}/+bugs"
tal:content="spr/open_bugs">
</a>
</td>
<td style="text-align: right">
<a tal:attributes="href string:${spr/sourcepackage/fmt:url}/+questions"
tal:content="spr/open_questions">
</a>
</td>
</tal:define>
</tr>
</metal:macro>
<metal:macro define-macro="private-team-js">
<tal:comment replace="nothing">
This macro inserts the javascript necessary to automatically insert the
private team prefix into a name field. It is here since it is shared in
multiple templates.
</tal:comment>
<tal:script define="private_prefix view/private_prefix|nothing"
condition="private_prefix">
<script type="text/javascript"
tal:content="string:
LPS.use('node', 'event', function(Y) {
// Prepend/remove 'private-' from team name based on visibility
// setting. User can choose to edit it back out, if they wish.
function visibility_on_change(e) {
var visibility = e.target;
var prefix = (visibility.get('value') == 'PRIVATE')
? '$private_prefix' : '';
// XXX: Brad Crittenden 2009-01-30
// bug=http://yuilibrary.com/projects/yui3/ticket/2423101
// Dotted CSS selectors not parsed correctly. Therefore not
// using Y.one().
var name = document.getElementById('field.name');
name.value = prefix + name.value.replace(/^$private_prefix/, '');
};
// Attach the function to the onchange event.
// XXX: Brad Crittenden 2009-01-30
// bug=http://yuilibrary.com/projects/yui3/ticket/2423101
// Dotted CSS selectors not parsed correctly.
Y.on('change', visibility_on_change, document.getElementById('field.visibility'));
});">
</script>
</tal:script>
</metal:macro>
</tal:root>
|