-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a view suitable for embedding elsewhere
This view lacks the usual navigation features, footers and headers.
- Loading branch information
1 parent
fb55e75
commit 0ac9d49
Showing
5 changed files
with
92 additions
and
58 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
wafer/schedule/templates/wafer.schedule/embed_schedule.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{% load static from staticfiles %} | ||
{% load i18n %} | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>{% block title %}{% trans "Schedule" %} - {{ WAFER_CONFERENCE_NAME }}{% endblock %}</title> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link href="{% static 'vendor/bootstrap/dist/css/bootstrap.min.css' %}" rel="stylesheet"> | ||
<link href="{% static 'vendor/@fortawesome/fontawesome-free-webfonts/css/fontawesome.css' %}" rel="stylesheet"> | ||
<link href="{% static 'vendor/@fortawesome/fontawesome-free-webfonts/css/fa-solid.css' %}" rel="stylesheet"> | ||
<link href="{% static 'css/wafer.css' %}" rel="stylesheet"> | ||
{% block extra_head %}{% endblock %} | ||
</head> | ||
<body> | ||
{% block content %} | ||
<section class="wafer wafer-schedule"> | ||
{% block schedule_grid %} | ||
{% include "wafer.schedule/static_schedule.html" %} | ||
{% endblock %} | ||
</section> | ||
{% endblock %} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
wafer/schedule/templates/wafer.schedule/static_schedule.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{% load i18n %} | ||
<div class="wafer_schedule"> | ||
{% if not schedule_days %} | ||
{# Schedule is incomplete / invalid, so show nothing #} | ||
{% blocktrans %} | ||
<p>The final schedule has not been published yet.</p> | ||
{% endblocktrans %} | ||
{% else %} | ||
{% if next_day or prev_day %} | ||
<div class="clearfix d-print-none"> | ||
{% url 'wafer_full_schedule' as schedule_url %} | ||
{% if prev_day %} | ||
<a href="{{ schedule_url }}?day={{ prev_day }}" | ||
class="float-left btn btn-secondary btn-lg">{% trans "Previous Day" %}</a> | ||
{% endif %} | ||
{% if next_day %} | ||
<a href="{{ schedule_url }}?day={{ next_day }}" | ||
class="float-right btn btn-secondary btn-lg">{% trans "Next Day" %}</a> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
{% for schedule_day in schedule_days %} | ||
<table cellspacing=1 cellpadding=0> | ||
{# We assume that the admin has created a valid timetable #} | ||
<tr> | ||
<td colspan="{{ schedule_day.venues|length|add:1 }}" class="title"> | ||
<a href="?day={{ schedule_day.day.date.isoformat }}"> | ||
{{ schedule_day.day.date|date:"l (d b)" }} | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>{% trans "Time" %}</th> | ||
{% for venue in schedule_day.venues %} | ||
<th><a href="{{ venue.get_absolute_url }}">{{ venue.name }}</a></th> | ||
{% endfor %} | ||
</tr> | ||
{% for row in schedule_day.rows %} | ||
<tr> | ||
<td class="scheduleslot">{{ row.slot.get_start_time|time:"H:i" }} - {{ row.slot.end_time|time:"H:i" }}</td> | ||
{% for item in row.get_sorted_items %} | ||
{% if item.item == "unavailable" %} | ||
{# Venue isn't available, so we add an empty table element with the 'unavailable' class #} | ||
<td colspan="{{ item.colspan }}" rowspan="{{ item.rowspan }}" class="unavailable"></td> | ||
{% else %} | ||
{# Add item details #} | ||
<td colspan="{{ item.colspan }}" rowspan="{{ item.rowspan }}" | ||
class="{{ item.item.get_css_classes|join:' ' }}"> | ||
{% include "wafer.schedule/schedule_item.html" with item=item.item %} | ||
</td> | ||
{% endif %} | ||
{% endfor %} | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
{% endfor %} | ||
{% endif %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters