Commit 86c0095c authored by Patrick Kimber's avatar Patrick Kimber

tidy and pure 1.6 #885

parent 8bd7dd09
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from booking.tests.scenario import demo_data
......
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from dateutil.relativedelta import relativedelta
from django.core.exceptions import ValidationError
......@@ -87,9 +85,9 @@ reversion.register(Category)
class LocationManager(models.Manager):
def create_location(self, description):
def create_location(self, title):
location = self.model(
description=description,
title=title,
)
location.save()
return location
......
......@@ -16,43 +16,43 @@
{% block content %}
<div class="pure-g">
<div class="pure-u-1">
<div class="pure-menu pure-menu-open pure-menu-horizontal">
<ul>
<li>
<a href="{% url 'project.dash' %}">
<div class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list">
<li class="pure-menu-item">
<a href="{% url 'project.dash' %}" class="pure-menu-link">
<i class="fa fa-reply"></i>
</a>
</li>
{% if user.is_staff %}
<li>
<a href="{% url 'booking.create' %}">
<li class="pure-menu-item">
<a href="{% url 'booking.create' %}" class="pure-menu-link">
<i class="fa fa-calendar-o"></i>
New booking
</a>
</li>
{% endif %}
<li>
<a href="{% url 'booking.list.month' first_prev_month|date:"Y" first_prev_month|date:"m" %}">
<li class="pure-menu-item">
<a href="{% url 'booking.list.month' first_prev_month|date:"Y" first_prev_month|date:"m" %}" class="pure-menu-link">
<i class="fa fa-calendar"></i>
{{ first_prev_month|date:"M Y" }}
</a>
</li>
<li>
<a href="{% url 'booking.list.month' first_next_month|date:"Y" first_next_month|date:"m" %}">
<li class="pure-menu-item">
<a href="{% url 'booking.list.month' first_next_month|date:"Y" first_next_month|date:"m" %}" class="pure-menu-link">
<i class="fa fa-calendar"></i>
{{ first_next_month|date:"M Y" }}
</a>
</li>
{% if not display_today %}
<li>
<a href="{% url 'booking.list' %}">
<li class="pure-menu-item">
<a href="{% url 'booking.list' %}" class="pure-menu-link">
<i class="fa fa-calendar"></i>
Today
</a>
</li>
{% endif %}
<li>
<a href="{% url 'booking.download.calendar' %}">
<li class="pure-menu-item">
<a href="{% url 'booking.download.calendar' %}" class="pure-menu-link">
<i class="fa fa-cloud-download"></i>
Download
</a>
......
......@@ -11,15 +11,15 @@
{% block content %}
<div class="pure-g">
<div class="pure-u-1">
<div class="pure-menu pure-menu-open pure-menu-horizontal">
<ul>
<li>
<a href="{% url 'project.settings' %}">
<div class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list">
<li class="pure-menu-item">
<a href="{% url 'project.settings' %}" class="pure-menu-link">
<i class="fa fa-reply"></i>
</a>
</li>
<li>
<a href="{% url 'booking.category.create' %}">
<li class="pure-menu-item">
<a href="{% url 'booking.category.create' %}" class="pure-menu-link">
<i class="fa fa-calendar"></i>
Create booking category
</a>
......
......@@ -11,22 +11,22 @@
{% block content %}
<div class="pure-g">
<div class="pure-u-1">
<div class="pure-menu pure-menu-open pure-menu-horizontal">
<ul>
<div class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list">
{% if user.is_staff %}
<li>
<a href="{% url 'project.dash' %}">
<li class="pure-menu-item">
<a href="{% url 'project.dash' %}" class="pure-menu-link">
<i class="fa fa-reply"></i>
</a>
</li>
<li>
<a href="{% url 'booking.location.update' object.pk %}">
<li class="pure-menu-item">
<a href="{% url 'booking.location.update' object.pk %}" class="pure-menu-link">
<i class="fa fa-edit"></i>
Edit location
</a>
</li>
<li>
<a href="{% url 'booking.location.list' %}">
<li class="pure-menu-item">
<a href="{% url 'booking.location.list' %}" class="pure-menu-link">
<i class="fa fa-calendar"></i>
Locations
</a>
......
......@@ -12,15 +12,15 @@
{% block content %}
<div class="pure-g">
<div class="pure-u-1">
<div class="pure-menu pure-menu-open pure-menu-horizontal">
<ul>
<li>
<a href="{% url 'project.settings' %}">
<div class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list">
<li class="pure-menu-item">
<a href="{% url 'project.settings' %}" class="pure-menu-link">
<i class="fa fa-reply"></i>
</a>
</li>
<li>
<a href="{% url 'booking.location.create' %}">
<li class="pure-menu-item">
<a href="{% url 'booking.location.create' %}" class="pure-menu-link">
<i class="fa fa-calendar"></i>
Add location
</a>
......
......@@ -17,17 +17,17 @@
{% block content %}
<div class="pure-g">
<div class="pure-u-1">
<div class="pure-menu pure-menu-open pure-menu-horizontal">
<ul>
<li>
<a href="{% url 'booking.list' %}">
<div class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list">
<li class="pure-menu-item">
<a href="{% url 'booking.list' %}" class="pure-menu-link">
<i class="fa fa-calendar"></i>
Bookings
</a>
</li>
{% if user.is_staff %}
<li>
<a href="{% url 'booking.create' %}">
<li class="pure-menu-item">
<a href="{% url 'booking.create' %}" class="pure-menu-link">
<i class="fa fa-calendar-o"></i>
New booking
</a>
......@@ -35,6 +35,10 @@
{% endif %}
</ul>
</div>
</div>
</div>
<div>
<div>
<div class="l-box">
<h3>Public bookings for the next couple of months</h3>
{% for b in public_calendar %}
......
{% extends "mail/base.html" %}
{% load staticfiles %}
{% block sub_title %}
Example Settings
{% endblock sub_title %}
{% block sub_heading %}
Example Settings
{% endblock sub_heading %}
{% block content %}
{% include 'booking/_settings.html' %}
{% endblock content %}
......@@ -4,6 +4,10 @@
Booking
{% endblock title %}
{% block sub_title %}
Home
{% endblock sub_title %}
{% block heading %}
Booking
{% endblock heading %}
......@@ -12,5 +16,11 @@
Example App
{% endblock sub_heading %}
{% block menu %}
<li class="pure-menu-item">
<a class="pure-menu-link" href="{% url 'project.settings' %}">Settings</a>
</li>
{% endblock menu %}
{% block footer %}
{% endblock footer %}
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
......
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.views.generic import TemplateView
from django.contrib.auth.models import AnonymousUser
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment