mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
201 lines
8.5 KiB
HTML
201 lines
8.5 KiB
HTML
{% load static from staticfiles %}
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html
|
|
dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}"
|
|
xml:lang="{% firstof LANGUAGE_CODE 'en' %}"
|
|
lang="{% firstof LANGUAGE_CODE 'en' %}">
|
|
<head>
|
|
<title>{% block title %}{% endblock %} | Rig Information Gathering System</title>
|
|
|
|
<meta name="viewport" content="initial-scale=1">
|
|
|
|
<link rel="icon" type="image/png" href="{% static "imgs/pyrigs-avatar.png" %}">
|
|
<link rel="apple-touch-icon" href="{% static "imgs/pyrigs-avatar.png" %}">
|
|
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700,300,400' rel='stylesheet' type='text/css'>
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="{% static "css/screen.css" %}">
|
|
{% block css %}
|
|
{% endblock %}
|
|
|
|
<script src="//code.jquery.com/jquery-latest.min.js"></script>
|
|
{% block preload_js %}
|
|
{% endblock %}
|
|
|
|
{% block extra-head %}{% endblock %}
|
|
</head>
|
|
|
|
<body>
|
|
{% include "analytics.html" %}
|
|
<div class="navbar navbar-fixed-top navbar-inverse hidden-print" role="navigation">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle" 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>
|
|
<a class="navbar-brand" href="/">RIGS</a>
|
|
</div>
|
|
<div class="navbar-collapse">
|
|
<ul class="nav navbar-nav">
|
|
{% if user.is_authenticated %}
|
|
<li><a href="/">Home</a></li>
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Rigboard<b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="{% url 'rigboard' %}"><span class="glyphicon glyphicon-list"></span> Rigboard</a></li>
|
|
<li><a href="{% url 'event_archive' %}"><span class="glyphicon glyphicon-book"></span> Archive</a></li>
|
|
<li><a href="{% url 'web_calendar' %}"><span class="glyphicon glyphicon-calendar"></span> Calendar</a></li>
|
|
{% if perms.RIGS.view_event %}
|
|
<li><a href="{% url 'activity_table' %}"><span class="glyphicon glyphicon-random"></span> Recent Changes</a></li>
|
|
{% endif %}
|
|
{% if perms.RIGS.add_event %}
|
|
<li><a href="{% url 'event_create' %}"><span class="glyphicon glyphicon-plus"></span> New Event</a></li>
|
|
{% endif %}
|
|
|
|
</ul>
|
|
</li>
|
|
{% endif %}
|
|
{% if perms.RIGS.view_invoice %}
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Invoices<b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="{% url 'invoice_list' %}"><span class="glyphicon glyphicon-gbp"></span> Active</a></li>
|
|
{% if perms.RIGS.add_invoice %}
|
|
<li><a href="{% url 'invoice_waiting' %}"><span class="glyphicon glyphicon-briefcase"></span> Waiting</a></li>
|
|
{% endif %}
|
|
<li><a href="{% url 'invoice_archive' %}"><span class="glyphicon glyphicon-book"></span> Archive</a></li>
|
|
</ul>
|
|
</li>
|
|
{% endif %}
|
|
{% if perms.RIGS.view_person %}
|
|
<li><a href="{% url 'person_list' %}">People</a></li>
|
|
{% endif %}
|
|
{% if perms.RIGS.view_organisation %}
|
|
<li><a href="{% url 'organisation_list' %}">Organisations</a></li>
|
|
{% endif %}
|
|
{% if perms.RIGS.view_venue %}
|
|
<li><a href="{% url 'venue_list' %}">Venues</a></li>
|
|
{% endif %}
|
|
|
|
</ul>
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li class="dropdown">
|
|
{% if user.is_authenticated %}
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
|
<span class="glyphicon glyphicon-user"></span>
|
|
Hi {{ user.first_name }}
|
|
<b class="caret"></b>
|
|
</a>
|
|
<ul class="dropdown-menu nav media-list pull-right" id="userdropdown">
|
|
<li class="media">
|
|
<a href="{% url 'profile_detail' %}">
|
|
<div class="media-left">
|
|
<img src="{{ request.user.profile_picture }}" class="media-object"/>
|
|
</div>
|
|
|
|
<div class="media-body">
|
|
<b>{{ request.user.first_name }} {{ request.user.last_name }}</b>
|
|
|
|
<p class="muted">{{ request.user.email }}</p>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<div class="col-sm-12 text-right">
|
|
<a href="{% url 'logout' %}" class="btn btn-primary">Logout</a>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
{% else %}
|
|
<a href="{% url "login" %}?next={{ request.path }}">
|
|
<span class="icon-user"></span>
|
|
Login
|
|
</a>
|
|
{% endif %}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div id="content" class="row">
|
|
{% block content-header %}
|
|
{% if error %}
|
|
<div class="error">{{ error }}</div>{% endif %}
|
|
{% if info %}
|
|
<div class="info">{{ info }}</div>{% endif %}
|
|
{% if messages %}
|
|
{% for message in messages %}
|
|
<div class="alert alert-{{ message.level_tag }} alert-dismissible" role="alert">
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
|
|
aria-hidden="true">×</span></button>
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
|
|
<div id="sidebar" class="column">
|
|
{% block sidebar %}
|
|
{% endblock %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="modal" role="dialog" tabindex=-1></div>
|
|
|
|
<script>
|
|
Date.prototype.getISOString = function () {
|
|
var yyyy = this.getFullYear().toString();
|
|
var mm = (this.getMonth() + 1).toString(); // getMonth() is zero-based
|
|
var dd = this.getDate().toString();
|
|
return yyyy + '-' + (mm[1] ? mm : "0" + mm[0]) + '-' + (dd[1] ? dd : "0" + dd[0]); // padding
|
|
};
|
|
</script>
|
|
<script src="{% static "js/jquery.cookie.js" %}"></script>
|
|
<script src="{% static "js/alert.js" %}"></script>
|
|
<script src="{% static "js/collapse.js" %}"></script>
|
|
<script>
|
|
$('.navbar-collapse').addClass('collapse')
|
|
</script>
|
|
<script src="{% static "js/dropdown.js" %}"></script>
|
|
<script src="{% static "js/modal.js" %}"></script>
|
|
<script src="{% static "js/konami.js" %}"></script>
|
|
<script>
|
|
jQuery(document).ready(function () {
|
|
jQuery(document).on('click', '.modal-href', function (e) {
|
|
$link = jQuery(this);
|
|
// Anti modal inception
|
|
if($link.parents('#modal').length == 0) {
|
|
e.preventDefault();
|
|
jQuery('#modal').load($link.attr('href'), function (e) {
|
|
jQuery('#modal').modal();
|
|
});
|
|
}
|
|
});
|
|
|
|
|
|
var easter_egg = new Konami();
|
|
easter_egg.code = function() {
|
|
var s = document.createElement('script');
|
|
s.type='text/javascript';
|
|
document.body.appendChild(s);
|
|
s.src='{% static "js/asteroids.min.js"%}';
|
|
ga('send', 'event', 'easter_egg', 'activated');
|
|
}
|
|
easter_egg.load();
|
|
});
|
|
</script>
|
|
{% block js %}
|
|
{% endblock %}
|
|
</body>
|
|
</html>
|