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
|
Rev | Line | |
---|
[695d358] | 1 | {% load url from future %} |
---|
[32e360b] | 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 | |
---|
[5cbf234] | 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" /> |
---|
[5865e5f] | 10 | <script type="text/javascript" |
---|
[c3e751d] | 11 | src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
---|
[5865e5f] | 12 | |
---|
[32e360b] | 13 | |
---|
| 14 | </head> |
---|
| 15 | <body> |
---|
[3a0c51b] | 16 | <ul class='tab-navigation'> |
---|
[695d358] | 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> |
---|
[ea76b01] | 20 | {% if perms.finance_core.use_reporting %} |
---|
[695d358] | 21 | <li{% ifequal pagename "reporting" %} class='selected'{% endifequal %}><a href="{% url "reporting" %}">Reporting</a></li> |
---|
[ea76b01] | 22 | {% endif %} |
---|
[0671644] | 23 | {% if user.is_staff %} |
---|
[695d358] | 24 | <li><a href='{% url "admin:index" %}'>Django Admin</a></li> |
---|
[0671644] | 25 | {% endif %} |
---|
[3a0c51b] | 26 | </ul> |
---|
| 27 | <div id='content'> |
---|
[0f53aae] | 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}} <<span class='username'>{{user.username}}</span>>.</p> |
---|
| 33 | {% else %} |
---|
| 34 | <p>Welcome, <span class='username'>{{user.username}}</span>.</p> |
---|
| 35 | {% endif %} |
---|
[695d358] | 36 | <p><a href='{% url "logout" %}'>Logout</a></p> |
---|
[0f53aae] | 37 | </div> |
---|
| 38 | {% endif %} |
---|
[32e360b] | 39 | {% block content %}{% endblock %} |
---|
[3a0c51b] | 40 | </div> |
---|
[32e360b] | 41 | </body> |
---|
| 42 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.