aboutsummaryrefslogtreecommitdiff
path: root/templates/base.html
blob: 3f1d363e9a1f50d9ec9d9f5f5a773b542fb3c9e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{% load staticfiles %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <title>{% block title %}Patchwork{% endblock %} - Patchwork</title>
  <link rel="stylesheet" type="text/css" href="{% static "css/bootstrap.min.css" %}"/>
  <link rel="stylesheet" type="text/css" href="{% static "css/style.css" %}"/>
  <script type="text/javascript" src="{% static "js/common.js" %}"></script>
  <script type="text/javascript" src="{% static "js/jquery-1.10.1.min.js" %}"></script>
  <!-- IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js">
    </script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
  <script type="text/javascript" src="{% static "js/bootstrap.min.js" %}"></script>
{% block headers %}{% endblock %}
 </head>
 <body>
  <nav class="navbar navbar-patchwork" role="navigation">
   <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand"><a
         href="{% url 'patchwork.views.projects' %}">Patchwork</a>
       {% block heading %}{% endblock %}</span>
    </div>
    <div class="collapse navbar-collapse" id="navbar-collapse">
     <ul class="nav navbar-nav navbar-right">
{% if project %}
     <li><a href="{% url 'patchwork.views.project.project' project_id=project.linkname %}"
      >Project Info</a></li>
    <li><p class="navbar-text">|</p></li>
{% endif %}
{% if user.is_authenticated %}
     <li><p class="navbar-text">Logged in as <a href="{% url 'patchwork.views.user.profile' %}"
     ><strong>{{ user.username }}</strong></a></p></li>
     <li><a href="{% url 'patchwork.views.user.todo_lists' %}">todo
      ({{ user.profile.n_todo_patches }})</a></li>
     <li><a href="{% url 'patchwork.views.bundle.bundles' %}">bundles</a></li>
     <li><a href="{% url 'patchwork.views.user.profile' %}">profile</a></li>
{% if user.is_staff %}
     <li><a href="{% url 'admin:index' %}">admin</a></li>
{% endif %}
     <li><a href="{% url 'auth_logout' %}">logout</a></li>
{% else %}
     <li><a href="{% url 'auth_login' %}">login</a></li>
     <li><a href="{% url 'patchwork.views.user.register' %}">register</a></li>
     <li><a href="{% url 'patchwork.views.mail.settings' %}">mail settings</a></li>
{% endif %}
    </div>
   </div>
  </nav>
{% if project %}
  <div id="breadcrumb">
   <div id="breadcrumb-left">
     <a href="{% url 'patchwork.views.projects' %}">All projects</a>
     &#8594;
     {% block breadcrumb %}
      <a href="{% url 'patchwork.views.patch.list' project_id=project.linkname %}"
       >{{ project.linkname }} patches</a>
     {% endblock %}
   </div>
   <div style="clear: both"></div>
  </div>
{% endif %}
{% if messages %}
  <div id="messages">
  {% for message in messages %}
   <div class="message">{{ message }}</div>
  {% endfor %}
  </div>
{% endif %}
  <div id="content">
{% block body %}
{% endblock %}
  </div>
  <div id="footer">
   <a href="http://jk.ozlabs.org/projects/patchwork/">patchwork</a>
   patch tracking system | <a
   href="{% url 'patchwork.views.help' path="about/" %}">about patchwork</a>
  </div>
 </body>
</html>