forked from CGM_Public/pretix_original
Add day calendar to organizer page (#2100)
Co-authored-by: Richard Schreiber <wiffbi@gmail.com> Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -20,21 +20,26 @@
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-sm-6 col-xs-12 text-left flip">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="?{% url_replace request "style" "list" "week" "" "year" "" "month" "" %}" type="button" class="btn btn-default">
|
||||
<a href="?{% url_replace request "style" "list" "week" "" "year" "" "month" "" "date" "" %}" type="button" class="btn btn-default">
|
||||
<span class="fa fa-list" aria-hidden="true"></span>
|
||||
{% trans "List" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "week" "old" "" "month" "" "year" "" %}" type="button"
|
||||
<a href="?{% url_replace request "style" "week" "old" "" "month" "" "year" "" "date" "" %}" type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-calendar" aria-hidden="true"></span>
|
||||
{% trans "Week" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "calendar" "old" "" "week" "" %}"
|
||||
<a href="?{% url_replace request "style" "calendar" "old" "" "week" "" "date" "" %}"
|
||||
type="button"
|
||||
class="btn btn-default active">
|
||||
<span class="fa fa-calendar" aria-hidden="true"></span>
|
||||
{% trans "Month" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "day" "week" "" "month" "" "old" "" "page" "" %}" type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-th" aria-hidden="true"></span>
|
||||
{% trans "Day" %}
|
||||
</a>
|
||||
</div>
|
||||
<a href="{% eventurl request.organizer "presale:organizer.ical" %}?{% url_replace request "locale" request.LANGUAGE_CODE "page" "" "old" "" "week" "" "style" "" "month" "" "year" "" %}"
|
||||
class="btn btn-default">
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
{% extends "pretixpresale/organizers/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load rich_text %}
|
||||
{% load eventurl %}
|
||||
{% load urlreplace %}
|
||||
{% block title %}{% trans "Event overview" %}{% endblock %}
|
||||
{% block content %}
|
||||
{% if organizer_homepage_text %}
|
||||
<div>
|
||||
{{ organizer_homepage_text | rich_text }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<h3>{{ date|date:"DATE_FORMAT" }}</h3>
|
||||
<form class="form-inline" method="get" id="monthselform"
|
||||
action="{% eventurl request.organizer "presale:organizer.index" %}">
|
||||
{% for f, v in request.GET.items %}
|
||||
{% if f != "date" %}
|
||||
<input type="hidden" name="{{ f }}" value="{{ v }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="row">
|
||||
<div class="col-sm-4 hidden-xs text-left flip">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="?{% url_replace request "style" "list" "week" "" "year" "" "month" "" "date" "" %}" type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-list" aria-hidden="true"></span>
|
||||
{% trans "List" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "week" "month" "" "old" "" "date" "" %}" type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-calendar" aria-hidden="true"></span>
|
||||
{% trans "Week" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "calendar" "week" "" "old" "" "year" "" "date" "" %}"
|
||||
type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-calendar" aria-hidden="true"></span>
|
||||
{% trans "Month" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "day" "week" "" "month" "" "old" "" "page" "" %}" type="button"
|
||||
class="btn btn-default active">
|
||||
<span class="fa fa-th" aria-hidden="true"></span>
|
||||
{% trans "Day" %}
|
||||
</a>
|
||||
</div>
|
||||
<a href="{% eventurl request.organizer "presale:organizer.ical" %}?{% url_replace request "locale" request.LANGUAGE_CODE "page" "" "old" "" "week" "" "style" "" "month" "" "year" "" "date" "" %}"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-calendar-plus-o" aria-hidden="true"></span>
|
||||
{% trans "iCal" %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-12 text-center">
|
||||
<input class="datepickerfield form-control" value="{{ date|date:"SHORT_DATE_FORMAT" }}" name="date">
|
||||
<button type="submit" class="js-hidden btn btn-default">
|
||||
{% trans "Go" %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm-4 hidden-xs text-right flip">
|
||||
{% if has_before %}
|
||||
<a href="?{% url_replace request "date" before.date.isoformat %}"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
{{ before|date:"SHORT_DATE_FORMAT" }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if has_after %}
|
||||
<a href="?{% url_replace request "date" after.date.isoformat %}"
|
||||
class="btn btn-default">
|
||||
{{ after|date:"SHORT_DATE_FORMAT" }}
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% include "pretixpresale/fragment_day_calendar.html" with show_avail=request.organizer.settings.event_list_availability %}
|
||||
<div class="col-sm-4 visible-xs text-center">
|
||||
{% if has_before %}
|
||||
<a href="?{% url_replace request "date" before.date.isoformat %}"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-arrow-left" aria-hidden="true"></span>
|
||||
{{ before|date:"SHORT_DATE_FORMAT" }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if has_after %}
|
||||
<a href="?{% url_replace request "date" after.date.isoformat %}"
|
||||
class="btn btn-default">
|
||||
{{ after|date:"SHORT_DATE_FORMAT" }}
|
||||
<span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if multiple_timezones %}
|
||||
<div class="alert alert-info">
|
||||
{% blocktrans trimmed %}
|
||||
Note that the events in this view are in different timezones.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -21,22 +21,27 @@
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-sm-6 col-xs-12 text-left flip">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="?{% url_replace request "style" "list" "week" "" "year" "" "month" "" %}" type="button"
|
||||
<a href="?{% url_replace request "style" "list" "week" "" "year" "" "month" "" "date" "" %}" type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-list" aria-hidden="true"></span>
|
||||
{% trans "List" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "week" "month" "" "old" "" %}" type="button"
|
||||
<a href="?{% url_replace request "style" "week" "month" "" "old" "" "date" "" %}" type="button"
|
||||
class="btn btn-default active">
|
||||
<span class="fa fa-calendar" aria-hidden="true"></span>
|
||||
{% trans "Week" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "calendar" "week" "" "old" "" "year" "" %}"
|
||||
<a href="?{% url_replace request "style" "calendar" "week" "" "old" "" "year" "" "date" "" %}"
|
||||
type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-calendar" aria-hidden="true"></span>
|
||||
{% trans "Month" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "day" "week" "" "month" "" "old" "" "page" "" %}" type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-th" aria-hidden="true"></span>
|
||||
{% trans "Day" %}
|
||||
</a>
|
||||
</div>
|
||||
<a href="{% eventurl request.organizer "presale:organizer.ical" %}?{% url_replace request "locale" request.LANGUAGE_CODE "page" "" "old" "" "week" "" "style" "" "month" "" "year" "" %}"
|
||||
class="btn btn-default">
|
||||
|
||||
@@ -28,21 +28,26 @@
|
||||
{% endif %}
|
||||
<div>
|
||||
<div class="btn-group" role="group">
|
||||
<a href="?{% url_replace request "style" "list" "week" "" "year" "" "month" "" %}" type="button"
|
||||
<a href="?{% url_replace request "style" "list" "week" "" "year" "" "month" "" "date" ""%}" type="button"
|
||||
class="btn btn-default active">
|
||||
<span class="fa fa-list" aria-hidden="true"></span>
|
||||
{% trans "List" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "week" "month" "" "old" "" "page" "" %}" type="button"
|
||||
<a href="?{% url_replace request "style" "week" "month" "" "old" "" "page" "" "date" "" %}" type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-calendar" aria-hidden="true"></span>
|
||||
{% trans "Week" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "calendar" "week" "" "old" "" "page" "" %}" type="button"
|
||||
<a href="?{% url_replace request "style" "calendar" "week" "" "old" "" "page" "" "date" "" %}" type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-calendar" aria-hidden="true"></span>
|
||||
{% trans "Month" %}
|
||||
</a>
|
||||
<a href="?{% url_replace request "style" "day" "week" "" "month" "" "old" "" "page" "" %}" type="button"
|
||||
class="btn btn-default">
|
||||
<span class="fa fa-th" aria-hidden="true"></span>
|
||||
{% trans "Day" %}
|
||||
</a>
|
||||
</div>
|
||||
<a href="{% eventurl request.organizer "presale:organizer.ical" %}?{% url_replace request "locale" request.LANGUAGE_CODE "page" "" "old" "" "week" "" "style" "" "month" "" "year" "" %}"
|
||||
class="btn btn-default">
|
||||
|
||||
Reference in New Issue
Block a user