source: remit/remit_templates/base.html @ 6479b5c

Last change on this file since 6479b5c was 695d358, checked in by Alex Dehnert <adehnert@…>, 11 years ago

Django 1.6: use new {% url %} syntax

Starting in Django 1.5, the argument to {% url %} is treated as a variable,
rather than a literal. To get a literal, we need to enclose the argument in
quotes. For Django 1.4 support, we also want to do {% load url from future %}
-- probably in more places than just base.html, but we'll see.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1{% load url from future %}
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5  <head>
6    <title>{% block title %}TITLE{% endblock %}</title>
7
8    <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}style/style.css" />
9    <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}style/default.css" />
10    <script type="text/javascript"
11        src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
12
13
14  </head>
15  <body>
16    <ul class='tab-navigation'>
17        <li{% ifequal pagename "homepage" %} class='selected'{% endifequal %}><a href="{% url "homepage" %}">Home</a></li>
18        <li{% ifequal pagename "request_reimbursement" %} class='selected'{% endifequal %}><a href="{% url "request_reimbursement" %}">Request reimbursement</a></li>
19        <li{% ifequal pagename "list_requests" %} class='selected'{% endifequal %}><a href="{% url "list_requests" %}">List requests</a></li>
20        {% if perms.finance_core.use_reporting %}
21        <li{% ifequal pagename "reporting" %} class='selected'{% endifequal %}><a href="{% url "reporting" %}">Reporting</a></li>
22        {% endif %}
23        {% if user.is_staff %}
24        <li><a href='{% url "admin:index" %}'>Django Admin</a></li>
25        {% endif %}
26    </ul>
27    <div id='content'>
28        {% if user.is_authenticated %}
29        <div class='curuser'>
30            <div class='spacer'></div>
31            {% if user.first_name and user.last_name %}
32            <p>Welcome, {{user.first_name}} {{user.last_name}} &lt;<span class='username'>{{user.username}}</span>&gt;.</p>
33            {% else %}
34            <p>Welcome, <span class='username'>{{user.username}}</span>.</p>
35            {% endif %}
36            <p><a href='{% url "logout" %}'>Logout</a></p>
37        </div>
38        {% endif %}
39{% block content %}{% endblock %}
40    </div>
41  </body>
42</html>
Note: See TracBrowser for help on using the repository browser.