work on admin ui

This commit is contained in:
bkfox
2019-09-05 18:55:44 +02:00
parent 3b82234cb8
commit b96f60e779
65 changed files with 314 additions and 817 deletions

View File

@ -1,11 +1,6 @@
{% extends "admin/change_form.html" %}
{% load i18n static %}
{% block extrahead %}{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "aircox/vendor.css" %}"/>
<link rel="stylesheet" type="text/css" href="{% static "aircox/main.css" %}"/>
{% endblock %}
{% block submit_buttons_bottom %}
{% if has_change_permission %}
<div class="columns is-size-5">

View File

@ -0,0 +1,112 @@
{% load i18n static %}<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{% static "admin/css/base.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "aircox/main.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "aircox/admin.css" %}">
{% block extrastyle %}{% endblock %}
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}">{% endif %}
{% block extrahead %}{% endblock %}
{% block responsive %}
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive.css" %}">
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive_rtl.css" %}">{% endif %}
{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE">{% endblock %}
</head>
{% load i18n %}
<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"
data-admin-utc-offset="{% now "Z" %}">
<!-- Container -->
<div id="container">
{% if not is_popup %}
<!-- Header -->
<nav class="navbar">
<div class="navbar-brand">
{% block branding %}{% endblock %}
</div>
<div class="navbar-menu">
{% block usertools %}
<div class="navbar-start">
<a class="navbar-item" href="{% url "admin:aircox_article_changelist" %}">{% trans "Articles" %}</a>
<a class="navbar-item" href="{% url "admin:aircox_episode_changelist" %}">{% trans "Episodes" %}</a>
<a class="navbar-item" href="{% url "admin:aircox_program_changelist" %}">{% trans "Programs" %}</a>
</div>
{% if has_permission %}
<div class="navbar-end">
<div class="navbar-item has-dropdown is-hoverable">
<a href="{% url "admin:auth_user_change" user.pk %}" class="navbar-link">
{% firstof user.get_short_name user.get_username %}
</a>
<div class="navbar-dropdown is-boxed is-right">
{% block userlinks %}
{% if site_url %}
<a href="{{ site_url }}" class="navbar-item">{% trans 'View site' %}</a>
{% endif %}
{% if user.is_active and user.is_staff %}
{% url 'django-admindocs-docroot' as docsroot %}
{% if docsroot %}
<a href="{{ docsroot }}" class="navbar-item">{% trans 'Documentation' %}</a>
{% endif %}
{% endif %}
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}" class="navbar-item">{% trans 'Change password' %}</a>
{% endif %}
<a href="{% url 'admin:logout' %}" class="navbar-item">{% trans 'Log out' %}</a>
{% endblock %}
</div>
</div>
</div>
{% endif %}
{% endblock %}
</div>
{% block nav-global %}{% endblock %}
</nav>
<!-- END Header -->
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
{% if title %} &rsaquo; {{ title }}{% endif %}
</div>
{% endblock %}
{% endif %}
{% block messages %}
{% if messages %}
<ul class="messagelist">{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
{% endfor %}</ul>
{% endif %}
{% endblock messages %}
<!-- Content -->
<div id="content" class="{% block coltype %}colM{% endblock %}">
{% block pretitle %}{% endblock %}
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
{% block content %}
{% block object-tools %}{% endblock %}
{{ content }}
{% endblock %}
{% block sidebar %}{% endblock %}
<br class="clear">
</div>
<!-- END Content -->
{% block footer %}<div id="footer"></div>{% endblock %}
</div>
<!-- END Container -->
</body>
</html>

View File

@ -0,0 +1,10 @@
{% extends "admin/base_site.html" %}
{% load static %}
{% block branding %}
<a href="{% url 'admin:index' %}">
<img src="{% static "aircox/logo.png" %}"/>
</a>
{% endblock %}

View File

@ -0,0 +1,89 @@
{% extends "admin/base_site.html" %}
{% load i18n admin_urls static admin_list %}
{% block extrastyle %}
{{ block.super }}
{% if cl.formset %}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">
{% endif %}
{% if cl.formset or action_form %}
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
{% endif %}
{{ media.css }}
{% if not actions_on_top and not actions_on_bottom %}
<style>
#changelist table thead th:first-child {width: inherit}
</style>
{% endif %}
{% endblock %}
{% block extrahead %}
{{ block.super }}
{{ media.js }}
{% endblock %}
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %}
{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=cl.opts.app_label %}">{{ cl.opts.app_config.verbose_name }}</a>
&rsaquo; {{ cl.opts.verbose_name_plural|capfirst }}
</div>
{% endblock %}
{% endif %}
{% block coltype %}flex{% endblock %}
{% block content %}
<div id="content-main">
{% block object-tools %}
<ul class="object-tools">
{% block object-tools-items %}
{% change_list_object_tools %}
{% endblock %}
</ul>
{% endblock %}
{% if cl.formset and cl.formset.errors %}
<p class="errornote">
{% if cl.formset.total_error_count == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
</p>
{{ cl.formset.non_form_errors }}
{% endif %}
<div class="columns is-fullwidth module {% if cl.has_filters %} filtered{% endif %}" id="changelist">
<div class="column">
<form id="changelist-form" method="post"{% if cl.formset and cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %}
{% if cl.formset %}
<div>{{ cl.formset.management_form }}</div>
{% endif %}
{% block result_list %}
{% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %}
{% result_list cl %}
{% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %}
{% endblock %}
{% block pagination %}{% pagination cl %}{% endblock %}
</form>
</div>
<div class="column is-one-quarter">
{% block search %}{% search_form cl %}{% endblock %}
<hr>
{% block date_hierarchy %}{% if cl.date_hierarchy %}{% date_hierarchy cl %}{% endif %}{% endblock %}
{% block filters %}
{% if cl.has_filters %}
<div id="changelist-filter">
<h2>{% trans 'Filter' %}</h2>
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
</div>
{% endif %}
{% endblock %}
</div>
</div>
</div>
{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "aircox/page.html" %}
{% extends "aircox/page_detail.html" %}
{% load i18n %}
{% block side_nav %}

View File

@ -1,6 +1,7 @@
{% load static i18n thumbnail aircox %}
{% comment %}
Context:
- cover: image cover
- site: current website
{% endcomment %}
<html>
@ -70,6 +71,7 @@ Context:
{% if show_side_nav %}
<aside class="column is-one-third-desktop">
{# FIXME: block cover into side_nav one #}
{% block cover %}
{% if cover is not None %}
<img class="cover" src="{{ cover.url }}" class="cover"/>

View File

@ -13,10 +13,7 @@
</div>
{% endblock %}
{% block main %}
{{ block.super }}
{% block main %}{{ block.super }}
{% with True as hide_schedule %}
<section>
{% unique_id "timetable" as timetable_id %}

View File

@ -1,8 +1,7 @@
{% extends "aircox/program_base.html" %}
{% load i18n %}
{% block header %}
{{ block.super }}
{% block header %}{{ block.super }}
<section class="is-size-5 has-text-weight-bold">
{% for diffusion in object.diffusion_set.all %}
@ -28,8 +27,7 @@
</section>
{% endblock %}
{% block main %}
{{ block.super }}
{% block content %}{{ block.super }}
{% if podcasts or tracks %}
<div class="columns is-desktop">

View File

@ -7,8 +7,6 @@
{% block main %}
{{ block.super }}
<section class="section">
{% if dates %}
<nav class="tabs is-medium is-centered" aria-label="{% trans "Other days' logs" %}">

View File

@ -7,13 +7,6 @@ Context:
- page: page
{% endcomment %}
{% block subtitle %}
{{ block.super }}
{% if page.category %}
<span class="column has-text-right">{{ page.category.title }}</span>
{% endif %}
{% endblock %}
{% block head_title %}
{% block title %}{{ title }}{% endblock %}
&mdash;
@ -21,11 +14,3 @@ Context:
{% endblock %}
{% block main %}
{% block content %}
{{ page.content|default_if_none:''|safe }}
{% endblock %}
{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "aircox/page.html" %}
{% extends "aircox/page_detail.html" %}
{% load i18n %}
{% block side_nav %}

View File

@ -7,8 +7,7 @@
{% endblock %}
{% block main %}
{{ block.super }}
{% block content %}{{ block.super }}
<br>