Merge lp:~cjohnston/summit/add-required-missing into lp:summit

Proposed by Chris Johnston
Status: Merged
Approved by: Michael Hall
Approved revision: 413
Merged at revision: 412
Proposed branch: lp:~cjohnston/summit/add-required-missing
Merge into: lp:summit
Diff against target: 48 lines (+26/-1)
2 files modified
summit/media/css/schedule.css (+5/-1)
summit/schedule/render.py (+21/-0)
To merge this branch: bzr merge lp:~cjohnston/summit/add-required-missing
Reviewer Review Type Date Requested Status
Michael Hall (community) Approve
Review via email: mp+107399@code.launchpad.net

Commit message

Adds a list of required participants and notifies who conflicts when in edit mode.

To post a comment you must log in.
Revision history for this message
Michael Hall (mhall119) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/media/css/schedule.css'
2--- summit/media/css/schedule.css 2012-05-17 11:59:08 +0000
3+++ summit/media/css/schedule.css 2012-05-25 15:01:19 +0000
4@@ -355,6 +355,10 @@
5 /* Warnings */
6 div.meeting ul.participants li.missing {
7 font-weight: bold;
8+ font-size: 12px;
9 color: red !important;
10- text-decoration: line-through !important;
11+}
12+
13+div.meeting ul.participants li.hide-attending {
14+ display: none;
15 }
16
17=== modified file 'summit/schedule/render.py'
18--- summit/schedule/render.py 2012-05-08 01:28:09 +0000
19+++ summit/schedule/render.py 2012-05-25 15:01:19 +0000
20@@ -763,7 +763,28 @@
21 for track in sorted(meeting.tracks.all(), key=lambda x: x.title.lower()):
22 html += ' <li>%s</li>' % escape_strings(track.title.lower())
23 html += ' </ul>\n'
24+ if self.edit:
25+ html += ' <ul class="participants">\n'
26+ for attendee in meeting.attendees:
27+ if attendee in missing:
28+ html += ' <li class="missing">'
29+ else:
30+ html += ' <li class="hide-attending">'
31+ html += '<a href="http://launchpad.net/~%s" ' % escape_strings(attendee.user.username)
32+ html += 'title="%s">' % escape_strings(attendee.user.get_full_name())
33+ html += '%s' % escape_strings(attendee.user.username)
34+ html += '</a>'
35
36+ try:
37+ participant = meeting.participant_set.get(attendee=attendee)
38+ except:
39+ participant = None
40+ if participant and participant.required:
41+ html += (('<img src="%simg/required.png" title="Required" ' +
42+ 'alt="(required)" height="7" width="7"/>')
43+ % settings.MEDIA_URL)
44+ html += '</li>\n'
45+ html += ' </ul>\n'
46 html += '</div>\n'
47
48 if self.track:

Subscribers

People subscribed via source and target branches