mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-19 06:22:16 +00:00
Merge branch 'master' into markdown
# Conflicts: # RIGS/static/scss/screen.scss # RIGS/templates/RIGS/event_detail.html # RIGS/templates/RIGS/event_form.html # RIGS/templates/RIGS/event_table.html # RIGS/templates/RIGS/item_row.html # RIGS/templates/RIGS/item_table.html # RIGS/templates/RIGS/organisation_detail.html # RIGS/templates/RIGS/organisation_form.html # RIGS/templates/RIGS/person_detail.html # RIGS/templates/RIGS/person_form.html # RIGS/templates/RIGS/rigboard.html # RIGS/templates/RIGS/venue_detail.html # RIGS/templates/RIGS/venue_form.html # RIGS/templates/event_print.xml # RIGS/templates/event_print_page.xml # RIGS/templates/item_modal.html # RIGS/tests/test_unit.py # assets/templates/asset_create.html # assets/templates/asset_update.html # assets/templates/partials/asset_detail_form.html # requirements.txt # templates/base.html
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
{% load static from staticfiles %}
|
||||
{% load raven %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
@@ -8,24 +6,21 @@
|
||||
xml:lang="{% firstof LANGUAGE_CODE 'en' %}"
|
||||
lang="{% firstof LANGUAGE_CODE 'en' %}">
|
||||
<head>
|
||||
<title>{% block title %}{% endblock %} | Rig Information Gathering System</title>
|
||||
<title>{% block title %}{{page_title|striptags}}{% endblock %} | Rig Information Gathering System</title>
|
||||
|
||||
<meta name="viewport" content="initial-scale=1">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="theme-color" content="#3853a4">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
|
||||
<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='https://fonts.googleapis.com/css?family=Open+Sans:400italic,700,300,400' rel='stylesheet'
|
||||
type='text/css'>
|
||||
<link rel="icon" type="image/png" href="{% static 'imgs/pyrigs-avatar.png' %}">
|
||||
<link rel="apple-touch-icon" href="{% static 'imgs/pyrigs-avatar.png' %}">
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{% static "css/screen.css" %}">
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/screen.css' %}">
|
||||
{% block css %}
|
||||
{% endblock %}
|
||||
|
||||
<script src="https://code.jquery.com/jquery-1.8.3.min.js"
|
||||
integrity="sha256-YcbK69I5IXQftf/mYD8WY0/KmEDCv1asggHpJk1trM8=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.ravenjs.com/1.3.0/jquery,native/raven.min.js"></script>
|
||||
<script>Raven.config('{% sentry_public_dsn %}').install()</script>
|
||||
<script src="{% static 'js/jpop.js' %}"></script>
|
||||
{% block preload_js %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -33,139 +28,60 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-link" href='#main'>Skip to content</a>
|
||||
{% 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>
|
||||
{% block titleheader %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
{% block titleelements %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown" id="user">
|
||||
{% 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" %}">
|
||||
<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 %}
|
||||
{% block navbar %}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" role="navigation">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" style="position: absolute; left:0.5em; top: 2px;" href="{% if request.user.is_authenticated %}https://rigs.nottinghamtec.co.uk{%else%}https://nottinghamtec.co.uk{%endif%}">
|
||||
<img src="{% static 'imgs/logo.webp' %}" width="40" height="40" alt="TEC's Logo: Serif 'TEC' vertically next to a blue box with the words 'PA and Lighting', surrounded by graduated rings" id="logo">
|
||||
</a>
|
||||
{% block titleheader %}
|
||||
{% endblock %}
|
||||
<button class="navbar-toggler ml-auto" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation" onclick="document.getElementById('logo').classList.toggle('d-none');">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse justify-content-between" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav">
|
||||
{% block titleelements %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<div id="sidebar" class="column">
|
||||
{% block sidebar %}
|
||||
</ul>
|
||||
<ul class="navbar-nav align-self-end">
|
||||
{% block titleelements_right %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
<div class="container py-4" id="main">
|
||||
{% 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 %}
|
||||
{% if page_title and not request.is_ajax %}
|
||||
<h2>{{page_title|safe}}</h2>
|
||||
{% endif %}
|
||||
{% block content %}{% endblock %}
|
||||
</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 src="{% static "js/marked.min.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();
|
||||
modaltarget = $link.data('target');
|
||||
modalobject = "";
|
||||
jQuery('#modal').load($link.attr('href'), function (e) {
|
||||
jQuery('#modal').modal();
|
||||
});
|
||||
}
|
||||
});
|
||||
<script src="{% static 'js/base.js' %}"></script>
|
||||
<script src="{% static 'js/marked.min.js' %}"></script>
|
||||
{% include 'partials/dark_theme.html' %}
|
||||
|
||||
|
||||
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>
|
||||
<script src="{% static "js/tooltip.js" %}"></script>
|
||||
{% block js %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user