summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/static/media/style.css4
-rw-r--r--ishtar_common/templates/base.html103
-rw-r--r--ishtar_common/templates/registration/login.html52
3 files changed, 117 insertions, 42 deletions
diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css
index 4f0330502..cc1477bdc 100644
--- a/ishtar_common/static/media/style.css
+++ b/ishtar_common/static/media/style.css
@@ -524,6 +524,10 @@ div#language_form_div label{
line-height: 1.7em;
}
+#shortcut-menu{
+ display: none;
+}
+
div#context_menu{
height:110px;
margin-right:10px;
diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html
index 62f47dab4..06322da04 100644
--- a/ishtar_common/templates/base.html
+++ b/ishtar_common/templates/base.html
@@ -2,6 +2,7 @@
<html lang="{{LANGUAGE_CODE}}">
<head>
<meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="{{STATIC_URL}}/media/images/favicon.png"/>
<title>{% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %}</title>
{% compress js %}
@@ -37,40 +38,80 @@
<link rel="stylesheet" href="{{STATIC_URL}}font-awesome/css/font-awesome.min.css?ver={{VERSION}}">
<link rel="stylesheet" href="{{STATIC_URL}}js/prettyPhoto/css/prettyPhoto.css?ver={{VERSION}}">
<link rel="stylesheet" href="{{STATIC_URL}}media/ui.jqgrid.css?ver={{VERSION}}">
- <link rel="stylesheet" href="{{STATIC_URL}}media/style.css?ver={{VERSION}}">
+ <link rel="stylesheet" href="{{STATIC_URL}}media/styles.css?ver={{VERSION}}">
{% for url_css in JQGRID_CSS %}<link rel="stylesheet" href="{{url_css}}?ver={{VERSION}}">{% endfor %}
<link rel="stylesheet" href="{{STATIC_URL}}pdl/styles.css?ver={{VERSION}}" />
{% endcompress %}
{% block extra_head %}
{% endblock %}
- {% if raw_css %}<style media="screen" type="text/css">{{raw_css|safe}}
- </style>{% endif %}
+ {% comment %}{% if raw_css %}<style media="screen" type="text/css">
+ {{raw_css |safe}}</style>{% endif %}{% endcomment %}
</head>
<body{% if current_theme%} id='{{current_theme}}'{%endif%}>
- <div id="header">
+ <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
{% block header %}
- {% if user.is_authenticated %}
- {% trans "Logged in" %}: {{ user.username }}
- (<a href="{% url 'auth_logout' %}">{% trans "Log out" %}</a> |
- <a href="{% url 'auth_password_change' %}">{% trans "Change password" %}</a>)
- {% else %}
- <strong><a href="{% url 'auth_login' %}">{% trans "Log in" %}</a></strong>
+ <nav class="navbar">
+ <a class="navbar-brand" href="/">
+ <img src="{{STATIC_URL}}media/images/ishtar-blason.svg"
+ width="30" height="30" alt="">
+ </a>
+ </nav>
+ <div class="collapse navbar-collapse">
+ <ul class="navbar-nav">
+ <li class="nav-item active">
+ <a class="nav-link" href="#">Operation...</span></a>
+ </li>
+ </ul>
+ </div>
+ <ul class="navbar-nav">
+ {% if APP_NAME %}
+ <li class="nav-item">
+ <a class="navbar-brand" href="/">{{APP_NAME}}</a>
+ </li>
+ {% endif %}
+ {% if user.is_authenticated %}
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" data-toggle="dropdown"
+ href="#" role="button" aria-haspopup="true" aria-expanded="false">{{ user.username }}</a>
+ <div class="dropdown-menu dropdown-menu-right">
+ <a class="dropdown-item" href="{% url 'auth_logout' %}">
+ {% trans "Log out" %}
+ </a>
+ <a class="dropdown-item" href="{% url 'auth_password_change' %}">
+ {% trans "Change password" %}
+ </a>
+ </div>
+ </li>
+ {% else %}
+ <li class="nav-item">
+ <a class="nav-link" href="{% url 'auth_login' %}">{% trans "Log in" %}</a>
+ </li>
{% endif %}
{% if LANGUAGES|length > 1 %}
- <div id="language_form_div">
- <form action="/i18n/setlang/" method="post" id='language_form'>
- {% csrf_token %}
- {% comment %}<label for='language_selector'>{% trans "Lang" %}{% trans ":"%} </label>{% endcomment %}
- <select name="language" id='language_selector'>
- <option value="">----------</option>
- {% for lang in LANGUAGES %}
- <option value="{{ lang.0 }}"{% ifequal LANGUAGE_CODE lang.0 %} selected='selected'{% endifequal %}>{{ lang.1 }}</option>
- {% endfor %}
- </select>
- </form>
- </div>{% endif %}
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" data-toggle="dropdown"
+ href="#" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-flag" aria-hidden="true"></i></a>
+ <form action="/i18n/setlang/" method="post" id='language_form'>
+ {% csrf_token %}
+ <div class="dropdown-menu dropdown-menu-right">
+ {% for lang in LANGUAGES %}
+ <a class="dropdown-item" href="{% url 'auth_logout' %}">
+ {{ lang.1 }}
+ </a>
+ {% endfor %}
+ {% comment %}
+ <select name="language" id='language_selector'>
+ <option value="">----------</option>
+ <option value="{{ lang.0 }}"{% ifequal LANGUAGE_CODE lang.0 %} selected='selected'{% endifequal %}>{{ lang.1 }}</option>
+ </select>
+ {% endcomment %}
+ </div>
+ </form>
+ </li>
+ {% endif %}
+ </ul>
{% endblock %}
- </div>
+ </nav>
<div class="nav-button ui-state-default ui-corner-all" id="to_bottom_arrow">
<i class="fa fa-arrow-circle-down" aria-hidden="true"></i>
</div>
@@ -79,7 +120,6 @@
</div>
<div id="window"></div>
<a href='{% url "start" %}' id="logo">
-{% if APP_NAME %}<p id="app_name">{{APP_NAME}}</p>{%endif%}
</a>
{% if not reminders %}<div id="context_menu"></div>
{% else %}<fieldset id='reminder'><legend>{% trans "Current items" %}</legend>
@@ -112,12 +152,15 @@
{% endfor %}
</ul>
</div>
- <div id="content">
- {% if warnings %}
- <ul class="alert">{% for warning in warnings %}
- <li>{{warning}}</li>{% endfor %}
- </ul>
- {% endif %}
+ <div class="container">
+ {% if warnings %}{% for warning in warnings %}
+ <div class="alert alert-warning alert-dismissible fade show" role="alert">
+ {{warning}}
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+ <span aria-hidden="true">&times;</span>
+ </button>
+ </div>
+ {% endfor %}{% endif %}
{% block content %}{% endblock %}
</div>
diff --git a/ishtar_common/templates/registration/login.html b/ishtar_common/templates/registration/login.html
index e8122f150..1b6062e53 100644
--- a/ishtar_common/templates/registration/login.html
+++ b/ishtar_common/templates/registration/login.html
@@ -2,18 +2,46 @@
{% load i18n %}
{% block content %}
-<div class='form'>
-<form method="post" action=".">{% csrf_token %}
-<table id='login'>
- <caption>{%trans "Log in"%}</caption>
-{{ form.as_table }}
- <tr class='submit'><td colspan='2'><input type="submit" value="{% trans 'Log in' %}" /></td></tr>
- <input type="hidden" name="next" value="{{ next }}" />
-</table>
-</form>
+<div class="row justify-content-center">
+ <div class="col-md-6">
+ <h4>{%trans "Log in"%}</h4>
+ <form method="post" action=".">{% csrf_token %}
+ <input type="hidden" name="next" value="{{ next }}" />
+ {% if form.non_field_errors %}
+ <div class="form-group row">
+ {% for error in form.non_field_errors %}
+ <div class="form-group has-errors text-danger small">
+ {{error}}
+ </div>
+ {% endfor %}
+ </div>
+ {% endif %}
+
+ {% for field in form %}
+ {% if field.errors %}
+ <div class="form-group row has-errors text-danger small">
+ {{field.errors}}
+ </div>
+ {% endif %}
+ <div class="form-group row">
+ <label for="{{field.id}}" class="col-6 col-form-label">{{field.label}}</label>
+ <div class="col-6">{{field}}</div>
+ </div>
+ {% endfor %}
+
+ <div class="row justify-content-center">
+ <div class="col-12">
+ <button type="submit" class="btn btn-primary">{% trans 'Log in' %}</button>
+ </div>
+ </div>
+ </form>
+ </div>
</div>
-<div class='info'>
-<p>{% trans "Forgot password?" %} <a href="{% url 'auth_password_reset' %}">{% trans "Reset it" %}</a></p>
-<p>{% trans "Not member?" %} <a href="{% url 'registration_register' %}">{% trans "Register" %}</a></p>
+<hr/>
+<div class="row justify-content-center">
+ <div class="col-md-6">
+ <small>{% trans "Forgot password?" %} <a href="{% url 'auth_password_reset' %}">{% trans "Reset it" %}</a> &ndash;
+ {% trans "Not member?" %} <a href="{% url 'registration_register' %}">{% trans "Register" %}</a></small>
+ </div>
</div>
{% endblock %}