mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
pretix.control: sidebar-based navigation
This commit is contained in:
@@ -17,9 +17,11 @@ This project includes the work of others, namely:
|
||||
* Django, (c) Django Software Foundation and contributors, BSD License
|
||||
* Font Awesome, (c) Dave Gandy, SIL Open Font License and MIT License
|
||||
* Bootstrap, (c) Twitter, Inc., MIT License
|
||||
* jQuery, (c) jQuery Foundation and contributors, MIT License
|
||||
* django-formset-js, (c) Ionata Web Solutions, BSD License
|
||||
* CleanerVersion, (c) Jean-Christophe Zulian, Brian King, Andrea Marcacci, Manuel Jeckelmann, Apache License
|
||||
* django-bootstrap3, (c) Dylan Verheul, Apache License
|
||||
* pytz, (c) Stuart Bishop, MIT License
|
||||
* python-dateutil, (c) Yaron de Leeuw, BSD License
|
||||
* startbootstrap-sb-admin-2, (c) Iron Summit Media Strategies, LLC, Apache License
|
||||
* startbootstrap-sb-admin-2, (c) Iron Summit Media Strategies, LLC, Apache License
|
||||
* metismenu, (c) Osman Nuri Okumus, MIT License
|
||||
9
src/pretix/control/static/pretixcontrol/js/metisMenu.min.js
vendored
Normal file
9
src/pretix/control/static/pretixcontrol/js/metisMenu.min.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
* metismenu - v1.1.3
|
||||
* Easy menu jQuery plugin for Twitter Bootstrap 3
|
||||
* https://github.com/onokumus/metisMenu
|
||||
*
|
||||
* Made by Osman Nuri Okumus
|
||||
* Under MIT License
|
||||
*/
|
||||
!function(a,b,c){function d(b,c){this.element=a(b),this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0,doubleTapToGo:!1};d.prototype={init:function(){var b=this.element,d=this.settings.toggle,f=this;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),f.settings.doubleTapToGo&&b.find("li.active").has("ul").children("a").addClass("doubleTapToGo"),b.find("li").has("ul").children("a").on("click."+e,function(b){return b.preventDefault(),f.settings.doubleTapToGo&&f.doubleTapToGo(a(this))&&"#"!==a(this).attr("href")&&""!==a(this).attr("href")?(b.stopPropagation(),void(c.location=a(this).attr("href"))):(a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),void(d&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")))})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]-->",e[0];)return b>4?b:a},doubleTapToGo:function(a){var b=this.element;return a.hasClass("doubleTapToGo")?(a.removeClass("doubleTapToGo"),!0):a.parent().children("ul").length?(b.find(".doubleTapToGo").removeClass("doubleTapToGo"),a.addClass("doubleTapToGo"),!1):void 0},remove:function(){this.element.off("."+e),this.element.removeData(e)}},a.fn[e]=function(b){return this.each(function(){var c=a(this);c.data(e)&&c.data(e).remove(),c.data(e,new d(this,b))}),this}}(jQuery,window,document);
|
||||
25
src/pretix/control/static/pretixcontrol/js/sb-admin-2.js
Normal file
25
src/pretix/control/static/pretixcontrol/js/sb-admin-2.js
Normal file
@@ -0,0 +1,25 @@
|
||||
//Loads the correct sidebar on window load,
|
||||
//collapses the sidebar on window resize.
|
||||
// Sets the min-height of #page-wrapper to window size
|
||||
$(function() {
|
||||
$(window).bind("load resize", function() {
|
||||
topOffset = 50;
|
||||
width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width;
|
||||
if (width < 768) {
|
||||
$('div.navbar-collapse').addClass('collapse');
|
||||
topOffset = 100; // 2-row-menu
|
||||
} else {
|
||||
$('div.navbar-collapse').removeClass('collapse');
|
||||
}
|
||||
|
||||
height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1;
|
||||
height = height - topOffset;
|
||||
if (height < 1) height = 1;
|
||||
if (height > topOffset) {
|
||||
$("#page-wrapper").css("min-height", (height) + "px");
|
||||
}
|
||||
});
|
||||
|
||||
$('ul.nav ul.nav-second-level a.active').parent().parent().addClass('in').parent().addClass('active');
|
||||
$('#side-menu').metisMenu({'toggle': false});
|
||||
});
|
||||
@@ -23,5 +23,5 @@ $(function () {
|
||||
});
|
||||
});
|
||||
}
|
||||
$('.collapse').collapse();
|
||||
$('.collapsible').collapse();
|
||||
});
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
@import "../../../../base/static/bootstrap/less/bootstrap.less";
|
||||
@import "../../../../base/static/fontawesome/less/font-awesome.less";
|
||||
@fa-font-path: "../../fontawesome/fonts";
|
||||
@import (inline) "metisMenu.min.css";
|
||||
@import "variables.less";
|
||||
@import "sb-admin-2.less";
|
||||
@import "forms.less";
|
||||
|
||||
footer {
|
||||
@@ -8,3 +11,11 @@ footer {
|
||||
padding: 10px 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
nav.navbar {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.nav-pills {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
10
src/pretix/control/static/pretixcontrol/less/metisMenu.min.css
vendored
Normal file
10
src/pretix/control/static/pretixcontrol/less/metisMenu.min.css
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* metismenu - v1.1.3
|
||||
* Easy menu jQuery plugin for Twitter Bootstrap 3
|
||||
* https://github.com/onokumus/metisMenu
|
||||
*
|
||||
* Made by Osman Nuri Okumus
|
||||
* Under MIT License
|
||||
*/
|
||||
|
||||
.arrow{float:right;line-height:1.42857}.glyphicon.arrow:before{content:"\e079"}.active>a>.glyphicon.arrow:before{content:"\e114"}.fa.arrow:before{content:"\f104"}.active>a>.fa.arrow:before{content:"\f107"}.plus-times{float:right}.fa.plus-times:before{content:"\f067"}.active>a>.fa.plus-times{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.plus-minus{float:right}.fa.plus-minus:before{content:"\f067"}.active>a>.fa.plus-minus:before{content:"\f068"}
|
||||
364
src/pretix/control/static/pretixcontrol/less/sb-admin-2.less
Normal file
364
src/pretix/control/static/pretixcontrol/less/sb-admin-2.less
Normal file
@@ -0,0 +1,364 @@
|
||||
|
||||
// Global Styles
|
||||
|
||||
body {
|
||||
background-color: @gray-lightest;
|
||||
}
|
||||
|
||||
// Wrappers
|
||||
|
||||
#wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#page-wrapper {
|
||||
padding: 0 15px;
|
||||
min-height: 568px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@media(min-width:768px) {
|
||||
#page-wrapper {
|
||||
position: inherit;
|
||||
margin: 0 0 0 250px;
|
||||
padding: 0 30px;
|
||||
border-left: 1px solid darken(@gray-lightest, 6.5%);
|
||||
}
|
||||
}
|
||||
|
||||
// Navigation
|
||||
|
||||
// --Topbar
|
||||
|
||||
.navbar-top-links {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.navbar-top-links li:last-child {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.navbar-top-links li a {
|
||||
padding: 15px;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li a {
|
||||
padding: 3px 20px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li a div {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages,
|
||||
.navbar-top-links .dropdown-tasks,
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
width: 310px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-tasks {
|
||||
margin-left: -59px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
margin-left: -123px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-user {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
// --Sidebar
|
||||
|
||||
.sidebar {
|
||||
.sidebar-nav.navbar-collapse {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar .sidebar-search {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.sidebar ul li {
|
||||
border-bottom: 1px solid darken(@gray-lightest, 6.5%);
|
||||
a {
|
||||
&.active {
|
||||
background-color: @gray-lighter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar .arrow {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sidebar .fa.arrow:before {
|
||||
content: "\f104";
|
||||
}
|
||||
|
||||
.sidebar .active > a > .fa.arrow:before {
|
||||
content: "\f107";
|
||||
}
|
||||
|
||||
.sidebar .nav-second-level li,
|
||||
.sidebar .nav-third-level li {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.sidebar .nav-second-level li a {
|
||||
padding-left: 37px;
|
||||
}
|
||||
|
||||
.sidebar .nav-third-level li a {
|
||||
padding-left: 52px;
|
||||
}
|
||||
|
||||
@media(min-width:768px) {
|
||||
.sidebar {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
width: 250px;
|
||||
margin-top: 51px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages,
|
||||
.navbar-top-links .dropdown-tasks,
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Buttons
|
||||
|
||||
.btn-outline {
|
||||
color: inherit;
|
||||
background-color: transparent;
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.btn-primary.btn-outline {
|
||||
color: @brand-primary;
|
||||
}
|
||||
|
||||
.btn-success.btn-outline {
|
||||
color: @brand-success;
|
||||
}
|
||||
|
||||
.btn-info.btn-outline {
|
||||
color: @brand-info;
|
||||
}
|
||||
|
||||
.btn-warning.btn-outline {
|
||||
color: @brand-warning;
|
||||
}
|
||||
|
||||
.btn-danger.btn-outline {
|
||||
color: @brand-danger;
|
||||
}
|
||||
|
||||
.btn-primary.btn-outline:hover,
|
||||
.btn-success.btn-outline:hover,
|
||||
.btn-info.btn-outline:hover,
|
||||
.btn-warning.btn-outline:hover,
|
||||
.btn-danger.btn-outline:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
// Chat Widget
|
||||
|
||||
.chat {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.chat li {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px dotted @gray-light;
|
||||
}
|
||||
|
||||
.chat li.left .chat-body {
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
.chat li.right .chat-body {
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
.chat li .chat-body p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.panel .slidedown .glyphicon,
|
||||
.chat .glyphicon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.chat-panel .panel-body {
|
||||
height: 350px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
// Login Page
|
||||
|
||||
.login-panel {
|
||||
margin-top: 25%;
|
||||
}
|
||||
|
||||
// Flot Charts Containers
|
||||
|
||||
.flot-chart {
|
||||
display: block;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.flot-chart-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
// DataTables Overrides
|
||||
|
||||
table.dataTable thead .sorting,
|
||||
table.dataTable thead .sorting_asc,
|
||||
table.dataTable thead .sorting_desc,
|
||||
table.dataTable thead .sorting_asc_disabled,
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting_asc:after {
|
||||
content: "\f0de";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting_desc:after {
|
||||
content: "\f0dd";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting:after {
|
||||
content: "\f0dc";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
color: rgba(50,50,50,.5);
|
||||
}
|
||||
|
||||
// Circle Buttons
|
||||
|
||||
.btn-circle {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
padding: 6px 0;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
line-height: 1.428571429;
|
||||
}
|
||||
|
||||
.btn-circle.btn-lg {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 25px;
|
||||
font-size: 18px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.btn-circle.btn-xl {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 35px;
|
||||
font-size: 24px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
// Grid Demo Elements
|
||||
|
||||
.show-grid [class^="col-"] {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
.show-grid {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
// Custom Colored Panels
|
||||
|
||||
.huge {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.panel-green {
|
||||
border-color: @brand-success;
|
||||
.panel-heading {
|
||||
border-color: @brand-success;
|
||||
color: white;
|
||||
background-color: @brand-success;
|
||||
}
|
||||
a {
|
||||
color: @brand-success;
|
||||
&:hover {
|
||||
color: darken(@brand-success, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.panel-red {
|
||||
border-color: @brand-danger;
|
||||
.panel-heading {
|
||||
border-color: @brand-danger;
|
||||
color: white;
|
||||
background-color: @brand-danger;
|
||||
}
|
||||
a {
|
||||
color: @brand-danger;
|
||||
&:hover {
|
||||
color: darken(@brand-danger, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.panel-yellow {
|
||||
border-color: @brand-warning;
|
||||
.panel-heading {
|
||||
border-color: @brand-warning;
|
||||
color: white;
|
||||
background-color: @brand-warning;
|
||||
}
|
||||
a {
|
||||
color: @brand-warning;
|
||||
&:hover {
|
||||
color: darken(@brand-warning, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
src/pretix/control/static/pretixcontrol/less/variables.less
Normal file
11
src/pretix/control/static/pretixcontrol/less/variables.less
Normal file
@@ -0,0 +1,11 @@
|
||||
@gray-darker: lighten(#000, 13.5%);
|
||||
@gray-dark: lighten(#000, 20%);
|
||||
@gray: lighten(#000, 33.5%);
|
||||
@gray-light: lighten(#000, 60%);
|
||||
@gray-lighter: lighten(#000, 93.5%);
|
||||
@gray-lightest: lighten(#000, 97.25%);
|
||||
@brand-primary: #428bca;
|
||||
@brand-success: #5cb85c;
|
||||
@brand-info: #5bc0de;
|
||||
@brand-warning: #f0ad4e;
|
||||
@brand-danger: #d9534f;
|
||||
@@ -7,51 +7,84 @@
|
||||
<title>{% block title %}{% endblock %}{% if url_name != "index" %} :: {% endif %}
|
||||
{{ settings.PRETIX_INSTANCE_NAME }}</title>
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" type="text/less" href="{% static "pretixcontrol/less/main.less" %}" />
|
||||
<link rel="stylesheet" type="text/less" href="{% static "pretixcontrol/less/main.less" %}" />
|
||||
{% endcompress %}
|
||||
{% compress js %}
|
||||
<script type="text/javascript" src="{% static "jquery/js/jquery-2.1.1.min.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "js/jquery.formset.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "bootstrap/dist/js/bootstrap.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/main.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "jquery/js/jquery-2.1.1.min.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "js/jquery.formset.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "bootstrap/dist/js/bootstrap.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixcontrol/js/metisMenu.min.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixcontrol/js/sb-admin-2.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/main.js" %}"></script>
|
||||
{% endcompress %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-default navbar-static-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">{% trans "Toggle navigation" %}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">{{ settings.PRETIX_INSTANCE_NAME }}</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
{% block nav %}
|
||||
<li {% if url_name == "index" %}class="active"{% endif %}><a href="{% url 'control:index' %}">{% trans "Dashboard" %}</a></li>
|
||||
<li {% if "events" in url_name %}class="active"{% endif %}><a href="{% url 'control:events' %}">{% trans "Events" %}</a></li>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="#"><i class="fa fa-user"></i> {{ request.user.get_full_name }}</a></li>
|
||||
<li><a href="{% url 'control:auth.logout' %}" title="{% trans "Log out" %}"><i class="fa fa-sign-out"></i><span class="visible-xs-inline">{% trans "Log out" %}</span></a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<footer>
|
||||
{% with "href='http://pretix.eu'" as a_attr %}
|
||||
{% blocktrans trimmed %}
|
||||
powered by <a {{ a_attr }}>pretix</a>
|
||||
{% endblocktrans %}
|
||||
{% endwith %}
|
||||
</footer>
|
||||
<div id="#wrapper">
|
||||
<nav class="navbar navbar-default navbar-static-top" role="navigation">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">{% trans "Toggle navigation" %}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">{{ settings.PRETIX_INSTANCE_NAME }}</a>
|
||||
</div>
|
||||
<ul class="nav navbar-top-links navbar-left">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-calendar"></i>
|
||||
{{ request.event }} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{% url "control:events" %}">{% trans "Event overview" %}</a></li>
|
||||
{% regroup request.user.events_cache by organizer as event_list %}
|
||||
{% for g in event_list %}
|
||||
<li class="dropdown-header">{{ g.grouper }}</li>
|
||||
{% for e in g.list %}
|
||||
<li><a href="{% url "control:event.index" organizer=g.grouper.slug event=e.slug %}">{{ e.name }}</a></li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
<li><a href="#"><i class="fa fa-user"></i> {{ request.user.get_full_name }}</a></li>
|
||||
<li><a href="{% url 'control:auth.logout' %}" title="{% trans "Log out" %}"><i class="fa fa-sign-out"></i><span class="visible-xs-inline">{% trans "Log out" %}</span></a></li>
|
||||
</ul>
|
||||
<div class="navbar-default sidebar" role="navigation">
|
||||
<div class="sidebar-nav navbar-collapse">
|
||||
<ul class="nav" id="side-menu">
|
||||
{% block nav %}
|
||||
<li>
|
||||
<a href="{% url 'control:index' %}" {% if url_name == "index" %}class="active"{% endif %}>
|
||||
<i class="fa fa-dashboard fa-fw"></i>
|
||||
{% trans "Dashboard" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'control:events' %}" {% if "events" in url_name %}class="active"{% endif %}>
|
||||
<i class="fa fa-calendar fa-fw"></i>
|
||||
{% trans "Events" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
<footer>
|
||||
{% with "href='http://pretix.eu'" as a_attr %}
|
||||
{% blocktrans trimmed %}
|
||||
powered by <a {{ a_attr }}>pretix</a>
|
||||
{% endblocktrans %}
|
||||
{% endwith %}
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2,20 +2,90 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block nav %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-calendar"></i> {{ request.event.slug }} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{% url "control:events" %}">{% trans "Event overview" %}</a></li>
|
||||
{% regroup request.user.events_cache by organizer as event_list %}
|
||||
{% for g in event_list %}
|
||||
<li class="dropdown-header">{{ g.grouper }}</li>
|
||||
{% for e in g.list %}
|
||||
<li><a href="{% url "control:event.index" organizer=g.grouper.slug event=e.slug %}">{{ e.name }}</a></li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<li>
|
||||
<a href="{% url 'control:event.index' organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||
{% if url_name == "event.index" %}class="active"{% endif %}>
|
||||
<i class="fa fa-dashboard fa-fw"></i>
|
||||
{% trans "Dashboard" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-wrench fa-fw"></i>
|
||||
{% trans "Settings" %}
|
||||
<span class="fa arrow"></span>
|
||||
</a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a href="{% url 'control:event.settings' organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||
{% if "event.settings" == url_name %}class="active"{% endif %}>
|
||||
{% trans "General" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'control:event.settings.payment' organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||
{% if "event.settings.payment" == url_name %}class="active"{% endif %}>
|
||||
{% trans "Payment" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'control:event.settings.plugins' organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||
{% if "event.settings.plugins" == url_name %}class="active"{% endif %} >
|
||||
{% trans "Plugins" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-ticket fa-fw"></i>
|
||||
{% trans "Products" %}
|
||||
<span class="fa arrow"></span>
|
||||
</a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a href="{% url 'control:event.items' organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||
{% if "event.items" == url_name or "event.item." in url_name or url_name == "event.item" %}class="active"{% endif %}>
|
||||
{% trans "Items" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'control:event.items.quotas' organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||
{% if "event.items.quotas" in url_name %}class="active"{% endif %}>
|
||||
{% trans "Quotas" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'control:event.items.categories' organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||
{% if "event.items.categories" in url_name %}class="active"{% endif %}>
|
||||
{% trans "Categories" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'control:event.items.properties' organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||
{% if "event.items.properties" in url_name %}class="active"{% endif %}>
|
||||
{% trans "Properties" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'control:event.items.questions' organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||
{% if "event.items.questions" in url_name %}class="active"{% endif %}>
|
||||
{% trans "Questions" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-shopping-cart fa-fw"></i>
|
||||
{% trans "Orders" %}
|
||||
<span class="fa arrow"></span>
|
||||
</a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a href="{% url 'control:event.items' organizer=request.event.organizer.slug event=request.event.slug %}">
|
||||
{% trans "View orders" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li {% if url_name == "event.index" %}class="active"{% endif %}><a href="{% url 'control:event.index' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "Dashboard" %}</a></li>
|
||||
<li {% if "event.settings" in url_name %}class="active"{% endif %}><a href="{% url 'control:event.settings' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "Settings" %}</a></li>
|
||||
<li {% if "event.item" in url_name %}class="active"{% endif %}><a href="{% url 'control:event.items' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "Items" %}</a></li>
|
||||
{% endblock %}
|
||||
|
||||
@@ -4,17 +4,6 @@
|
||||
{% block title %}{{ request.event.name }}{% endblock %}
|
||||
{% block content %}
|
||||
<h1>{% trans "Settings" %}</h1>
|
||||
<ul class="nav nav-pills">
|
||||
<li {% if "event.settings" == url_name %}class="active"{% endif %}>
|
||||
<a href="{% url 'control:event.settings' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "General settings" %}</a>
|
||||
</li>
|
||||
<li {% if "event.settings.payment" == url_name %}class="active"{% endif %}>
|
||||
<a href="{% url 'control:event.settings.payment' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "Payment" %}</a>
|
||||
</li>
|
||||
<li {% if "event.settings.plugins" == url_name %}class="active"{% endif %}>
|
||||
<a href="{% url 'control:event.settings.plugins' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "Plugins" %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% block inside %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<legend>{{ set.title }}</legend>
|
||||
<p>{{ set.description }}</p>
|
||||
<div data-formset class="restriction-formset" data-formset-prefix="{{ set.formset.prefix }}">
|
||||
<div data-formset-body class="panel-group collapse" id="accordion_{{ set.formset.prefix }}">
|
||||
<div data-formset-body class="panel-group collapsible" id="accordion_{{ set.formset.prefix }}">
|
||||
{{ set.formset.management_form }}
|
||||
{% for f in set.formset %}
|
||||
<div class="panel panel-default" data-formset-form>
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% block inside %}
|
||||
<em>{% trans "You have to define and select propreties to be able to configure variations." %}
|
||||
<p><em>{% trans "You have to define and select propreties to be able to configure variations." %}</em></p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Items" %}{% endblock %}
|
||||
{% block content %}
|
||||
<ul class="nav nav-pills">
|
||||
<li {% if "event.items" == url_name %}class="active"{% endif %}><a href="{% url 'control:event.items' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "Items" %}</a></li>
|
||||
<li {% if "event.items.quotas" in url_name %}class="active"{% endif %}><a href="{% url 'control:event.items.quotas' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "Quotas" %}</a></li>
|
||||
<li {% if "event.items.categories" in url_name %}class="active"{% endif %}><a href="{% url 'control:event.items.categories' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "Categories" %}</a></li>
|
||||
<li {% if "event.items.properties" in url_name %}class="active"{% endif %}><a href="{% url 'control:event.items.properties' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "Properties" %}</a></li>
|
||||
<li {% if "event.items.questions" in url_name %}class="active"{% endif %}><a href="{% url 'control:event.items.questions' organizer=request.event.organizer.slug event=request.event.slug %}">{% trans "Questions" %}</a></li>
|
||||
</ul>
|
||||
{% block inside %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user