ui: fix title, fix navigation on user settings

This commit is contained in:
Jens Langhammer 2020-02-29 14:46:58 +01:00
parent 6ed2e137a2
commit 535d529193
3 changed files with 60 additions and 59 deletions

View File

@ -8,7 +8,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{% block title %}{% trans title %}{% endblock %}</title> <title>{% block title %}{% trans title|default:"passbook" %}{% endblock %}</title>
<link rel="icon" type="image/png" href="{% static 'passbook/logo.png' %}"> <link rel="icon" type="image/png" href="{% static 'passbook/logo.png' %}">
<link rel="shortcut icon" type="image/png" href="{% static 'passbook/logo.png' %}"> <link rel="shortcut icon" type="image/png" href="{% static 'passbook/logo.png' %}">
<link rel="stylesheet" type="text/css" href="{% static 'node_modules/@patternfly/patternfly/patternfly.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'node_modules/@patternfly/patternfly/patternfly.css' %}">

View File

@ -7,7 +7,6 @@
{% load utils %} {% load utils %}
{% block page_content %} {% block page_content %}
{% include 'partials/messages.html' %}
<main role="main" class="pf-c-page__main" tabindex="-1" id="main-content"> <main role="main" class="pf-c-page__main" tabindex="-1" id="main-content">
{% block content %} {% block content %}
{% endblock %} {% endblock %}

View File

@ -1,67 +1,69 @@
{% extends "overview/base.html" %} {% extends "base/page.html" %}
{% load i18n %} {% load i18n %}
{% load is_active %} {% load is_active %}
{% load static %} {% load static %}
{% load passbook_user_settings %} {% load passbook_user_settings %}
{% block content %} {% block page_content %}
<section class="pf-c-page__main-section"> <div class="pf-c-page__sidebar">
<div class="pf-l-split pf-m-gutter"> <div class="pf-c-page__sidebar-body">
<div class="pf-l-split__item"> <nav class="pf-c-nav" id="page-default-nav-example-primary-nav" aria-label="Global">
<div class="pf-c-card"> <section class="pf-c-nav__section">
<div class="pf-c-card__body"> <h2 class="pf-c-nav__section-title">{% trans 'General Settings' %}</h2>
<nav class="pf-c-nav" aria-label="Global"> <ul class="pf-c-nav__list">
<section class="pf-c-nav__section"> <li class="pf-c-nav__item">
<h2 class="pf-c-nav__section-title">{% trans 'General Settings' %}</h2> <a href="{% url 'passbook_core:user-settings' %}"
<ul class="pf-c-nav__list"> class="pf-c-nav__link {% is_active 'passbook_core:user-settings' %}">{% trans 'User Details' %}</a>
<li class="pf-c-nav__item"> </li>
<a href="{% url 'passbook_core:user-settings' %}" class="pf-c-nav__link {% is_active 'passbook_core:user-settings' %}">{% trans 'User Details' %}</a> </ul>
</li> </section>
</ul> {% user_factors as user_factors_loc %}
</section> {% if user_factors_loc %}
{% user_factors as user_factors_loc %} <section class="pf-c-nav__section">
{% if user_factors_loc %} <h2 class="pf-c-nav__section-title">{% trans 'Factors' %}</h2>
<section class="pf-c-nav__section"> <ul class="pf-c-nav__list">
<h2 class="pf-c-nav__section-title">{% trans 'Factors' %}</h2> {% for factor in user_factors_loc %}
<ul class="pf-c-nav__list"> <li class="pf-c-nav__item">
{% for factor in user_factors_loc %} <a href="{% url factor.view_name %}" class="pf-c-nav__link {% is_active factor.view_name %}">
<li class="pf-c-nav__item"> <i class="{{ factor.icon }}"></i>
<a href="{% url factor.view_name %}" class="pf-c-nav__link {% is_active factor.view_name %}"> {{ factor.name }}
<i class="{{ factor.icon }}"></i> </a>
{{ factor.name }} </li>
</a> {% endfor %}
</li> </ul>
{% endfor %} </section>
</ul> {% endif %}
</section> {% user_sources as user_sources_loc %}
{% endif %} {% if user_sources_loc %}
{% user_sources as user_sources_loc %} <section class="pf-c-nav__section">
{% if user_sources_loc %} <h2 class="pf-c-nav__section-title">{% trans 'Sources' %}</h2>
<section class="pf-c-nav__section"> <ul class="pf-c-nav__list">
<h2 class="pf-c-nav__section-title">{% trans 'Sources' %}</h2> {% for source in user_sources_loc %}
<ul class="pf-c-nav__list"> <li class="pf-c-nav__item">
{% for source in user_sources_loc %} <a href="{{ source.view_name }}"
<li class="pf-c-nav__item"> class="pf-c-nav__link {% if user_settings.view_name == request.get_full_path %} pf-m-current {% endif %}">
<a href="{{ source.view_name }}" class="pf-c-nav__link {% if user_settings.view_name == request.get_full_path %} pf-m-current {% endif %}"> <i class="{{ source.icon }}"></i>
<i class="{{ source.icon }}"></i> {{ source.name }}
{{ source.name }} </a>
</a> </li>
</li> {% endfor %}
{% endfor %} </ul>
</ul> </section>
</section> {% endif %}
{% endif %} </nav>
</nav> </div>
</div>
<main role="main" class="pf-c-page__main" tabindex="-1" id="main-content">
<section class="pf-c-page__main-section">
<div class="pf-l-split pf-m-gutter">
<div class="pf-l-split__item">
<div class="pf-c-card">
{% block page %}
{% endblock %}
</div> </div>
</div> </div>
</div> </div>
<div class="pf-l-split__item"> </section>
<div class="pf-c-card"> </main>
{% block page %}
{% endblock %}
</div>
</div>
</div>
</section>
{% endblock %} {% endblock %}