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

tidy and pure 1.6 #885

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