| 1 | <% |
|---|
| 2 | ## Only show event-level video services. |
|---|
| 3 | event_bookings = filter(lambda x: x.hasSessionOrContributionLink() != True, bookings) |
|---|
| 4 | %> |
|---|
| 5 | % if event_bookings: |
|---|
| 6 | <script type="text/javascript"> |
|---|
| 7 | ## Move this into js folder |
|---|
| 8 | var videoServiceLaunchInfo = {}; |
|---|
| 9 | |
|---|
| 10 | </script> |
|---|
| 11 | <tr> |
|---|
| 12 | <td class="leftCol">Video Services</td> |
|---|
| 13 | <td> |
|---|
| 14 | <div> |
|---|
| 15 | % for pos, booking in enumerate(event_bookings): |
|---|
| 16 | <% bookingId = booking.getId() %> |
|---|
| 17 | % if pos == 2: |
|---|
| 18 | <div id="collShowBookingsDiv" class="collaborationDisplayInfoLine"> |
|---|
| 19 | <span class="collShowHideBookingsText"> |
|---|
| 20 | <% |
|---|
| 21 | moreOngoing = sum(1 for b in bookings[pos + 1:] if getBookingType(b) == 'ongoing') |
|---|
| 22 | moreScheduled = sum(1 for b in bookings[pos + 1:] if getBookingType(b) == 'scheduled') |
|---|
| 23 | %> |
|---|
| 24 | There are |
|---|
| 25 | % if getBookingType(booking) == 'ongoing': |
|---|
| 26 | ${ 1 + moreOngoing } more ongoing bookings |
|---|
| 27 | % if moreScheduled > 0: |
|---|
| 28 | and ${moreScheduled} more scheduled bookings. |
|---|
| 29 | % endif |
|---|
| 30 | % elif getBookingType(booking) == 'scheduled': |
|---|
| 31 | ${ 1 + moreScheduled } more scheduled bookings. |
|---|
| 32 | % endif |
|---|
| 33 | </span> |
|---|
| 34 | <span id="collShowBookings" class="fakeLink collShowBookingsText">Show</span> |
|---|
| 35 | </div> |
|---|
| 36 | </div> |
|---|
| 37 | |
|---|
| 38 | <div id="collHiddenBookings" style="display:none; overflow: hidden;"> |
|---|
| 39 | % endif |
|---|
| 40 | |
|---|
| 41 | <!-- Start of a booking line --> |
|---|
| 42 | <% data = bookingData[booking.getType()] %> |
|---|
| 43 | <% launchInfo = data.getLaunchInfo(booking) %> |
|---|
| 44 | <% bookingInfo = data.getInformation(booking) %> |
|---|
| 45 | <div class="collaborationDisplayBookingLine"> |
|---|
| 46 | <span class="videoServiceWrapper"> |
|---|
| 47 | <span class="collaborationDisplayBookingType">${data.getDisplayName()}</span> |
|---|
| 48 | <span class="collaborationDisplayBookingTitle"> |
|---|
| 49 | % if booking.hasStartDate(): |
|---|
| 50 | ${getBookingType(booking)} |
|---|
| 51 | ${formatTwoDates(booking.getAdjustedStartDate(timezone), |
|---|
| 52 | booking.getAdjustedEndDate(timezone), |
|---|
| 53 | useToday=True, useTomorrow=True, dayFormat='%a %d/%m', capitalize=False)}\ |
|---|
| 54 | % endif |
|---|
| 55 | % if data.getFirstLineInfo(booking): |
|---|
| 56 | : ${data.getFirstLineInfo(booking)}\ |
|---|
| 57 | % else: |
|---|
| 58 | .\ |
|---|
| 59 | % endif |
|---|
| 60 | </span> |
|---|
| 61 | <!-- <span style="margin-left:20px;"></span> --> |
|---|
| 62 | |
|---|
| 63 | % if bookingInfo: |
|---|
| 64 | <span class="collaborationDisplayMoreInfo">More Info</span> |
|---|
| 65 | % endif |
|---|
| 66 | |
|---|
| 67 | % if bookingInfo and launchInfo: |
|---|
| 68 | <span style="margin-left:3px;margin-right:3px;">|</span> |
|---|
| 69 | % endif |
|---|
| 70 | |
|---|
| 71 | % if launchInfo: |
|---|
| 72 | <a target="_blank" href="${launchInfo['launchLink']}" class="bookingLaunchLink" data-id="${bookingId}"> |
|---|
| 73 | ${launchInfo['launchText']} |
|---|
| 74 | </a> |
|---|
| 75 | <script type="text/javascript"> |
|---|
| 76 | videoServiceLaunchInfo["${bookingId}"] = ${jsonEncode(launchInfo['launchTooltip'])}; |
|---|
| 77 | </script> |
|---|
| 78 | % endif |
|---|
| 79 | % if (bookingInfo or launchInfo) and booking.canBeConnected() and self_._rh._getUser() and (conf.canModify(self_._rh._aw) or booking.getOwner()["id"] == self_._rh._getUser().getId()): |
|---|
| 80 | <span style="margin-left:3px;margin-right:3px;">|</span> |
|---|
| 81 | <script type="text/javascript"> |
|---|
| 82 | var booking${booking.getId()} = ${jsonEncode(fossilize(booking))}; |
|---|
| 83 | </script> |
|---|
| 84 | <a href="#" style="font-size:12px; font-weight: bold" onClick="connectBookingRoom(booking${booking.getId()},'${conf.getId()}')">${_("Connect")} ${booking.getLinkVideoRoomLocation()}</a> |
|---|
| 85 | <span style="display:inline; vertical-align:middle" id="connectProgress${booking.getId()}"></span> |
|---|
| 86 | % endif |
|---|
| 87 | |
|---|
| 88 | </span> |
|---|
| 89 | |
|---|
| 90 | % if bookingInfo: |
|---|
| 91 | <!-- Start of a booking info line --> |
|---|
| 92 | <div class="collabInfoInline" style="overflow: hidden; display: none;"> |
|---|
| 93 | <div class="collaborationDisplayInfoLine"> |
|---|
| 94 | <table> |
|---|
| 95 | <tbody> |
|---|
| 96 | % for section in bookingInfo: |
|---|
| 97 | <tr> |
|---|
| 98 | <td class="collaborationDisplayInfoLeftCol"> |
|---|
| 99 | <span>${section['title']}</span> |
|---|
| 100 | </td> |
|---|
| 101 | <td class="collaborationDisplayInfoRightCol"> |
|---|
| 102 | % for line in section.get('lines', []): |
|---|
| 103 | <div style="display:inline">${line}</div> |
|---|
| 104 | % endfor |
|---|
| 105 | % if section['title'] == _("Moderator") and self_._rh._getUser() and conf.canModify(self_._rh._aw) and booking.getOwner()["id"] != self_._rh._getUser().getId(): |
|---|
| 106 | <div style="display:inline; vertical-align:bottom"><a href="#" style="font-size:12px" onClick= "makeMeModerator(this,${conf.getId()},${booking.getId()}, successMakeEventModerator)">${_("Make me moderator")}</a></div> |
|---|
| 107 | % endif |
|---|
| 108 | % for caption, href in section.get('linkLines', []): |
|---|
| 109 | <div style="display:inline"><a href="${href}" target="_blank">${caption}</a></div> |
|---|
| 110 | % endfor |
|---|
| 111 | </td> |
|---|
| 112 | </tr> |
|---|
| 113 | % endfor |
|---|
| 114 | </tbody> |
|---|
| 115 | </table> |
|---|
| 116 | </div> |
|---|
| 117 | </div> |
|---|
| 118 | % endif |
|---|
| 119 | <!-- End of a booking info line --> |
|---|
| 120 | </div> |
|---|
| 121 | <!-- End of a booking line --> |
|---|
| 122 | % endfor |
|---|
| 123 | </div> |
|---|
| 124 | </td> |
|---|
| 125 | </tr> |
|---|
| 126 | |
|---|
| 127 | % endif |
|---|