Merge lp:~ronnie.vd.c/loco-team-portal/my-teams into lp:loco-team-portal
- my-teams
- Merge into 0.2
Proposed by
Ronnie
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~ronnie.vd.c/loco-team-portal/my-teams | ||||
Merge into: | lp:loco-team-portal | ||||
Diff against target: |
655 lines (+252/-165) 17 files modified
.bzrignore (+2/-0) loco_directory/events/models.py (+4/-0) loco_directory/media/css/newstyle.css (+66/-0) loco_directory/media/css/twidenash.css (+7/-6) loco_directory/media/js/twidenash.js (+0/-140) loco_directory/meetings/models.py (+8/-1) loco_directory/settings.py (+20/-2) loco_directory/teams/management/commands/init-ld.py (+8/-5) loco_directory/teams/models.py (+1/-1) loco_directory/teams/urls.py (+1/-0) loco_directory/teams/views.py (+10/-0) loco_directory/templates/base.html (+0/-3) loco_directory/templates/events/global_event_detail.html (+2/-0) loco_directory/templates/events/global_event_detail.inc.html (+1/-1) loco_directory/templates/index.html (+9/-1) loco_directory/templates/teams/my_teams.html (+103/-0) loco_directory/templates/teams/team_detail.html (+10/-5) |
||||
To merge this branch: | bzr merge lp:~ronnie.vd.c/loco-team-portal/my-teams | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
LoCo Team Portal Developers | Pending | ||
Review via email: mp+54126@code.launchpad.net |
This proposal has been superseded by a proposal from 2011-04-04.
Commit message
Description of the change
Added my Teams page
To post a comment you must log in.
Revision history for this message
Michael Hall (mhall119) wrote : | # |
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2010-08-28 19:27:47 +0000 |
3 | +++ .bzrignore 2011-03-20 15:23:33 +0000 |
4 | @@ -10,3 +10,5 @@ |
5 | local_settings.py |
6 | loco_directory/ubuntu_website |
7 | data |
8 | +bzr_apps |
9 | +loco_directory/media/js/twidenash |
10 | |
11 | === modified file 'loco_directory/events/models.py' |
12 | --- loco_directory/events/models.py 2011-03-16 18:52:30 +0000 |
13 | +++ loco_directory/events/models.py 2011-03-20 15:23:33 +0000 |
14 | @@ -90,6 +90,10 @@ |
15 | |
16 | class TeamEventManager(models.Manager): |
17 | """ manager for a team event """ |
18 | + def next_3_events(self): |
19 | + """ a list with the next 3 events """ |
20 | + return self.filter(date_end__gt=datetime.datetime.now()).order_by('date_end')[:3] |
21 | + |
22 | def next_5_events(self): |
23 | """ a list with the next 5 events """ |
24 | return self.filter(date_end__gt=datetime.datetime.now()).order_by('date_end')[:5] |
25 | |
26 | === modified file 'loco_directory/media/css/newstyle.css' |
27 | --- loco_directory/media/css/newstyle.css 2011-03-15 13:08:01 +0000 |
28 | +++ loco_directory/media/css/newstyle.css 2011-03-20 15:23:33 +0000 |
29 | @@ -479,3 +479,69 @@ |
30 | position: absolute; |
31 | right: 10px; |
32 | } |
33 | + |
34 | +/* My Teams style */ |
35 | +h2.dynamic-width { |
36 | + display: inline-block; |
37 | + margin-bottom: 0; |
38 | +} |
39 | + |
40 | +.resources { |
41 | + font-size: 0.75em; |
42 | + float: right; |
43 | + margin-top: 21px; |
44 | +} |
45 | + |
46 | +.resources a { |
47 | + margin-left: 8px; |
48 | +} |
49 | + |
50 | +.flickr a { |
51 | + display: inline-block; |
52 | + padding: 7px; |
53 | +} |
54 | + |
55 | +.main-content-split { |
56 | + width:450px; |
57 | + margin-top: 15px; |
58 | +} |
59 | + |
60 | +.main-content-split.left { |
61 | + float: left; |
62 | +} |
63 | + |
64 | +.main-content-split.right { |
65 | + float: right; |
66 | +} |
67 | + |
68 | +.main-content-split.left .title { |
69 | + font-size: 0.875em; |
70 | +} |
71 | + |
72 | +.main-content-split.left .new { |
73 | + float: right; |
74 | + font-size: 0.75em; |
75 | +} |
76 | + |
77 | +.event-summary { |
78 | + margin-top:15px; |
79 | +} |
80 | + |
81 | +hr.no-top { |
82 | + margin: 0 0; |
83 | +} |
84 | + |
85 | +img.bottom { |
86 | + vertical-align: bottom; |
87 | +} |
88 | + |
89 | +ul.indent { |
90 | + list-style: none; |
91 | + background-color: #F7F7F7; |
92 | + padding: 2px 2px 2px 15px; |
93 | +} |
94 | + |
95 | +ul.indent li { |
96 | + line-height:1.2em; |
97 | + margin: 0.5em 0; |
98 | +} |
99 | |
100 | === modified file 'loco_directory/media/css/twidenash.css' |
101 | --- loco_directory/media/css/twidenash.css 2010-09-28 17:21:02 +0000 |
102 | +++ loco_directory/media/css/twidenash.css 2011-03-20 15:23:33 +0000 |
103 | @@ -7,30 +7,31 @@ |
104 | */ |
105 | |
106 | |
107 | -ul.twidenash li { |
108 | +.twidenash li { |
109 | list-style-type: none; |
110 | clear: both; |
111 | padding: 3px; |
112 | - font-size: 100%; |
113 | + font-size: 0.75em; |
114 | } |
115 | |
116 | -ul.twidenash li img { |
117 | +.twidenash li img { |
118 | float: left; |
119 | vertical-align: top; |
120 | padding-right: 10px; |
121 | + margin-top: 3px; |
122 | } |
123 | |
124 | -ul.twidenash li .comment { |
125 | +.twidenash li .comment { |
126 | margin-left: 5px; |
127 | display: block; |
128 | overflow: auto; |
129 | } |
130 | |
131 | -ul.twidenash li .nick { |
132 | +.twidenash li .nick { |
133 | font-weight: bold; |
134 | } |
135 | |
136 | -ul.twidenash li .time { |
137 | +.twidenash li .time { |
138 | font-size: 0.75em; |
139 | color: #555; |
140 | } |
141 | |
142 | === added file 'loco_directory/media/img/rss.png' |
143 | Binary files loco_directory/media/img/rss.png 1970-01-01 00:00:00 +0000 and loco_directory/media/img/rss.png 2011-03-20 15:23:33 +0000 differ |
144 | === removed file 'loco_directory/media/js/twidenash.js' |
145 | --- loco_directory/media/js/twidenash.js 2010-09-28 17:21:02 +0000 |
146 | +++ loco_directory/media/js/twidenash.js 1970-01-01 00:00:00 +0000 |
147 | @@ -1,140 +0,0 @@ |
148 | -/* |
149 | -* |
150 | -* Copyright (c) 2010 Stuart Langridge |
151 | -* |
152 | -* Permission is hereby granted, free of charge, to any person obtaining a copy |
153 | -* of this software and associated documentation files (the "Software"), to deal |
154 | -* in the Software without restriction, including without limitation the rights |
155 | -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
156 | -* copies of the Software, and to permit persons to whom the Software is |
157 | -* furnished to do so, subject to the following conditions: |
158 | -* |
159 | -* The above copyright notice and this permission notice shall be included in |
160 | -* all copies or substantial portions of the Software. |
161 | -* |
162 | -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
163 | -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
164 | -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
165 | -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
166 | -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
167 | -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
168 | -* THE SOFTWARE. |
169 | -* |
170 | -* Website: http://code.google.com/p/twidenash/ |
171 | -*/ |
172 | - |
173 | -/* |
174 | -* With modification by Michael Hall for use in loco.ubuntu.com |
175 | -*/ |
176 | - |
177 | -twidenash = { |
178 | - init: function() { |
179 | - if (!twidenash.hashtag) return; |
180 | - // request hashtag search values for both twitter and identica |
181 | - twidenash.callbacks = 0; |
182 | - twidenash.items = []; |
183 | - twidenash.add_script("http://locoteams.status.net/api/search.json?" + |
184 | - "callback=twidenash.cb&rpp=10&q=%23" + twidenash.hashtag); |
185 | - twidenash.add_script("http://identi.ca/api/search.json?" + |
186 | - "callback=twidenash.cb&rpp=10&q=%23" + twidenash.hashtag); |
187 | - twidenash.add_script("http://search.twitter.com/search.json?" + |
188 | - "callback=twidenash.cb&rpp=10&q=%23" + twidenash.hashtag); |
189 | - twidenash.printed = 0; |
190 | - }, |
191 | - add_script: function(url) { |
192 | - var scr = document.createElement("script"); |
193 | - scr.src = url; |
194 | - document.getElementsByTagName("head")[0].appendChild(scr); |
195 | - }, |
196 | - cb: function(data) { |
197 | - for (var i=0; i<data.results.length; i++) { |
198 | - var dupe = false; |
199 | - for (var j=0; j<twidenash.items.length; j++) { |
200 | - // Strip characters that may be specific to networks |
201 | - var comp1 = data.results[i].text.replace(/[♺\!\#\@]/g, ''); |
202 | - var comp2 = twidenash.items[j].text.replace(/[♺\!\#\@]/g, ''); |
203 | - var compdate = Date.parse(data.results[i].created_at); |
204 | - var datediff = Math.abs(Date.parse(data.results[i].created_at) - twidenash.items[j].dt) |
205 | - if (comp1 == comp2 && datediff < 120000) { |
206 | - dupe = true; |
207 | - break; |
208 | - } |
209 | - } |
210 | - if (dupe) continue; |
211 | - twidenash.items.push({ text: data.results[i].text, |
212 | - img: data.results[i].profile_image_url, |
213 | - dt: Date.parse(data.results[i].created_at), |
214 | - user: data.results[i].from_user }) |
215 | - } |
216 | - twidenash.callbacks += 1; |
217 | - if (twidenash.callbacks == 2) { |
218 | - twidenash.items.sort(function(a,b) { return b.dt - a.dt }); |
219 | - var ul = document.createElement("ul"); |
220 | - ul.className = "twidenash"; |
221 | - for (i=0; i<twidenash.items.length && twidenash.printed < 5; i++) { |
222 | - var li = document.createElement("li"); |
223 | - var img = document.createElement("img"); |
224 | - img.src = twidenash.items[i].img; |
225 | - img.width = 48; |
226 | - var relative_to = (arguments.length > 1) ? arguments[1] : new Date(); |
227 | - var delta = parseInt((relative_to.getTime() - twidenash.items[i].dt) / 1000); |
228 | - var pluralize = function (singular, n) { |
229 | - return '' + n + ' ' + singular + (n == 1 ? '' : 's'); |
230 | - }; |
231 | - if(delta < 60) { |
232 | - date_msg = 'less than a minute ago '; |
233 | - } else if(delta < (45*60)) { |
234 | - date_msg = 'about ' + pluralize("minute", parseInt(delta / 60)) + ' ago '; |
235 | - } else if(delta < (24*60*60)) { |
236 | - date_msg = 'about ' + pluralize("hour", parseInt(delta / 3600)) + ' ago '; |
237 | - } else { |
238 | - date_msg = 'about ' + pluralize("day", parseInt(delta / 86400)) + ' ago '; |
239 | - } |
240 | - var span = document.createElement("span"); |
241 | - span.className = 'comment'; |
242 | - var nick = document.createElement("span"); |
243 | - nick.className = 'nick'; |
244 | - nick.appendChild(document.createTextNode(twidenash.items[i].user)); |
245 | - var time = document.createElement("span"); |
246 | - time.className = 'time'; |
247 | - time.appendChild(document.createTextNode(" ( "+ date_msg +" ) ")); |
248 | - |
249 | - var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi; |
250 | - span.innerHTML = twidenash.items[i].text.replace(exp,"<a href='$1' target='_blank'>$1</a>"); |
251 | - li.appendChild(img); |
252 | - li.appendChild(nick); |
253 | - li.appendChild(time); |
254 | - li.appendChild(span); |
255 | - ul.appendChild(li); |
256 | - twidenash.printed++; |
257 | - } |
258 | - twidenash.scriptelement.parentNode.insertBefore(ul, twidenash.scriptelement); |
259 | - } |
260 | - }, |
261 | - cache_scriptname: function() { |
262 | - // called before page load so we can find our own name |
263 | - var scr = document.getElementsByTagName("script"); |
264 | - var url = scr[scr.length-1].getAttribute("src"); |
265 | - if (!url) { |
266 | - var twidenash_script = document.getElementById("twidenash_script"); |
267 | - if (twidenash_script) url = twidenash_script.getAttribute("src"); |
268 | - } |
269 | - if (url && url.lastIndexOf('?') != -1) { |
270 | - twidenash.hashtag = url.substr(url.lastIndexOf('?')+1); |
271 | - if (twidenash_script) { |
272 | - twidenash.scriptelement = twidenash_script; |
273 | - } else { |
274 | - twidenash.scriptelement = scr[scr.length-1]; |
275 | - } |
276 | - } |
277 | - } |
278 | -}; |
279 | -(function(i) {var u =navigator.userAgent;var e=/*@cc_on!@*/false; var st = |
280 | -setTimeout;if(/webkit/i.test(u)){st(function(){var dr=document.readyState; |
281 | -if(dr=="loaded"||dr=="complete"){i()}else{st(arguments.callee,10);}},10);} |
282 | -else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){ |
283 | -document.addEventListener("DOMContentLoaded",i,false); } else if(e){ ( |
284 | -function(){var t=document.createElement('doc:rdy');try{t.doScroll('left'); |
285 | -i();t=null;}catch(e){st(arguments.callee,0);}})();}else{window.onload=i;}})(twidenash.init); |
286 | -twidenash.cache_scriptname(); |
287 | - |
288 | |
289 | === modified file 'loco_directory/meetings/models.py' |
290 | --- loco_directory/meetings/models.py 2011-03-18 13:37:13 +0000 |
291 | +++ loco_directory/meetings/models.py 2011-03-20 15:23:33 +0000 |
292 | @@ -38,7 +38,14 @@ |
293 | |
294 | class TeamMeetingManager(models.Manager): |
295 | """ manager for a team event """ |
296 | - |
297 | + def next_3_meetings(self): |
298 | + """ a list with the next 3 team meetings """ |
299 | + return self.next_meetings()[:3] |
300 | + |
301 | + def next_5_meetings(self): |
302 | + """ a list with the next 5 team meetings """ |
303 | + return self.next_meetings()[:5] |
304 | + |
305 | def next_meetings(self): |
306 | """ a list with all upcoming team meetings """ |
307 | return self.filter(date_end__gt=datetime.datetime.now()).order_by('date_end') |
308 | |
309 | === modified file 'loco_directory/settings.py' |
310 | --- loco_directory/settings.py 2010-12-07 21:42:01 +0000 |
311 | +++ loco_directory/settings.py 2011-03-20 15:23:33 +0000 |
312 | @@ -113,7 +113,7 @@ |
313 | ubuntu_website.TEMPLATE_DIR, |
314 | ) |
315 | |
316 | -INSTALLED_APPS = ( |
317 | +INSTALLED_APPS = [ |
318 | 'django.contrib.auth', |
319 | 'django.contrib.contenttypes', |
320 | 'django.contrib.sessions', |
321 | @@ -126,7 +126,7 @@ |
322 | 'userprofiles', |
323 | 'django_openid_auth', |
324 | 'south', |
325 | -) |
326 | +] |
327 | |
328 | AUTHENTICATION_BACKENDS = ( |
329 | 'django_openid_auth.auth.OpenIDBackend', |
330 | @@ -159,6 +159,24 @@ |
331 | |
332 | FLICKR_API_KEY = '8c969a1e8a49629bb89b411930ab1cc8' |
333 | |
334 | +# Manage apps from bzr branches |
335 | +try: |
336 | + import bzr_apps |
337 | + INSTALLED_APPS.append('bzr_apps') |
338 | +except: |
339 | + pass |
340 | + |
341 | +BZR_APPS = { |
342 | + ## ubuntu-django-foundations app management |
343 | + 'bzr_apps': ('bzr+ssh://bazaar.launchpad.net/%2Bbranch/ubuntu-django-foundations/bzr-apps/', '3'), |
344 | + |
345 | + ## ubuntu-website supplied templates and styles |
346 | + 'ubuntu_website': ('bzr+ssh://bazaar.launchpad.net/~ubuntu-community-webthemes/ubuntu-community-webthemes/light-django-theme', '32'), |
347 | + |
348 | + ## twidenash supplied microblog embedding javascript |
349 | + 'media/js/twidenash': ('bzr+ssh://bazaar.launchpad.net/~django-foundations-dev/twidenash/2.0/', '3'), |
350 | +} |
351 | + |
352 | import logging |
353 | try: |
354 | from local_settings import * |
355 | |
356 | === modified file 'loco_directory/teams/management/commands/init-ld.py' |
357 | --- loco_directory/teams/management/commands/init-ld.py 2011-03-15 13:08:01 +0000 |
358 | +++ loco_directory/teams/management/commands/init-ld.py 2011-03-20 15:23:33 +0000 |
359 | @@ -44,11 +44,14 @@ |
360 | else: |
361 | print " * Creating jquery symlinks: not necessary." |
362 | |
363 | - print " * Adding ubuntu_website media:", |
364 | - if os.path.isdir(os.path.join(path, "ubuntu_website")): |
365 | + print " * Adding Bzr Apps:", |
366 | + if os.path.isdir(os.path.join(path, "bzr_apps", ".bzr")): |
367 | print "not necessary." |
368 | else: |
369 | - subprocess.call(["bzr", "branch", "-q", |
370 | - "lp:ubuntu-community-webthemes/light-django-theme", |
371 | - "ubuntu_website"]) |
372 | + subprocess.call(["bzr", "branch", "-q", "--use-existing-dir", |
373 | + "lp:ubuntu-django-foundations/bzr-apps", |
374 | + "bzr_apps"]) |
375 | print "added." |
376 | + |
377 | + print " * Pulling Bzr Apps:", |
378 | + subprocess.call(["./manage.py", "pullapps"]) |
379 | |
380 | === modified file 'loco_directory/teams/models.py' |
381 | --- loco_directory/teams/models.py 2011-01-18 20:49:15 +0000 |
382 | +++ loco_directory/teams/models.py 2011-03-20 15:23:33 +0000 |
383 | @@ -128,6 +128,6 @@ |
384 | if len(events_and_meetings) > 5: |
385 | events_and_meetings = events_and_meetings[:5] |
386 | return events_and_meetings |
387 | - |
388 | + |
389 | def teams_without_country(): |
390 | return Team.objects.filter(countries__isnull=True) |
391 | |
392 | === modified file 'loco_directory/teams/urls.py' |
393 | --- loco_directory/teams/urls.py 2011-02-17 21:16:56 +0000 |
394 | +++ loco_directory/teams/urls.py 2011-03-20 15:23:33 +0000 |
395 | @@ -2,6 +2,7 @@ |
396 | |
397 | urlpatterns = patterns('', |
398 | url(r'^$', 'teams.views.team_list', name='team-list'), |
399 | + url(r'^me$', 'teams.views.my_teams', name='my-teams'), |
400 | url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/edit$', 'teams.views.team_edit', name='team-edit'), |
401 | url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/merge/(?P<other_team_slug>[a-zA-Z0-9\-\.\+?]+)/$', 'teams.views.team_merge', name='team-merge'), |
402 | url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/merge', 'teams.views.select_other_team', name='select-other-team'), |
403 | |
404 | === modified file 'loco_directory/teams/views.py' |
405 | --- loco_directory/teams/views.py 2011-02-17 21:16:56 +0000 |
406 | +++ loco_directory/teams/views.py 2011-03-20 15:23:33 +0000 |
407 | @@ -78,6 +78,16 @@ |
408 | return render_to_response('teams/team_list.html', context, |
409 | RequestContext(request)) |
410 | |
411 | +@login_required |
412 | +def my_teams(request): |
413 | + teams = Team.objects.filter(lp_name__in=[group.name for group in request.user.groups.all()]) |
414 | + context = { |
415 | + 'teams': teams, |
416 | + } |
417 | + return render_to_response('teams/my_teams.html', context, |
418 | + RequestContext(request)) |
419 | + |
420 | + |
421 | def team_ical(request, team_slug): |
422 | """ |
423 | Return a ical list with the events and meetings in ical format. |
424 | |
425 | === modified file 'loco_directory/templates/base.html' |
426 | --- loco_directory/templates/base.html 2011-03-15 13:08:01 +0000 |
427 | +++ loco_directory/templates/base.html 2011-03-20 15:23:33 +0000 |
428 | @@ -15,11 +15,8 @@ |
429 | {% trans "Logged in as:" %} |
430 | <a class="top-login-item" href="http://launchpad.net/~{{ user.username }}">{{ user.username }}</a> |
431 | <span class="top-login-separator">|</span> |
432 | - {% comment %} |
433 | - <!-- Need to be activated when https://code.launchpad.net/~ronnie.vd.c/loco-directory/my-teams is merged --> |
434 | <a class="top-login-item" href="{% url my-teams %}">{% trans "My Teams" %}</a> |
435 | <span class="top-login-separator">|</span> |
436 | - {% endcomment %} |
437 | <a class="top-login-item" href="{% url logout %}" title="{% trans "Log Out" %}: {{ user.username }}">{% trans "Log Out" %}</a> |
438 | {% else %} |
439 | <a class="top-login-item" href="/openid/login?next={{login_next}}" title="{% trans "Log In" %}">{% trans "Log In" %}</a> |
440 | |
441 | === modified file 'loco_directory/templates/events/global_event_detail.html' |
442 | --- loco_directory/templates/events/global_event_detail.html 2011-02-17 20:05:03 +0000 |
443 | +++ loco_directory/templates/events/global_event_detail.html 2011-03-20 15:23:33 +0000 |
444 | @@ -6,9 +6,11 @@ |
445 | <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language={% trans 'en' %}®ion={% trans 'US' %}"></script> |
446 | <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/1.0/src/markerclusterer_packed.js"></script> |
447 | <script type="text/javascript" src="{{MEDIA_URL}}js/jquery-ubuntu-maps.js"></script> |
448 | + <script type="text/javascript" src="{{MEDIA_URL}}js/twidenash/jquery-twidenash.js"></script> |
449 | <script type="text/javascript"> |
450 | //<![CDATA[ |
451 | $(function(){ |
452 | + $('.twidenash').twidenash(); |
453 | $('#venue-map').showLocations({markers_url:'{% url global-event-locations global_event_id=global_event_object.id %}', |
454 | marker_icon: '{{ MEDIA_URL }}/img/marker.png'}); |
455 | }); |
456 | |
457 | === modified file 'loco_directory/templates/events/global_event_detail.inc.html' |
458 | --- loco_directory/templates/events/global_event_detail.inc.html 2011-02-17 20:05:03 +0000 |
459 | +++ loco_directory/templates/events/global_event_detail.inc.html 2011-03-20 15:23:33 +0000 |
460 | @@ -100,7 +100,7 @@ |
461 | {% if global_event_object.microbloghashtag %} |
462 | <article class="minor-content alone"> |
463 | <h2>{% trans "Microblogging" %} #{{global_event_object.microbloghashtag}}</h2> |
464 | - <p><script src="{{MEDIA_URL}}js/twidenash.js?{{global_event_object.microbloghashtag}}"></script></p> |
465 | + <div class="twidenash" id="{{ global_event_object.microbloghashtag }}"></div> |
466 | </article> |
467 | {% endif %} |
468 | |
469 | |
470 | === modified file 'loco_directory/templates/index.html' |
471 | --- loco_directory/templates/index.html 2011-02-18 03:16:32 +0000 |
472 | +++ loco_directory/templates/index.html 2011-03-20 15:23:33 +0000 |
473 | @@ -9,6 +9,14 @@ |
474 | {% block extrahead %}{{block.super}} |
475 | <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" /> |
476 | <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/continents.css" /> |
477 | + <script type="text/javascript" src="{{MEDIA_URL}}js/twidenash/jquery-twidenash.js"></script> |
478 | + <script type="text/javascript"> |
479 | + //<![CDATA[ |
480 | + $(function() { |
481 | + $('.twidenash').twidenash(); |
482 | + }); |
483 | + //]]> |
484 | + </script> |
485 | {% endblock %} |
486 | |
487 | {% block content %} |
488 | @@ -79,7 +87,7 @@ |
489 | |
490 | <article class="minor-content alone"> |
491 | <h2>{% trans "Microblogging" %} #locoteams</h2> |
492 | - <p><script src="{{MEDIA_URL}}js/twidenash.js?locoteams"></script></p> |
493 | + <div class="twidenash" id="locoteams"></div> |
494 | </article> |
495 | |
496 | {% endblock %} |
497 | |
498 | === added file 'loco_directory/templates/teams/my_teams.html' |
499 | --- loco_directory/templates/teams/my_teams.html 1970-01-01 00:00:00 +0000 |
500 | +++ loco_directory/templates/teams/my_teams.html 2011-03-20 15:23:33 +0000 |
501 | @@ -0,0 +1,103 @@ |
502 | +{% extends "base.html" %} |
503 | +{% load i18n %} |
504 | + |
505 | +{% block title %}{% trans "My Teams" %} | {% trans "Ubuntu LoCo Team Directory" %} {% endblock %} |
506 | + |
507 | +{% block extrahead %}{{ block.super }} |
508 | + <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" /> |
509 | + <script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script> |
510 | + <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.min.js"></script> |
511 | + <link rel="stylesheet" href="{{MEDIA_URL}}css/jquery.lightbox-0.5.css" type="text/css" media="screen" /> |
512 | + <script type="text/javascript" src="{{MEDIA_URL}}js/jquery-flickr.js"></script> |
513 | + <script src="{{ MEDIA_URL }}js/twidenash/jquery-twidenash.js" type="text/javascript"></script> |
514 | + <script type="text/javascript"> |
515 | + //<![CDATA[ |
516 | + $(function () { |
517 | + $('.twidenash').twidenash({ amount: 3 }); |
518 | + {% for team in teams %} |
519 | + $('#flickr-{{ team.lp_name }}').flickr({ key: "{{ flickr_api_key }}", id: "{{ team.flickr_id }}", amount: 10 }); |
520 | + {% endfor %} |
521 | + }); |
522 | + //]]> |
523 | + </script> |
524 | + {# <!-- TODO: this shpuld be rss of events AND meetings --> #} |
525 | + {% for team in teams %} |
526 | + <link type="application/rss+xml" rel="alternate" title="{% trans "Team Events (RSS)" %}" href="{% url team-events-rss team_slug=team.lp_name %}" /> |
527 | + {% endfor %} |
528 | +{% endblock %} |
529 | + |
530 | + |
531 | +{% block sub_nav_links %} |
532 | + <a class="sub-nav-item" href="{% url my-teams %}" title="{% trans 'My Teams' %}">{% trans "My Teams" %}</a> |
533 | + <a class="sub-nav-item" href="{% url team-list %}" title="{% trans 'All Teams' %}">{% trans "All Teams" %}</a> |
534 | + {% comment %} |
535 | + <!-- TODO: Need to create those pages --> |
536 | + <a class="sub-nav-item" href="" title="{% trans 'Join a Team' %}">{% trans "Join a Team" %}</a> |
537 | + <a class="sub-nav-item" href="" title="{% trans 'Create a Team' %}">{% trans "Create a Team" %}</a> |
538 | + {% endcomment %} |
539 | +{% endblock %} |
540 | + |
541 | +{% block content %} |
542 | + {% for team in teams %} |
543 | + <article class="main-content"> |
544 | + <h2 class="dynamic-width"> |
545 | + <a href="{% url team-detail team_slug=team.lp_name %}" class="team-title" title="{{ team.name }}">{{ team.name }}</a> |
546 | + {% comment %} |
547 | + <a href="{% url team-calendar team_slug=team.lp_name %}" title="{% trans "Team Calendar (ICAL)" %}"><img class="bottom" src="{{ MEDIA_URL }}img/ical.png" /></a> |
548 | + {# <!-- TODO: this shpuld be rss of events AND meetings --> #} |
549 | + {# <!-- TODO: Change icon to RSS icon --> #} |
550 | + <a href="{% url team-events-rss team_slug=team.lp_name %}" title="{% trans "Team Feed (RSS)" %}"><img class="bottom" src="{{ MEDIA_URL }}img/rss.png" /></a> |
551 | + {% endcomment %} |
552 | + </h2> |
553 | + <aside class="resources"> |
554 | + <span>{% trans "Resources: " %}</span> |
555 | + {% if team.web_url %}<a href="{{ team.web_url }}">{% trans "Website" %}</a>{% endif %} |
556 | + {% if team.wiki_url %}<a href="{{ team.wiki_url }}">{% trans "Wiki" %}</a>{% endif %} |
557 | + {% if team.forum_url %}<a href="{{ team.forum_url }}">{% trans "Forums" %}</a>{% endif %} |
558 | + {% if team.ml_url %}<a href="{{ team.ml_url }}">{% trans "Mailing List" %}</a>{% endif %} |
559 | + {# <!-- There should be a separate chat page which supports joining channel by url-tag --> #} |
560 | + {% if team.irc_chan %}<a href="/chat">{% trans "IRC Channel" %}</a>{% endif %} |
561 | + </aside> |
562 | + <hr class="no-top" /> |
563 | + <section class="main-content-split left"> |
564 | + <section class="meeting-summary"> |
565 | + <a href="{% url team-meeting-list team_slug=team.lp_name %}" class="title">{% trans "Meetings" %}</a> |
566 | + <a href="{% url team-meeting-new team_slug=team.lp_name %}" class="new">{% trans "+ new meeting" %}</a> |
567 | + <hr class="no-top" /> |
568 | + <ul class="indent"> |
569 | + {% if team.teammeeting_set.next_3_meetings %} |
570 | + {% for team_event in team.teammeeting_set.next_3_meetings %} |
571 | + {% include 'meetings/team_meeting_li.inc.html' %} |
572 | + {% endfor %} |
573 | + {% else %} |
574 | + <li>{% trans "There are no schedules meetings for this team" %}</li> |
575 | + {% endif %} |
576 | + </ul> |
577 | + </section> |
578 | + <section class="event-summary"> |
579 | + <a href="{% url team-event-list team_slug=team.lp_name %}" class="title">{% trans "Events" %}</a> |
580 | + <a href="{% url team-event-new team_slug=team.lp_name %}" class="new">{% trans "+ new event" %}</a> |
581 | + <hr class="no-top" /> |
582 | + <ul class="indent"> |
583 | + {% if team.teamevent_set.next_3_events %} |
584 | + {% for team_event in team.teamevent_set.next_3_events %} |
585 | + {% include 'events/team_event_li.inc.html' %} |
586 | + {% endfor %} |
587 | + {% else %} |
588 | + <li>{% trans "There are no schedules events for this team" %}</li> |
589 | + {% endif %} |
590 | + </ul> |
591 | + </section> |
592 | + </section> |
593 | + <section class="main-content-split right"> |
594 | + {% if team.microbloghashtag %} |
595 | + <div class="twidenash" id="{{ team.microbloghashtag }}"></div> |
596 | + {% else %} |
597 | + {% if team.flickr_id %} {# or team.picasa_id or team.pixie_id %}#} |
598 | + <div class="flickr" id="flickr-{{ team.lp_name }}"></div> |
599 | + {% endif %} |
600 | + {% endif %} |
601 | + </section> |
602 | + </article> |
603 | + {% endfor %} |
604 | +{% endblock %} |
605 | |
606 | === modified file 'loco_directory/templates/teams/team_detail.html' |
607 | --- loco_directory/templates/teams/team_detail.html 2011-03-02 22:34:34 +0000 |
608 | +++ loco_directory/templates/teams/team_detail.html 2011-03-20 15:23:33 +0000 |
609 | @@ -14,18 +14,23 @@ |
610 | |
611 | |
612 | {% block extrahead %}{{ block.super }} |
613 | -<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" /> |
614 | {% if team.flickr_id or team.picasa_id or team.pixie_id %} |
615 | <script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script> |
616 | <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.min.js"></script> |
617 | <link rel="stylesheet" href="{{MEDIA_URL}}css/jquery.lightbox-0.5.css" type="text/css" media="screen" /> |
618 | <script type="text/javascript" src="{{MEDIA_URL}}js/jquery-flickr.js"></script> |
619 | +{% endif %} |
620 | + |
621 | +<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" /> |
622 | +<script type="text/javascript" src="{{MEDIA_URL}}js/twidenash/jquery-twidenash.js"></script> |
623 | <script type="text/javascript"> |
624 | $(function() { |
625 | var perPage = '16'; |
626 | -{% endif %} |
627 | + $('.twidenash').twidenash(); |
628 | + |
629 | + |
630 | {% if team.flickr_id %} |
631 | - $('#flickr').flickr({ key: "{{ flickr_api_key }}", id: "{{ team.flickr_id }}", amount: perPage }); |
632 | + $('#flickr').flickr({ key: "{{ flickr_api_key }}", id: "{{ team.flickr_id }}", amount: 6 }); |
633 | {% endif %} |
634 | {% if team.picasa_id %} |
635 | var picasa_userId = '{{ team.picasa_id }}'; |
636 | @@ -65,10 +70,10 @@ |
637 | $("a.lightbox").lightBox(); |
638 | }); |
639 | {% endif %} |
640 | -{% if team.flickr_id or team.picasa_id or team.pixie_id %} |
641 | }); |
642 | |
643 | </script> |
644 | +{% if team.flickr_id or team.picasa_id or team.pixie_id %} |
645 | <style type="text/css"> |
646 | div#flickr a.lightbox img { |
647 | border: 5px solid #b3aaa4; |
648 | @@ -208,7 +213,7 @@ |
649 | {% if team.microbloghashtag %} |
650 | <article class="minor-content alone"> |
651 | <h2>{% trans "Microblogging" %} #{{team.microbloghashtag}}</h2> |
652 | - <p><script src="{{MEDIA_URL}}js/twidenash.js?{{team.microbloghashtag}}"></script></p> |
653 | + <div class="twidenash" id="{{ team.microbloghashtag }}"></div> |
654 | </article> |
655 | {% endif %} |
656 |
This code requires that the bzr-apps-upgrade branch gets approved first.