base.html 10.2 KB
Newer Older
1
{% load i18n %}
2
<<<<<<< HEAD
3
{% load staticfiles %}
4
<!DOCTYPE html>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
5
<html>
6 7 8
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
    <title>{{ BRANDING.name }} FoD :: {% block title %}{% endblock %}</title>
10 11
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
	<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
12
	<link REL="SHORTCUT ICON" HREF="{% static BRANDING.favicon %}">
13
    <!-- Core CSS - Include with every page -->
14 15 16
    <link href="{% static 'b3theme/css/bootstrap.min.css' %}" rel="stylesheet">
    <link href="{% static 'b3theme/font-awesome/css/font-awesome.css' %}" rel="stylesheet">
    <link href="{% static 'css/custom.css' %}" rel="stylesheet">
17
    {% block extrahead %}{% endblock %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
18

19 20 21
    <!-- SB Admin CSS - Include with every page -->
    <link href="{{STATIC_URL}}b3theme/css/sb-admin.css" rel="stylesheet">
    {% block extraheadbottom %}{% endblock %}
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
22 23
</head>

24
<body>
Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
25

26
    <div id="wrapper">
27
        <nav class="navbar navbar-default navbar-static-top" role="navigation" >
28 29 30 31 32 33 34
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
35
                <a class="navbar-brand" href="{% url dashboard %}"><img src="{% static BRANDING.logo %}">&nbsp;</a>
36 37 38 39 40
            </div>
            <!-- /.navbar-header -->

            <ul class="nav navbar-top-links navbar-right">
            	<li class="dropdown">
41 42 43 44 45 46 47 48 49 50 51 52 53 54
				            <a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans "Language" %}: {% for lang in LANGUAGES %}{% ifequal LANGUAGE_CODE lang.0 %}{% trans lang.1 %}{% endifequal %}{% endfor %}<b class="caret"></b></a>
				            <ul class="dropdown-menu">
				            <form action="{% url django.views.i18n.set_language %}" method="post" style="display:inline;" id="langform">
												{% csrf_token %}
												<input name="next" type="hidden" value="{{ next }}" />
												<input id="langsel" name="language" type="hidden" value="" />
											</form>
				            	{% for lang in LANGUAGES %}
				                <li>
				                    <a class="select_lang" href="#" onclick="setlang('{{ lang.0 }}'); return false;" title="{{lang.1}}">{% trans lang.1 %}{% ifequal LANGUAGE_CODE lang.0 %}  <i class="icon-ok"></i>{% endifequal %}</a>
				                </li>
				              {% endfor %}
				            </ul>
				        </li>
55 56 57 58 59 60 61 62 63 64 65 66
                <!-- /.dropdown -->


				 {% if user.is_authenticated %}
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-user fa-fw"></i>  <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user" role="menu" >
                    	<li role="presentation" class="dropdown-header">{{user}}</li>
                    	<li class="divider"></li>
                    	 {% if user.get_profile.peer %}
67
				        <li>
68
				            <a href="{% url user-profile %}"><i class="fa fa-user fa-fw"></i>{% trans "My profile" %}</a>
69
				        </li>
70 71 72 73 74 75 76 77 78 79 80 81 82 83
				    {% endif %}
				    	{% if user.is_superuser %}
						<li class="divider"></li>
                        <li><a href="{% url admin:index %}"><i class="fa fa-cogs"></i> {% trans "Admin" %}</a>
                        </li>
						{% endif %}
                        <li class="divider"></li>
                        <li><a href="{% url logout %}"><i class="fa fa-sign-out fa-fw"></i> {% trans "Logout" %}</a>
                        </li>

                    </ul>
                    <!-- /.dropdown-user -->
                </li>
                {% else %}
84 85
				        <li><a href="{% url login %}">{% trans "Shibboleth Login" %}</a></li>
				        {% endif %}
86 87 88 89 90 91 92 93 94 95 96 97 98 99
                <!-- /.dropdown -->
            </ul>
            <!-- /.navbar-top-links -->

        </nav>
        <!-- /.navbar-static-top -->
		{% block sidenav %}
        <nav class="navbar-default navbar-static-side" role="navigation">
        	{% if user.is_authenticated %}
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    <li>
                        <a href="{% url dashboard %}"><i class="fa fa-dashboard fa-fw"></i> {% trans "Dashboard" %}</a>
                    </li>
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
                    <!-- /.dropdown -->
                    {% if user.is_authenticated %}
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="fa fa-user fa-fw"></i>
                            <i class="fa fa-caret-down"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-user" role="menu" >
                            <li role="presentation" class="dropdown-header">{{user}}</li>
                            <li class="divider"></li>
                            {% if user.get_profile.peer %}
                            <li>
                                <a href="{% url user-profile %}"><i class="fa fa-user fa-fw"></i>{% trans "My profile" %}</a>
                            </li>
                            {% endif %}
                            {% if user.is_superuser %}
                            <li class="divider"></li>
                            <li>
                                <a href="{% url admin:index %}">
                                    <i class="fa fa-cogs"></i>
                                    {% trans "Admin" %}
                                </a>
                            </li>
                            {% endif %}
                            <li class="divider"></li>
                            <li>
                                <a href="{% url logout %}"><i class="fa fa-sign-out fa-fw"></i> {% trans "Logout" %}</a>
                            </li>
                        </ul>
                        <!-- /.dropdown-user -->
130
                    </li>
131
                    {% else %}
132
                    <li>
133 134 135
                        <a href="{% url login %}">
                            {% trans "Shibboleth Login" %}
                        </a>
136
                    </li>
137 138
                    {% endif %}
                    <!-- /.dropdown -->
139
                </ul>
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
                <!-- /.navbar-top-links -->
            </nav>
            <!-- /.navbar-static-top -->
            {% block sidenav %}
            <nav class="navbar-default navbar-static-side" role="navigation">
                {% if user.is_authenticated %}
                <div class="sidebar-collapse">
                    <ul class="nav" id="side-menu">
                        <li>
                            <a href="{% url dashboard %}"><i class="fa fa-dashboard fa-fw"></i> {% trans "Dashboard" %}</a>
                        </li>
                        <li>
                            <a href="{% url group-routes %}"><i class="fa fa-shield fa-fw"></i> {% trans "Rules" %}</a>
                        </li>
                        <li>
                            <a href="{% url add-route %}"><i class="fa fa-plus-circle fa-fw"></i> {% trans "Add Rule" %}</a>
                        </li>
                        {% if perms.accounts.overview %}<li>
                                <a href="{% url overview %}"><i class="fa fa-desktop fa-fw"></i> {% trans "Overview" %}</a>
                            </li>{% endif %}
                        {% if user.is_superuser %}
                            <li><a href="{% url admin:index %}"><i class="fa fa-cogs fa-fw"></i> {% trans "Admin" %}</a>
                            </li>
                            {% endif %}
                        {% if user.get_profile.peer %}
                            <li>
                                <a href="{% url user-profile %}"><i class="fa fa-user fa-fw"></i> {% trans "My profile" %}</a>
                            </li>
                        {% endif %}
                    </ul>
                    <!-- /#side-menu -->
                </div>
                {% endif %}
                <!-- /.sidebar-collapse -->
            </nav>
            <!-- /.navbar-static-side -->
            {% endblock %}
            <div id="page-wrapper">
                {% if messages %}
                <div class="row">
                    <div class="lg-col-12">
                        <div id="messages">
                        {% for message in messages %}
                            <div {% if message.tags %} class="alert alert-{{ message.tags }} alert-dismissable"{% endif %}>
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <span>{{ message }}</span><br/>
                            </div>
                        {% endfor %}
                        </div>
                    </div>
                </div>
                {% endif %}

                {% block contentplaceholder %}
                {% endblock %}
195
            </div>
196
            <!-- /#page-wrapper -->
197 198 199 200 201
        </div>
        <!-- /#page-wrapper -->
    </div>
    <!-- /#wrapper -->
	{% block footerblock %}
202 203
				{% include "footer.html" %}
			{% endblock %}
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
    <!-- Core Scripts - Include with every page -->
    <script src="{{STATIC_URL}}b3theme/js/jquery-1.10.2.js"></script>
    <script src="{{STATIC_URL}}js/jquery_csrf_protect.js" type="text/javascript"></script>
    <script src="{{STATIC_URL}}b3theme/js/bootstrap.min.js"></script>
    <script src="{{STATIC_URL}}b3theme/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script type="text/javascript" src="{{STATIC_URL}}js/jquery.cookie.js"></script>

	{% block pagejs %}{% endblock %}

    <!-- SB Admin Scripts - Include with every page -->
    <script src="{{STATIC_URL}}b3theme/js/sb-admin.js"></script>
    <!-- Page-Level Scripts  - Use for reference -->
    {% block pagejsbottom %}{% endblock %}
    <script type="text/javascript">

  	function setlang(lang){
		$("#langsel").val(lang);
		$("#langform").submit();
	}

	$(document).ready(function() {
  $.ajaxSetup({ cache: false });
});

	</script>

Leonidas Poulopoulos's avatar
Leonidas Poulopoulos committed
230 231
</body>
</html>