From a20a6d28093d988df404c27cce63d709711a6fe6 Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Fri, 7 Jun 2019 15:07:12 +0200 Subject: [PATCH] fix issue with back button on student page https://trackers.pilotsystems.net/probarreau/0481 --- teleforma/models/crfpa.py | 1 + teleforma/static/teleforma/css/admin.css | 3 + teleforma/templates/admin/base.html | 217 +++++++++++++++++++++++ 3 files changed, 221 insertions(+) create mode 100644 teleforma/static/teleforma/css/admin.css create mode 100644 teleforma/templates/admin/base.html diff --git a/teleforma/models/crfpa.py b/teleforma/models/crfpa.py index cccd91ab..e57cd409 100755 --- a/teleforma/models/crfpa.py +++ b/teleforma/models/crfpa.py @@ -135,6 +135,7 @@ class Student(Model): blank=True, null=True, on_delete=models.SET_NULL) trainings = models.ManyToManyField('Training', related_name='student_trainings', verbose_name=_('trainings'), blank=True, null=True) + # deprecated, replaced by trainings field training = models.ForeignKey('Training', related_name='student_training', verbose_name=_('training'), blank=True, null=True, limit_choices_to={'available': True}) procedure = models.ForeignKey('Course', related_name="procedure_students", diff --git a/teleforma/static/teleforma/css/admin.css b/teleforma/static/teleforma/css/admin.css new file mode 100644 index 00000000..0b06bc65 --- /dev/null +++ b/teleforma/static/teleforma/css/admin.css @@ -0,0 +1,3 @@ +.form-horizontal .control-group .controls .selector .selector-available, .form-horizontal .control-group .controls .selector .selector-chosen { + max-width:600px; +} \ No newline at end of file diff --git a/teleforma/templates/admin/base.html b/teleforma/templates/admin/base.html new file mode 100644 index 00000000..4eb89166 --- /dev/null +++ b/teleforma/templates/admin/base.html @@ -0,0 +1,217 @@ +{% load admin_static %}{% load suit_tags %}{% load url from future %} + + + + {% block title %}{{ title }} | {{ 'ADMIN_NAME'|suit_conf }}{% endblock %} + + + + + {% block extrastyle %}{% endblock %} + {% if LANGUAGE_BIDI %}{% endif %} + + + + + {% if 'SHOW_REQUIRED_ASTERISK'|suit_conf %} + + {% endif %} + {% block extrahead %}{% endblock %} + {% block blockbots %} + {% endblock %} + + + +{% load i18n %} + + + + +
+ + + {% block container %} +
+ + {% block header %} + {% if not is_popup %} + + + {% endif %} + + {% endblock %} + + +
+ + {% block content-center %} +
+ + {% if not is_popup %} + {% block breadcrumbs %} + + {% endblock %} + {% endif %} + + {% block messages %} + {% if messages %} + + {% for message in messages %} +
+ + {{ message }} +
+ {% endfor %} + {% endif %} + {% endblock messages %} + + +
+ {% block pretitle %}{% endblock %} + {% block content_title %}{% if title %} +

{{ title }}

+ {% endif %}{% endblock %} + {% block content %} + {% block object-tools %}{% endblock %} + {{ content }} + {% endblock %} + {% block sidebar_content %} + {% block sidebar %}{% endblock %} + {% endblock %} +
+ +
+ {% endblock %} + + + {% block content-left %} + {% if not is_popup %} +
+ {% block quick-search %} + {% with 'SEARCH_URL'|suit_conf as search_url %} + {% if search_url %} + + {% endif %} + {% endwith %} + {% endblock %} + + {% include 'suit/menu.html' %} + +
+ {% endif %} + {% endblock %} + +
+
+ {% endblock %} + + {% if not is_popup %} + +
+ {% endif %} + +
+ +{% block footer %} + {% if not is_popup %} + + {% endif %} +{% endblock %} + + + {% block extrajs %}{% endblock %} + + + -- 2.39.5