Merge lp:~daker/loco-team-portal/1178915-1178911 into lp:loco-team-portal
- 1178915-1178911
- Merge into 0.2
Proposed by
Adnane Belmadiaf
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Adnane Belmadiaf | ||||||||
Approved revision: | 642 | ||||||||
Merged at revision: | 642 | ||||||||
Proposed branch: | lp:~daker/loco-team-portal/1178915-1178911 | ||||||||
Merge into: | lp:loco-team-portal | ||||||||
Diff against target: |
421 lines (+103/-76) 9 files modified
loco_directory/events/admin.py (+2/-1) loco_directory/events/models.py (+0/-1) loco_directory/events/views.py (+6/-6) loco_directory/media/css/styles.css (+3/-2) loco_directory/templates/events/team_event_comment_new.inc.html (+1/-1) loco_directory/templates/events/team_event_detail.html (+35/-19) loco_directory/templates/events/team_event_detail.inc.html (+50/-39) loco_directory/templates/events/team_event_detail_comments.inc.html (+5/-5) loco_directory/templates/venues/venue_detail.html (+1/-2) |
||||||||
To merge this branch: | bzr merge lp:~daker/loco-team-portal/1178915-1178911 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
LoCo Team Portal Developers | Pending | ||
Review via email: mp+163400@code.launchpad.net |
Commit message
Fixed the templatetag priority causing invalid characters when there is a link in a comment
Replaced the static Gmap with the interactive one
Description of the change
Registred TeamEventComment in the admin
Changed team_event_object to team_event
Line 390 is the fix for bug 1178911
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'loco_directory/events/admin.py' | |||
2 | --- loco_directory/events/admin.py 2012-12-25 22:00:46 +0000 | |||
3 | +++ loco_directory/events/admin.py 2013-05-11 14:16:26 +0000 | |||
4 | @@ -1,6 +1,6 @@ | |||
5 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
6 | 2 | from django.contrib import admin | 2 | from django.contrib import admin |
8 | 3 | from .models import (Venue, GlobalEvent, TeamEvent, Attendee) | 3 | from .models import (Venue, GlobalEvent, TeamEvent, Attendee, TeamEventComment) |
9 | 4 | 4 | ||
10 | 5 | 5 | ||
11 | 6 | class TeamEventAdmin(admin.ModelAdmin): | 6 | class TeamEventAdmin(admin.ModelAdmin): |
12 | @@ -11,3 +11,4 @@ | |||
13 | 11 | admin.site.register(GlobalEvent) | 11 | admin.site.register(GlobalEvent) |
14 | 12 | admin.site.register(TeamEvent, TeamEventAdmin) | 12 | admin.site.register(TeamEvent, TeamEventAdmin) |
15 | 13 | admin.site.register(Attendee) | 13 | admin.site.register(Attendee) |
16 | 14 | admin.site.register(TeamEventComment) | ||
17 | 14 | 15 | ||
18 | === modified file 'loco_directory/events/models.py' | |||
19 | --- loco_directory/events/models.py 2013-03-11 21:49:37 +0000 | |||
20 | +++ loco_directory/events/models.py 2013-05-11 14:16:26 +0000 | |||
21 | @@ -15,7 +15,6 @@ | |||
22 | 15 | from .fields import GuestsField | 15 | from .fields import GuestsField |
23 | 16 | 16 | ||
24 | 17 | 17 | ||
25 | 18 | |||
26 | 19 | ATTENDEE_PROMISE_CHOICES = ( | 18 | ATTENDEE_PROMISE_CHOICES = ( |
27 | 20 | ('sure', _('attending')), | 19 | ('sure', _('attending')), |
28 | 21 | ('maybe', _('might be attending')), | 20 | ('maybe', _('might be attending')), |
29 | 22 | 21 | ||
30 | === modified file 'loco_directory/events/views.py' | |||
31 | --- loco_directory/events/views.py 2013-04-08 20:08:25 +0000 | |||
32 | +++ loco_directory/events/views.py 2013-05-11 14:16:26 +0000 | |||
33 | @@ -132,9 +132,9 @@ | |||
34 | 132 | """ | 132 | """ |
35 | 133 | detailed view for a team event | 133 | detailed view for a team event |
36 | 134 | """ | 134 | """ |
38 | 135 | team_event_object = get_object_or_404(TeamEvent, pk=team_event_id) | 135 | team_event = get_object_or_404(TeamEvent, pk=team_event_id) |
39 | 136 | is_member = False | 136 | is_member = False |
41 | 137 | for team_object in team_event_object.teams.all(): | 137 | for team_object in team_event.teams.all(): |
42 | 138 | is_member = is_member or launchpad.is_team_member(request.user, team_object) | 138 | is_member = is_member or launchpad.is_team_member(request.user, team_object) |
43 | 139 | 139 | ||
44 | 140 | if request.user.is_authenticated(): | 140 | if request.user.is_authenticated(): |
45 | @@ -142,19 +142,19 @@ | |||
46 | 142 | form = TeamEventCommentForm(data=request.POST) | 142 | form = TeamEventCommentForm(data=request.POST) |
47 | 143 | if form.is_valid(): | 143 | if form.is_valid(): |
48 | 144 | team_event_comment = form.save(commit=False) | 144 | team_event_comment = form.save(commit=False) |
50 | 145 | team_event_comment.team_event = team_event_object | 145 | team_event_comment.team_event = team_event |
51 | 146 | team_event_comment.commenter_profile = request.user.get_profile() | 146 | team_event_comment.commenter_profile = request.user.get_profile() |
52 | 147 | team_event_comment.save() | 147 | team_event_comment.save() |
53 | 148 | request.user.message_set.create(message=_('Your comment has been saved.')) | 148 | request.user.message_set.create(message=_('Your comment has been saved.')) |
55 | 149 | return redirect(team_event_object) | 149 | return redirect(team_event) |
56 | 150 | else: | 150 | else: |
57 | 151 | form = TeamEventCommentForm() | 151 | form = TeamEventCommentForm() |
58 | 152 | else: | 152 | else: |
59 | 153 | form = None | 153 | form = None |
60 | 154 | 154 | ||
61 | 155 | context = { | 155 | context = { |
64 | 156 | 'team_event_object': team_event_object, | 156 | 'team_event': team_event, |
65 | 157 | 'user_is_attending': team_event_object.is_attending(request.user), | 157 | 'user_is_attending': team_event.is_attending(request.user), |
66 | 158 | 'user_is_team_member': is_member, | 158 | 'user_is_team_member': is_member, |
67 | 159 | 'form': form, | 159 | 'form': form, |
68 | 160 | } | 160 | } |
69 | 161 | 161 | ||
70 | === modified file 'loco_directory/media/css/styles.css' | |||
71 | --- loco_directory/media/css/styles.css 2013-04-13 17:54:34 +0000 | |||
72 | +++ loco_directory/media/css/styles.css 2013-05-11 14:16:26 +0000 | |||
73 | @@ -346,9 +346,10 @@ | |||
74 | 346 | } | 346 | } |
75 | 347 | 347 | ||
76 | 348 | .f img { | 348 | .f img { |
79 | 349 | width: 50px; | 349 | width: 61px; |
80 | 350 | height: 50px; | 350 | height: 55px; |
81 | 351 | margin-bottom: 5px; | 351 | margin-bottom: 5px; |
82 | 352 | margin-right: 5px; | ||
83 | 352 | } | 353 | } |
84 | 353 | 354 | ||
85 | 354 | .f0 { | 355 | .f0 { |
86 | 355 | 356 | ||
87 | === modified file 'loco_directory/templates/events/team_event_comment_new.inc.html' | |||
88 | --- loco_directory/templates/events/team_event_comment_new.inc.html 2013-01-01 14:04:15 +0000 | |||
89 | +++ loco_directory/templates/events/team_event_comment_new.inc.html 2013-05-11 14:16:26 +0000 | |||
90 | @@ -14,6 +14,6 @@ | |||
91 | 14 | </div> | 14 | </div> |
92 | 15 | {% else %} | 15 | {% else %} |
93 | 16 | <div style="padding:10px;"> | 16 | <div style="padding:10px;"> |
95 | 17 | {% blocktrans with team_event_object.get_absolute_url as login_next %}To post your comment you need to <a href="/openid/login?next={{login_next}}">login</a> or <a href="/openid/login/?next={{ login_next }}">create</a> a new account{% endblocktrans %} | 17 | {% blocktrans with team_event.get_absolute_url as login_next %}To post your comment you need to <a href="/openid/login/?next={{ login_next }}">login</a> or <a href="/openid/login/?next={{ login_next }}">create</a> a new account{% endblocktrans %} |
96 | 18 | </div> | 18 | </div> |
97 | 19 | {% endif %} | 19 | {% endif %} |
98 | 20 | 20 | ||
99 | === modified file 'loco_directory/templates/events/team_event_detail.html' | |||
100 | --- loco_directory/templates/events/team_event_detail.html 2012-11-28 00:46:29 +0000 | |||
101 | +++ loco_directory/templates/events/team_event_detail.html 2013-05-11 14:16:26 +0000 | |||
102 | @@ -1,48 +1,64 @@ | |||
103 | 1 | {% extends "base.html" %} | 1 | {% extends "base.html" %} |
104 | 2 | {% load i18n %} | 2 | {% load i18n %} |
105 | 3 | 3 | ||
107 | 4 | {% block page_name %}{% trans team_event_object.name %}{% endblock %} | 4 | {% block page_name %}{% trans team_event.name %}{% endblock %} |
108 | 5 | 5 | ||
109 | 6 | {% block extrahead %}{{ block.super }} | 6 | {% block extrahead %}{{ block.super }} |
110 | 7 | <meta property="fb:app_id" content="127188230723188"/> | 7 | <meta property="fb:app_id" content="127188230723188"/> |
114 | 8 | <meta property="og:title" content="{{ team_event_object.name }}" /> | 8 | <meta property="og:title" content="{{ team_event.name }}" /> |
115 | 9 | {% if team_event_object.description %} | 9 | {% if team_event.description %} |
116 | 10 | <meta property="og:description" content="{{ team_event_object.description|linebreaks|striptags }}" /> | 10 | <meta property="og:description" content="{{ team_event.description|linebreaks|striptags }}" /> |
117 | 11 | {% endif %} | 11 | {% endif %} |
119 | 12 | <meta property="og:url" content="http://loco.ubuntu.com{{ team_event_object.get_absolute_url }}"/> | 12 | <meta property="og:url" content="http://loco.ubuntu.com{{ team_event.get_absolute_url }}"/> |
120 | 13 | <meta property="og:image" content="http://loco.ubuntu.com/media/images/cof_orange_hex1.png"/> | 13 | <meta property="og:image" content="http://loco.ubuntu.com/media/images/cof_orange_hex1.png"/> |
121 | 14 | <meta property="og:site_name" content="Loco Team Portal"/> | 14 | <meta property="og:site_name" content="Loco Team Portal"/> |
122 | 15 | <meta property="og:type" content="loco-team-portal:event"/> | 15 | <meta property="og:type" content="loco-team-portal:event"/> |
128 | 16 | {% if team_event_object.venue %} | 16 | {% if team_event.venue %} |
129 | 17 | <meta property="og:latitude" content="{{ team_event_object.venue.latitude }}"/> | 17 | <meta property="og:latitude" content="{{ team_event.venue.latitude }}"/> |
130 | 18 | <meta property="og:longitude" content="{{ team_event_object.venue.longitude }}"/> | 18 | <meta property="og:longitude" content="{{ team_event.venue.longitude }}"/> |
131 | 19 | <meta property="og:street-address" content="{{ team_event_object.venue.name }} "/> | 19 | <meta property="og:street-address" content="{{ team_event.venue.name }} "/> |
132 | 20 | <meta property="og:locality" content="{% if team_event_object.venue.city %}{{ team_event_object.venue.city }}{% endif %}"/> | 20 | <meta property="og:locality" content="{% if team_event.venue.city %}{{ team_event.venue.city }}{% endif %}"/> |
133 | 21 | {% endif %} | 21 | {% endif %} |
136 | 22 | <script type="text/javascript" src="{{ MEDIA_URL }}js/comments.js"></script> | 22 | <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language={% trans 'en' %}®ion={% trans 'US' %}"></script> |
137 | 23 | {{form.media}} | 23 | <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/1.0/src/markerclusterer_packed.js"></script> |
138 | 24 | <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-ubuntu-maps.js"></script> | ||
139 | 24 | <script type="text/javascript"> | 25 | <script type="text/javascript"> |
142 | 25 | $(document).ready(function(){ | 26 | $(document).ready(function(){ |
143 | 26 | $('span[rel*=help]').colorTip({color:'orange'}); | 27 | var x = {{ team_event.venue.longitude }}, |
144 | 28 | y = {{ team_event.venue.latitude }}, | ||
145 | 29 | km = 0.0089930, // 1km | ||
146 | 30 | radius = 5, | ||
147 | 31 | minx = x-radius/2*km, | ||
148 | 32 | miny = y-radius/2*km, | ||
149 | 33 | maxx = x+radius/2*km, | ||
150 | 34 | maxy = y+radius/2*km; | ||
151 | 35 | |||
152 | 36 | $.getJSON("http://www.panoramio.com/map/get_panoramas.php?order=popularity&set=public&from=0&to=7&minx=" + minx + "&miny=" + miny + "&maxx=" + maxx + "&maxy=" + maxy +"&size=medium&format=json&callback=?", function(data){ | ||
153 | 37 | $.each(data.photos, function(i,item){ | ||
154 | 38 | $("#pamdiv").append('<span class="f f'+ i +'"><a href="http://www.panoramio.com/photo/' + $(this)[0].photo_id + '"><img src="' + $(this)[0].photo_file_url + '" title="' + $(this)[0].photo_title + '" alt="' + $(this)[0].photo_title + '"></a></span>'); | ||
155 | 39 | }); | ||
156 | 27 | }); | 40 | }); |
157 | 41 | }); | ||
158 | 28 | </script> | 42 | </script> |
159 | 43 | <script type="text/javascript" src="{{ MEDIA_URL }}js/comments.js"></script> | ||
160 | 44 | {{ form.media }} | ||
161 | 29 | {% endblock %} | 45 | {% endblock %} |
162 | 30 | 46 | ||
163 | 31 | 47 | ||
164 | 32 | {% block sub_nav_links %} | 48 | {% block sub_nav_links %} |
165 | 33 | 49 | ||
167 | 34 | {% for team in team_event_object.teams.all %} | 50 | {% for team in team_event.teams.all %} |
168 | 35 | <li><a class="sub-nav-item" href="{{ team.get_absolute_url }}">{{ team.name }}</a></li> | 51 | <li><a class="sub-nav-item" href="{{ team.get_absolute_url }}">{{ team.name }}</a></li> |
169 | 36 | {% endfor %} | 52 | {% endfor %} |
170 | 37 | 53 | ||
171 | 38 | {% if user.is_authenticated %} | 54 | {% if user.is_authenticated %} |
172 | 39 | {% if user_is_team_member %} | 55 | {% if user_is_team_member %} |
176 | 40 | <li><a class="sub-nav-item" href="{% url team-event-update team_event_object.first_team.lp_name team_event_object.id %}">{% trans "Edit Details" %}</a></li> | 56 | <li><a class="sub-nav-item" href="{% url team-event-update team_event.first_team.lp_name team_event.id %}">{% trans "Edit Details" %}</a></li> |
177 | 41 | <li><a class="sub-nav-item" href="{% url team-event-delete team_event_object.first_team.lp_name team_event_object.id %}">{% trans "Delete Event" %}</a></li> | 57 | <li><a class="sub-nav-item" href="{% url team-event-delete team_event.first_team.lp_name team_event.id %}">{% trans "Delete Event" %}</a></li> |
178 | 42 | <li><a class="sub-nav-item" href="{% url team-event-copy team_event_object.first_team.lp_name team_event_object.id %}">{% trans "Copy Event" %}</a></li> | 58 | <li><a class="sub-nav-item" href="{% url team-event-copy team_event.first_team.lp_name team_event.id %}">{% trans "Copy Event" %}</a></li> |
179 | 43 | {% endif %} | 59 | {% endif %} |
180 | 44 | {% endif %} | 60 | {% endif %} |
182 | 45 | <li><a class="sub-nav-item" href="{% url event-ical team_event_object.first_team.lp_name team_event_object.id %}">{% trans "iCal Feed" %}</a></li> | 61 | <li><a class="sub-nav-item" href="{% url event-ical team_event.first_team.lp_name team_event.id %}">{% trans "iCal Feed" %}</a></li> |
183 | 46 | {% endblock %} | 62 | {% endblock %} |
184 | 47 | 63 | ||
185 | 48 | {% block content %} | 64 | {% block content %} |
186 | 49 | 65 | ||
187 | === modified file 'loco_directory/templates/events/team_event_detail.inc.html' | |||
188 | --- loco_directory/templates/events/team_event_detail.inc.html 2013-02-16 00:29:22 +0000 | |||
189 | +++ loco_directory/templates/events/team_event_detail.inc.html 2013-05-11 14:16:26 +0000 | |||
190 | @@ -3,11 +3,11 @@ | |||
191 | 3 | <section class="span-9"> | 3 | <section class="span-9"> |
192 | 4 | <div class="box_content"> | 4 | <div class="box_content"> |
193 | 5 | <div class="pagelet"> | 5 | <div class="pagelet"> |
196 | 6 | <h2>{{ team_event_object.name }}</h2> | 6 | <h2>{{ team_event.name }}</h2> |
197 | 7 | {% if team_event_object.global_event %} | 7 | {% if team_event.global_event %} |
198 | 8 | <div class="event-partofglobal-event"> | 8 | <div class="event-partofglobal-event"> |
199 | 9 | {% trans "This event is part of" %} | 9 | {% trans "This event is part of" %} |
201 | 10 | <a href="{{ team_event_object.global_event.get_absolute_url }}">{{team_event_object.global_event.name }}</a> | 10 | <a href="{{ team_event.global_event.get_absolute_url }}">{{team_event.global_event.name }}</a> |
202 | 11 | </div> | 11 | </div> |
203 | 12 | {% endif %} | 12 | {% endif %} |
204 | 13 | <div class="share"> | 13 | <div class="share"> |
205 | @@ -23,111 +23,122 @@ | |||
206 | 23 | <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> | 23 | <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
207 | 24 | <g:plusone size="medium"></g:plusone> | 24 | <g:plusone size="medium"></g:plusone> |
208 | 25 | <a href="http://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a> | 25 | <a href="http://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a> |
210 | 26 | <div class="fb-like" data-href="http://loco.ubuntu.com{{ team_event_object.get_absolute_url }}" data-send="false" data-layout="button_count" data-width="40" data-show-faces="false" data-font="arial"></div> | 26 | <div class="fb-like" data-href="http://loco.ubuntu.com{{ team_event.get_absolute_url }}" data-send="false" data-layout="button_count" data-width="40" data-show-faces="false" data-font="arial"></div> |
211 | 27 | </div> | 27 | </div> |
212 | 28 | 28 | ||
213 | 29 | <div> | 29 | <div> |
214 | 30 | <span class="pictogram calendar"></span> | 30 | <span class="pictogram calendar"></span> |
215 | 31 | <span class="pictogram-l"> | 31 | <span class="pictogram-l"> |
218 | 32 | {% ifequal team_event_object.local_date_begin|date team_event_object.local_date_end|date %} | 32 | {% ifequal team_event.local_date_begin|date team_event.local_date_end|date %} |
219 | 33 | {{ team_event_object.local_date_begin|date:"D, d N Y H:i" }} - {{ team_event_object.local_date_end|date:"H:i T" }} | 33 | {{ team_event.local_date_begin|date:"D, d N Y H:i" }} - {{ team_event.local_date_end|date:"H:i T" }} |
220 | 34 | {% else %} | 34 | {% else %} |
222 | 35 | {{ team_event_object.local_date_begin|date:"D, d N Y H:i" }} - {{ team_event_object.local_date_end|date:"D, d N Y H:i T" }} | 35 | {{ team_event.local_date_begin|date:"D, d N Y H:i" }} - {{ team_event.local_date_end|date:"D, d N Y H:i T" }} |
223 | 36 | {% endifequal %} | 36 | {% endifequal %} |
224 | 37 | </span> | 37 | </span> |
225 | 38 | </div> | 38 | </div> |
226 | 39 | 39 | ||
229 | 40 | {% if team_event_object.description %} | 40 | {% if team_event.description %} |
230 | 41 | <p>{{ team_event_object.description|markdown:'safe'|linebreaks }}</p> | 41 | <p>{{ team_event.description|markdown:'safe'|linebreaks }}</p> |
231 | 42 | {% endif %} | 42 | {% endif %} |
232 | 43 | 43 | ||
234 | 44 | {% if team_event_object.announce %} | 44 | {% if team_event.announce %} |
235 | 45 | <div> | 45 | <div> |
236 | 46 | <span class="pictogram announcement"></span> | 46 | <span class="pictogram announcement"></span> |
238 | 47 | <a class="pictogram-l" href="{{ team_event_object.announce }}">{{team_event_object.announce }}</a> | 47 | <a class="pictogram-l" href="{{ team_event.announce }}">{{team_event.announce }}</a> |
239 | 48 | </div> | 48 | </div> |
240 | 49 | {% endif %} | 49 | {% endif %} |
241 | 50 | </div> | 50 | </div> |
242 | 51 | 51 | ||
246 | 52 | <div class="map"> | 52 | {% if team_event.venue.longitude and team_event.venue.latitude %} |
247 | 53 | <img class="map_img" src="http://maps.googleapis.com/maps/api/staticmap?center={% if team_event_object.venue.address %}{{ team_event_object.venue.address }}{% else %}{{ team_event_object.venue.latitude }},{{ team_event_object.venue.longitude }}{% endif %}&zoom=13&size=640x100&scale=1&maptype=roadmap&markers=color:orange%7Clabel:S%7C{{ team_event_object.venue.latitude }},{{ team_event_object.venue.longitude }}&sensor=false"> | 53 | <div id="venue-map"></div> |
248 | 54 | </div> | 54 | <script> |
249 | 55 | $(function(){ | ||
250 | 56 | $('#venue-map').showLocations({ | ||
251 | 57 | markers_list: [{ lat: {{ team_event.venue.latitude }}, lng: {{ team_event.venue.longitude }} }], | ||
252 | 58 | marker_icon: '{{ MEDIA_URL }}img/marker.png' | ||
253 | 59 | }); | ||
254 | 60 | }); | ||
255 | 61 | </script> | ||
256 | 62 | {% endif %} | ||
257 | 55 | 63 | ||
259 | 56 | {% if team_event_object.venue %} | 64 | {% if team_event.venue %} |
260 | 57 | <div class="event-venue"> | 65 | <div class="event-venue"> |
262 | 58 | <a title="{% trans "show venue details" %}" href="{{ team_event_object.venue.get_absolute_url }}"> | 66 | <a title="{% trans "show venue details" %}" href="{{ team_event.venue.get_absolute_url }}"> |
263 | 59 | <div class="event-venue-name"> | 67 | <div class="event-venue-name"> |
265 | 60 | {{ team_event_object.venue.name }} | 68 | {{ team_event.venue.name }} |
266 | 61 | </div> | 69 | </div> |
267 | 62 | </a> | 70 | </a> |
268 | 63 | 71 | ||
269 | 64 | <div class="event-venue-city"> | 72 | <div class="event-venue-city"> |
271 | 65 | {% if team_event_object.venue.city %}{{ team_event_object.venue.city }}{% endif %} | 73 | {% if team_event.venue.city %}{{ team_event.venue.city }}{% endif %} |
272 | 66 | </div> | 74 | </div> |
273 | 67 | 75 | ||
274 | 68 | <div class="event-venue-adress"> | 76 | <div class="event-venue-adress"> |
278 | 69 | {% if team_event_object.venue.address %}{{ team_event_object.venue.address }}{% endif %} | 77 | {% if team_event.venue.address %}{{ team_event.venue.address }}{% endif %} |
279 | 70 | {% if team_event_object.venue.address and team_event_object.venue.spr%} ,{% endif %} | 78 | {% if team_event.venue.address and team_event.venue.spr%} ,{% endif %} |
280 | 71 | {% if team_event_object.venue.spr %}{{ team_event_object.venue.spr }}{% endif %} | 79 | {% if team_event.venue.spr %}{{ team_event.venue.spr }}{% endif %} |
281 | 72 | </div> | 80 | </div> |
282 | 73 | </div> | 81 | </div> |
283 | 74 | {% endif %} | 82 | {% endif %} |
284 | 75 | <div> | 83 | <div> |
288 | 76 | {% if team_event_object.teameventcomment_set.all %} | 84 | {% include "events/team_event_detail_comments.inc.html" %} |
286 | 77 | {% include "events/team_event_detail_comments.inc.html" %} | ||
287 | 78 | {% endif %} | ||
289 | 79 | {% include "events/team_event_comment_new.inc.html" %} | 85 | {% include "events/team_event_comment_new.inc.html" %} |
290 | 80 | </div> | 86 | </div> |
291 | 81 | </div> | 87 | </div> |
292 | 82 | </section> | 88 | </section> |
293 | 83 | <section class="span-3 box_content last"> | 89 | <section class="span-3 box_content last"> |
294 | 84 | <div class="sidebar-inner"> | 90 | <div class="sidebar-inner"> |
295 | 91 | <h3 class="title">{% trans "Photos" %}</h3> | ||
296 | 92 | <div id="pamdiv" style="overflow: hidden;"></div> | ||
297 | 93 | {% if team_event.venue.address %} | ||
298 | 94 | <h3 class="attendees-title"><a href="https://maps.google.com/maps?saddr=&daddr={{ team_event.venue.address }}">{% trans "Get directions to this venue" %}</a></h3> | ||
299 | 95 | {% endif %} | ||
300 | 85 | <div class="event-info"> | 96 | <div class="event-info"> |
303 | 86 | {% if team_event_object %} | 97 | {% if team_event %} |
304 | 87 | {% if team_event_object.channel %} | 98 | {% if team_event.channel %} |
305 | 88 | <div> | 99 | <div> |
306 | 89 | <span class="pictogram comments"></span> | 100 | <span class="pictogram comments"></span> |
308 | 90 | {{ team_event_object.channel }} | 101 | {{ team_event.channel }} |
309 | 91 | </div> | 102 | </div> |
310 | 92 | {% endif %} | 103 | {% endif %} |
311 | 93 | 104 | ||
313 | 94 | {% if team_event_object.contact %} | 105 | {% if team_event.contact %} |
314 | 95 | <div> | 106 | <div> |
315 | 96 | <span class="pictogram personne"></span> | 107 | <span class="pictogram personne"></span> |
317 | 97 | <a class="pictogram-l" title="{{ team_event_object.contact.realname }}" href="{% url profile-detail team_event_object.contact.user %}">{{ team_event_object.contact.realname }}</a> | 108 | <a class="pictogram-l" title="{{ team_event.contact.realname }}" href="{% url profile-detail team_event.contact.user %}">{{ team_event.contact.realname }}</a> |
318 | 98 | </div> | 109 | </div> |
319 | 99 | {% endif %} | 110 | {% endif %} |
320 | 100 | 111 | ||
322 | 101 | {% if team_event_object.teams.all %} | 112 | {% if team_event.teams.all %} |
323 | 102 | <div> | 113 | <div> |
324 | 103 | <span class="pictogram team"></span> | 114 | <span class="pictogram team"></span> |
326 | 104 | {% for team in team_event_object.teams.all %}<a class="pictogram-l" title="{% trans "Get more information about this team" %}" href="{{ team.get_absolute_url }}">{{ team.name }}</a>{% if not forloop.last %},{% endif %}{% endfor %} | 115 | {% for team in team_event.teams.all %}<a class="pictogram-l" title="{% trans "Get more information about this team" %}" href="{{ team.get_absolute_url }}">{{ team.name }}</a>{% if not forloop.last %},{% endif %}{% endfor %} |
327 | 105 | </div> | 116 | </div> |
328 | 106 | {% endif %} | 117 | {% endif %} |
329 | 107 | {% endif %} | 118 | {% endif %} |
330 | 108 | </div> | 119 | </div> |
331 | 109 | 120 | ||
334 | 110 | {% if team_event_object.registration %} | 121 | {% if team_event.registration %} |
335 | 111 | <a class="submit-button rsvp-link" href="{{team_event_object.registration}}" target="external_registration">{% trans 'Register' %}</a> | 122 | <a class="submit-button rsvp-link" href="{{team_event.registration}}" target="external_registration">{% trans 'Register' %}</a> |
336 | 112 | {% else %} | 123 | {% else %} |
337 | 113 | {% if user.is_authenticated and user_is_attending %} | 124 | {% if user.is_authenticated and user_is_attending %} |
339 | 114 | <a class="submit-button rsvp-link" href="{% url team-event-register team_event_object.first_team.lp_name team_event_object.id %}">{% trans 'Update Registration' %}</a> | 125 | <a class="submit-button rsvp-link" href="{% url team-event-register team_event.first_team.lp_name team_event.id %}">{% trans 'Update Registration' %}</a> |
340 | 115 | {% else %} | 126 | {% else %} |
342 | 116 | <a class="submit-button rsvp-link" href="{% url team-event-register team_event_object.first_team.lp_name team_event_object.id %}">{% trans 'Register' %}</a> | 127 | <a class="submit-button rsvp-link" href="{% url team-event-register team_event.first_team.lp_name team_event.id %}">{% trans 'Register' %}</a> |
343 | 117 | {% endif %} | 128 | {% endif %} |
344 | 118 | {% endif %} | 129 | {% endif %} |
345 | 119 | 130 | ||
347 | 120 | {% if team_event_object.created_by %} | 131 | {% if team_event.created_by %} |
348 | 121 | <h3 class="attendees-title">{% trans 'Created by' %}</h3> | 132 | <h3 class="attendees-title">{% trans 'Created by' %}</h3> |
349 | 122 | <ul class="attendees"> | 133 | <ul class="attendees"> |
350 | 123 | <li class="attendee-cell"> | 134 | <li class="attendee-cell"> |
351 | 124 | <div class="attendee-mugshot"> | 135 | <div class="attendee-mugshot"> |
354 | 125 | <a href="{% url profile-detail team_event_object.created_by.username %}"> | 136 | <a href="{% url profile-detail team_event.created_by.username %}"> |
355 | 126 | <img src="{% if team_event_object.created_by.get_profile.mugshot %}{{ team_event_object.created_by.get_profile.mugshot }}{% else %}{{MEDIA_URL}}img/default-mugshot.png{% endif %}" width="32px" height="32px" alt="{{ team_event_object.created_by.get_profile.realname }}"> | 137 | <img src="{% if team_event.created_by.get_profile.mugshot %}{{ team_event.created_by.get_profile.mugshot }}{% else %}{{MEDIA_URL}}img/default-mugshot.png{% endif %}" width="32px" height="32px" alt="{{ team_event.created_by.get_profile.realname }}"> |
356 | 127 | </a> | 138 | </a> |
357 | 128 | </div> | 139 | </div> |
358 | 129 | <div class="attendee-infos"> | 140 | <div class="attendee-infos"> |
360 | 130 | <a href="{% url profile-detail team_event_object.created_by.username %}">{{ team_event_object.created_by.get_profile.realname }}</a> | 141 | <a href="{% url profile-detail team_event.created_by.username %}">{{ team_event.created_by.get_profile.realname }}</a> |
361 | 131 | </div> | 142 | </div> |
362 | 132 | </li> | 143 | </li> |
363 | 133 | </ul> | 144 | </ul> |
364 | 134 | 145 | ||
365 | === modified file 'loco_directory/templates/events/team_event_detail_comments.inc.html' | |||
366 | --- loco_directory/templates/events/team_event_detail_comments.inc.html 2013-03-30 22:34:11 +0000 | |||
367 | +++ loco_directory/templates/events/team_event_detail_comments.inc.html 2013-05-11 14:16:26 +0000 | |||
368 | @@ -1,13 +1,13 @@ | |||
369 | 1 | {% load i18n %} | 1 | {% load i18n %} |
371 | 2 | {% if team_event_object.teameventcomment_set.all %} | 2 | {% if team_event.teameventcomment_set.all %} |
372 | 3 | 3 | ||
373 | 4 | <h3 class="comments-nbr"> | 4 | <h3 class="comments-nbr"> |
375 | 5 | {% blocktrans count team_event_object.teameventcomment_set.all.count as comment_count %} | 5 | {% blocktrans count team_event.teameventcomment_set.all.count as comment_count %} |
376 | 6 | {{ comment_count }} Comment{% plural %}{{ comment_count }} Comments{% endblocktrans %} | 6 | {{ comment_count }} Comment{% plural %}{{ comment_count }} Comments{% endblocktrans %} |
377 | 7 | </h3> | 7 | </h3> |
378 | 8 | 8 | ||
379 | 9 | <ol id="comments" class="comments"> | 9 | <ol id="comments" class="comments"> |
381 | 10 | {% for comment in team_event_object.teameventcomment_set.all %} | 10 | {% for comment in team_event.teameventcomment_set.all %} |
382 | 11 | <li id="comment-{{ comment.pk }}" class="response"> | 11 | <li id="comment-{{ comment.pk }}" class="response"> |
383 | 12 | <div class="mugshot"> | 12 | <div class="mugshot"> |
384 | 13 | <a href="{% url profile-detail comment.commenter_profile.user.username %}" class="url" title="{{ comment.commenter_profile.user.get_full_name }}"> | 13 | <a href="{% url profile-detail comment.commenter_profile.user.username %}" class="url" title="{{ comment.commenter_profile.user.get_full_name }}"> |
385 | @@ -24,13 +24,13 @@ | |||
386 | 24 | </a> | 24 | </a> |
387 | 25 | <div class="comment-error" style="display:none;"></div> | 25 | <div class="comment-error" style="display:none;"></div> |
388 | 26 | <div class="comment-comment"> | 26 | <div class="comment-comment"> |
390 | 27 | {{ comment.comment|linebreaks|urlize }} | 27 | {{ comment.comment|urlize|linebreaks }} |
391 | 28 | </div> | 28 | </div> |
392 | 29 | <p class="comment-meta"> | 29 | <p class="comment-meta"> |
393 | 30 | <a href="#comment-{{ comment.pk }}" class="posted" title="{{ comment.local_date_created }}"> | 30 | <a href="#comment-{{ comment.pk }}" class="posted" title="{{ comment.local_date_created }}"> |
394 | 31 | {{ comment.local_date_created|date:"d F Y" }}</a> | 31 | {{ comment.local_date_created|date:"d F Y" }}</a> |
395 | 32 | {% if comment.commenter_profile.user.username == user.username %} | 32 | {% if comment.commenter_profile.user.username == user.username %} |
397 | 33 | · <a class="edit" href="#">{% trans "Edit" %}</a> - <a href="{% url team-event-comment-delete comment.id %}?next={{ team_event_object.get_absolute_url }}">{% trans "Delete" %}</a> | 33 | · <a class="edit" href="#">{% trans "Edit" %}</a> - <a href="{% url team-event-comment-delete comment.id %}?next={{ team_event.get_absolute_url }}">{% trans "Delete" %}</a> |
398 | 34 | {% endif %} | 34 | {% endif %} |
399 | 35 | </p> | 35 | </p> |
400 | 36 | </div> | 36 | </div> |
401 | 37 | 37 | ||
402 | === modified file 'loco_directory/templates/venues/venue_detail.html' | |||
403 | --- loco_directory/templates/venues/venue_detail.html 2013-02-21 20:31:16 +0000 | |||
404 | +++ loco_directory/templates/venues/venue_detail.html 2013-05-11 14:16:26 +0000 | |||
405 | @@ -7,7 +7,6 @@ | |||
406 | 7 | <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language={% trans 'en' %}®ion={% trans 'US' %}"></script> | 7 | <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language={% trans 'en' %}®ion={% trans 'US' %}"></script> |
407 | 8 | <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/1.0/src/markerclusterer_packed.js"></script> | 8 | <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/1.0/src/markerclusterer_packed.js"></script> |
408 | 9 | <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-ubuntu-maps.js"></script> | 9 | <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-ubuntu-maps.js"></script> |
409 | 10 | |||
410 | 11 | <script type="text/javascript"> | 10 | <script type="text/javascript"> |
411 | 12 | $(document).ready(function(){ | 11 | $(document).ready(function(){ |
412 | 13 | var x = {{ venue.longitude }}, | 12 | var x = {{ venue.longitude }}, |
413 | @@ -116,7 +115,7 @@ | |||
414 | 116 | <section class="span-3 box_content last"> | 115 | <section class="span-3 box_content last"> |
415 | 117 | <div class="sidebar-inner"> | 116 | <div class="sidebar-inner"> |
416 | 118 | <h3 class="title">{% trans "Photos" %}</h3> | 117 | <h3 class="title">{% trans "Photos" %}</h3> |
418 | 119 | <div id="pamdiv"></div> | 118 | <div id="pamdiv" style="overflow: hidden;"></div> |
419 | 120 | {% if venue.address %} | 119 | {% if venue.address %} |
420 | 121 | <h3 class="attendees-title"><a href="https://maps.google.com/maps?saddr=&daddr={{ venue.address }}">{% trans "Get directions to this venue" %}</a></h3> | 120 | <h3 class="attendees-title"><a href="https://maps.google.com/maps?saddr=&daddr={{ venue.address }}">{% trans "Get directions to this venue" %}</a></h3> |
421 | 122 | {% endif %} | 121 | {% endif %} |