mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
Upgrade versions of most packages and make other required changes to ensure compatibility. Update database models and migrations to match new requirements set by Django
238 lines
9.4 KiB
HTML
Executable File
238 lines
9.4 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
{% load bootstrap4 %}
|
|
{% if 'use_i18n'|bootstrap_setting %}
|
|
{% load i18n %}
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
{% endif %}
|
|
<html lang="{{ LANGUAGE_CODE|default:'en_us' }}">
|
|
|
|
<head>
|
|
<!-- Required meta tags -->
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<title>{{ settings.PROJECT_LONG_NAME }}</title>
|
|
|
|
<!-- Bootstrap CSS -->
|
|
{% bootstrap_css %}
|
|
|
|
<link rel="stylesheet"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/fontawesome.min.css"
|
|
integrity="sha512-giQeaPns4lQTBMRpOOHsYnGw1tGVzbAIHUyHRgn7+6FmiEgGGjaG0T2LZJmAPMzRCl+Cug0ItQ2xDZpTmEc+CQ=="
|
|
crossorigin="anonymous"
|
|
referrerpolicy="no-referrer" />
|
|
|
|
<link rel="stylesheet"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/solid.min.css"
|
|
integrity="sha512-6mc0R607di/biCutMUtU9K7NtNewiGQzrvWX4bWTeqmljZdJrwYvKJtnhgR+Ryvj+NRJ8+NnnCM/biGqMe/iRA=="
|
|
crossorigin="anonymous"
|
|
referrerpolicy="no-referrer" />
|
|
|
|
{% load static %}
|
|
<link rel="stylesheet" href="{% static 'css/global.css' %}">
|
|
|
|
<link rel="stylesheet"
|
|
type="text/css"
|
|
href="{% static 'hijack/hijack.min.css' %}" />
|
|
|
|
{% if 'javascript_in_head'|bootstrap_setting %}
|
|
{% if 'include_jquery'|bootstrap_setting %}
|
|
{# jQuery JavaScript if it is in head #}
|
|
{% bootstrap_jquery jquery='include_jquery'|bootstrap_setting %}
|
|
{% endif %}
|
|
|
|
{# Bootstrap JavaScript if it is in head #}
|
|
{% bootstrap_javascript %}
|
|
{% endif %}
|
|
|
|
{% if form %}
|
|
{{ form.media.css }}
|
|
{% endif %}
|
|
|
|
{% block extra_head %}{% endblock %}
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div class="content" style="display: flex; flex-direction: column">
|
|
{% block navbar %}
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
|
<div class="container">
|
|
<a href="{% url 'index' %}" class="navbar-brand">
|
|
{{ settings.PROJECT_SHORT_NAME }}
|
|
</a>
|
|
|
|
<button type="button" class="navbar-toggler"
|
|
data-toggle="collapse" data-target="#navbarCollapse"
|
|
aria-controls="navbar-collapse" aria-expanded="false" aria-label="Toggle navbar">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="navbar-collapse collapse" id="navbarCollapse">
|
|
<ul class="navbar-nav mt-2 mt-lg-0">
|
|
<li class="nav-item">
|
|
<a href="{% url 'people:person.list' %}" class="nav-link">People</a>
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
<a href="{% url 'people:organisation.list' %}" class="nav-link">Organisations</a>
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
<a href="{% url 'activities:activity-series.list' %}" class="nav-link">Activity Series</a>
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
<a href="{% url 'activities:activity.list' %}" class="nav-link">Activities</a>
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
<a href="{% url 'people:map' %}" class="nav-link">Map</a>
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
<a href="{% url 'people:network' %}" class="nav-link">Network</a>
|
|
</li>
|
|
|
|
{% if request.user.is_superuser %}
|
|
<li class="nav-item">
|
|
<a href="{% url 'export:index' %}" class="nav-link">Export</a>
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
<a href="{% url 'admin:index' %}" class="nav-link">Admin</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
|
|
<ul class="navbar-nav mt-2 mt-lg-0 ml-auto">
|
|
{% if request.user.is_authenticated %}
|
|
<li class="nav-item">
|
|
{% if request.user.person %}
|
|
<a href="{% url 'people:person.profile' %}" class="nav-link">
|
|
<i class="fa-solid fa-circle-user"></i>
|
|
{{ request.user }}
|
|
</a>
|
|
|
|
{% else %}
|
|
<a href="{% url 'people:person.create' %}?user" class="nav-link">
|
|
<i class="fa-solid fa-circle-user"></i>
|
|
{{ request.user }}
|
|
</a>
|
|
|
|
{% endif %}
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
<a href="{% url 'logout' %}" class="nav-link">
|
|
<i class="fa-solid fa-right-from-bracket"></i>
|
|
Log Out
|
|
</a>
|
|
</li>
|
|
|
|
{% else %}
|
|
<li class="nav-item">
|
|
<a href="{% url 'login' %}" class="nav-link">
|
|
<i class="fa-solid fa-right-to-bracket"></i>
|
|
Log In
|
|
</a>
|
|
</li>
|
|
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
{% endblock %}
|
|
|
|
{# Global banner if config.NOTICE_TEXT is set using Constance #}
|
|
{% if config.NOTICE_TEXT %}
|
|
<div class="alert {{ config.NOTICE_CLASS }} rounded-0 mb-3" role="alert">
|
|
<h4 class="alert-heading text-center mb-0">{{ config.NOTICE_TEXT }}</h4>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% load hijack %}
|
|
|
|
{# Hijack notification if user is hijacked #}
|
|
{% if person.user == request.user and request.user.is_hijacked %}
|
|
<div class="djhj" id="djhj">
|
|
<div class="djhj-notification">
|
|
<div class="djhj-message">
|
|
{% blocktrans trimmed with user=request.user %}
|
|
You are currently working on behalf of <em>{{ user }}</em>.
|
|
{% endblocktrans %}
|
|
</div>
|
|
<form action="{% url 'hijack:release' %}" method="POST" class="djhj-actions">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="next" value="{{ request.path }}">
|
|
<button class="djhj-button" onclick="document.getElementById('djhj').style.display = 'none';" type="button">
|
|
{% trans 'hide' %}
|
|
</button>
|
|
<button class="djhj-button" type="submit">
|
|
{% trans 'release' %}
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if request.user.is_authenticated and not request.user.has_person %}
|
|
<div class="alert alert-info rounded-0" role="alert">
|
|
<p class="text-center mb-0">
|
|
Your profile is currently blank.
|
|
Please fill in your details so you can be part of the network.
|
|
|
|
<a class="btn btn-success"
|
|
href="{% url 'people:person.create' %}?user">Profile</a>
|
|
</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if request.user.is_authenticated and not request.user.consent_given %}
|
|
<div class="alert alert-warning rounded-0" role="alert">
|
|
<p class="text-center mb-0">
|
|
You have not yet given consent for your data to be collected and processed.
|
|
Please read and accept the <a href="{% url 'consent' %}">consent text</a>.
|
|
</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% block before_content %}{% endblock %}
|
|
|
|
<main class="{{ full_width_page|yesno:'container-fluid,container' }}">
|
|
{# Display Django messages as Bootstrap alerts #}
|
|
{% bootstrap_messages %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
|
|
<div class="container">
|
|
{% block after_content %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="footer bg-light">
|
|
<div class="container">
|
|
<span class="text-muted">{{ settings.PROJECT_LONG_NAME }}</span>
|
|
</div>
|
|
</footer>
|
|
|
|
{% if not 'javascript_in_head'|bootstrap_setting %}
|
|
{% if 'include_jquery'|bootstrap_setting %}
|
|
{# jQuery JavaScript if it is in body #}
|
|
{% bootstrap_jquery jquery='include_jquery'|bootstrap_setting %}
|
|
{% endif %}
|
|
|
|
{# Bootstrap JavaScript if it is in body #}
|
|
{% bootstrap_javascript %}
|
|
{% endif %}
|
|
|
|
{% if form %}
|
|
{{ form.media.js }}
|
|
{% endif %}
|
|
|
|
{% block extra_script %}{% endblock %}
|
|
</body>
|
|
|
|
</html>
|