|
75 | 75 | {% endif %} |
76 | 76 | </p> |
77 | 77 |
|
78 | | - <div class="edit-grid {% if not can_edit %}read-only{% endif %}"> |
79 | | - |
80 | | - {# using the same markup in both room labels and the actual days ensures they are aligned #} |
81 | | - <div class="room-label-column"> |
82 | | - {% for day_data in days.values %} |
83 | | - <div class="day"> |
84 | | - <div class="day-label"> |
85 | | - <strong> </strong><br> |
86 | | - |
87 | | - </div> |
88 | | - |
89 | | - {% for rgroup in day_data %} |
90 | | - <div class="room-group"> |
91 | | - <div class="time-header"><div class="time-label"></div></div> |
92 | | - {% for room_data in rgroup %}{% with room_data.room as room %} |
93 | | - <div class="timeslots"> |
94 | | - <div class="room-name"> |
95 | | - <strong>{{ room.name }}</strong><br> |
96 | | - {% if room.capacity %}{{ room.capacity }} <i class="fa fa-user-o"></i>{% endif %} |
97 | | - </div> |
98 | | - </div> |
99 | | - {% endwith %}{% endfor %} |
| 78 | + {% if timeslot_groups|length == 0 %} |
| 79 | + <p> |
| 80 | + No timeslots exist for this meeting yet. |
| 81 | + </p> |
| 82 | + <p> |
| 83 | + <a href="{% url "ietf.meeting.views.edit_timeslots" num=meeting.number %}"> |
| 84 | + Edit timeslots. |
| 85 | + </a> |
| 86 | + </p> |
| 87 | + {% else %} |
| 88 | + <div class="edit-grid {% if not can_edit %}read-only{% endif %}"> |
| 89 | + {# using the same markup in both room labels and the actual days ensures they are aligned #} |
| 90 | + <div class="room-label-column"> |
| 91 | + {% for day_data in days.values %} |
| 92 | + <div class="day"> |
| 93 | + <div class="day-label"> |
| 94 | + <strong> </strong><br> |
| 95 | + |
100 | 96 | </div> |
101 | | - {% endfor %} |
102 | | - </div> |
103 | | - {% endfor %} |
104 | | - </div> |
105 | | - |
106 | | - <div class="day-flow"> |
107 | | - {% for day, day_data in days.items %} |
108 | | - <div class="day"> |
109 | | - <div class="day-label"> |
110 | | - <strong>{{ day|date:"l" }}</strong> |
111 | | - <i class="fa fa-exchange swap-days" |
112 | | - data-dayid="{{ day.isoformat }}" |
113 | | - data-start="{{ day.isoformat }}"></i> |
114 | | - <br> |
115 | | - {{ day|date:"N j, Y" }} |
116 | | - </div> |
117 | 97 |
|
118 | | - {% for rgroup in day_data %} |
119 | | - <div class="room-group" |
120 | | - data-index="{{ forloop.counter0 }}" |
121 | | - data-rooms="{% for r in rgroup %}{{ r.room.pk }}{% if not forloop.last %},{% endif %}{% endfor %}"> |
122 | | - <div class="time-header"> |
123 | | - {# All rooms in a group have same timeslots; grab the first for the labels #} |
124 | | - {% for t in rgroup.0.timeslots %} |
125 | | - <div class="time-label" style="width: {{ t.layout_width }}rem"> |
126 | | - <span> |
127 | | - {{ t.time|date:"G:i" }} - {{ t.end_time|date:"G:i" }} |
128 | | - <i class="fa fa-exchange swap-timeslot-col" |
129 | | - data-origin-label="{{ day|date:"l, N j" }}, {{ t.time|date:"G:i" }}-{{ t.end_time|date:"G:i" }}" |
130 | | - data-start="{{ t.utc_start_time.isoformat }}" |
131 | | - data-timeslot-pk="{{ t.pk }}"></i> |
132 | | - </span> |
| 98 | + {% for rgroup in day_data %} |
| 99 | + <div class="room-group"> |
| 100 | + <div class="time-header"><div class="time-label"></div></div> |
| 101 | + {% for room_data in rgroup %}{% with room_data.room as room %} |
| 102 | + <div class="timeslots"> |
| 103 | + <div class="room-name"> |
| 104 | + <strong>{{ room.name }}</strong><br> |
| 105 | + {% if room.capacity %}{{ room.capacity }} <i class="fa fa-user-o"></i>{% endif %} |
| 106 | + </div> |
133 | 107 | </div> |
134 | | - {% endfor %} |
| 108 | + {% endwith %}{% endfor %} |
135 | 109 | </div> |
136 | | - {% for room_data in rgroup %}{% with room_data.room as room %} |
137 | | - <div class="timeslots" data-roomcapacity="{{ room.capacity }}"> |
138 | | - {% for t in room_data.timeslots %} |
139 | | - <div id="timeslot{{ t.pk }}" |
140 | | - class="timeslot {{ t.start_end_group }}" |
141 | | - data-start="{{ t.utc_start_time.isoformat }}" |
142 | | - data-end="{{ t.utc_end_time.isoformat }}" |
143 | | - data-duration="{{ t.duration.total_seconds }}" |
144 | | - data-scheduledatlabel="{{ t.time|date:"l G:i" }}-{{ t.end_time|date:"G:i" }}" |
145 | | - data-type="{{ t.type.slug }}" |
146 | | - style="width: {{ t.layout_width }}rem;"> |
147 | | - <div class="time-label"> |
148 | | - <div class="past-flag"> {# blank div keeps time centered vertically #}</div> |
149 | | - <div>{{ t.time|date:"G:i" }} - {{ t.end_time|date:"G:i" }}</div> |
150 | | - <div class="past-flag">Past</div> |
151 | | - </div> |
| 110 | + {% endfor %} |
| 111 | + </div> |
| 112 | + {% endfor %} |
| 113 | + </div> |
152 | 114 |
|
153 | | - <div class="drop-target"> |
154 | | - {% for assignment, session in t.session_assignments %} |
155 | | - {% include "meeting/edit_meeting_schedule_session.html" %} |
156 | | - {% endfor %} |
157 | | - </div> |
| 115 | + <div class="day-flow"> |
| 116 | + {% for day, day_data in days.items %} |
| 117 | + <div class="day"> |
| 118 | + <div class="day-label"> |
| 119 | + <strong>{{ day|date:"l" }}</strong> |
| 120 | + <i class="fa fa-exchange swap-days" |
| 121 | + data-dayid="{{ day.isoformat }}" |
| 122 | + data-start="{{ day.isoformat }}"></i> |
| 123 | + <br> |
| 124 | + {{ day|date:"N j, Y" }} |
| 125 | + </div> |
| 126 | + |
| 127 | + {% for rgroup in day_data %} |
| 128 | + <div class="room-group" |
| 129 | + data-index="{{ forloop.counter0 }}" |
| 130 | + data-rooms="{% for r in rgroup %}{{ r.room.pk }}{% if not forloop.last %},{% endif %}{% endfor %}"> |
| 131 | + <div class="time-header"> |
| 132 | + {# All rooms in a group have same timeslots; grab the first for the labels #} |
| 133 | + {% for t in rgroup.0.timeslots %} |
| 134 | + <div class="time-label" style="width: {{ t.layout_width }}rem"> |
| 135 | + <span> |
| 136 | + {{ t.time|date:"G:i" }} - {{ t.end_time|date:"G:i" }} |
| 137 | + <i class="fa fa-exchange swap-timeslot-col" |
| 138 | + data-origin-label="{{ day|date:"l, N j" }}, {{ t.time|date:"G:i" }}-{{ t.end_time|date:"G:i" }}" |
| 139 | + data-start="{{ t.utc_start_time.isoformat }}" |
| 140 | + data-timeslot-pk="{{ t.pk }}"></i> |
| 141 | + </span> |
158 | 142 | </div> |
159 | 143 | {% endfor %} |
160 | 144 | </div> |
161 | | - {% endwith %}{% endfor %} |
162 | | - </div> |
163 | | - {% endfor %} |
164 | | - </div> |
165 | | - {% endfor %} |
| 145 | + {% for room_data in rgroup %}{% with room_data.room as room %} |
| 146 | + <div class="timeslots" data-roomcapacity="{{ room.capacity }}"> |
| 147 | + {% for t in room_data.timeslots %} |
| 148 | + <div id="timeslot{{ t.pk }}" |
| 149 | + class="timeslot {{ t.start_end_group }}" |
| 150 | + data-start="{{ t.utc_start_time.isoformat }}" |
| 151 | + data-end="{{ t.utc_end_time.isoformat }}" |
| 152 | + data-duration="{{ t.duration.total_seconds }}" |
| 153 | + data-scheduledatlabel="{{ t.time|date:"l G:i" }}-{{ t.end_time|date:"G:i" }}" |
| 154 | + data-type="{{ t.type.slug }}" |
| 155 | + style="width: {{ t.layout_width }}rem;"> |
| 156 | + <div class="time-label"> |
| 157 | + <div class="past-flag"> {# blank div keeps time centered vertically #}</div> |
| 158 | + <div>{{ t.time|date:"G:i" }} - {{ t.end_time|date:"G:i" }}</div> |
| 159 | + <div class="past-flag">Past</div> |
| 160 | + </div> |
| 161 | + |
| 162 | + <div class="drop-target"> |
| 163 | + {% for assignment, session in t.session_assignments %} |
| 164 | + {% include "meeting/edit_meeting_schedule_session.html" %} |
| 165 | + {% endfor %} |
| 166 | + </div> |
| 167 | + </div> |
| 168 | + {% endfor %} |
| 169 | + </div> |
| 170 | + {% endwith %}{% endfor %} |
| 171 | + </div> |
| 172 | + {% endfor %} |
| 173 | + </div> |
| 174 | + {% endfor %} |
| 175 | + </div> |
166 | 176 | </div> |
167 | | - </div> |
| 177 | + {% endif %} |
168 | 178 |
|
169 | 179 | <div class="scheduling-panel"> |
170 | 180 | <div class="unassigned-container"> |
|
0 commit comments