Add fields layout for TeacherAdmin

This commit is contained in:
Claude Paroz 2018-02-19 09:37:13 +01:00
parent 2b678f186e
commit 5891cc2c43
7 changed files with 18 additions and 11 deletions

View file

@ -85,8 +85,12 @@ class KlassAdmin(admin.ModelAdmin):
class TeacherAdmin(admin.ModelAdmin):
list_display = ('__str__', 'abrev', 'email', 'archived')
list_filter = (('archived', ArchivedListFilter),)
list_display = ('__str__', 'abrev', 'email', 'contract', 'rate', 'archived')
list_filter = (('archived', ArchivedListFilter), 'contract')
fields = (('civility', 'last_name', 'first_name', 'abrev'),
('birth_date', 'email', 'ext_id'),
('contract', 'rate', 'archived'),
('previous_report', 'next_report'))
actions = [print_charge_sheet]

View file

@ -0,0 +1,5 @@
/* Menu above apps on index page */
ul#main li { font-size: 14px; }
form#teacher_form input#id_abrev { width: 3em; }
form#teacher_form input#id_civility { width: 5em; }

View file

@ -1,8 +1,10 @@
{% extends "admin/base.html" %}
{% load i18n %}
{% load i18n static %}
{% block title %}{{ title }} | {% trans 'Gestion stages' %}{% endblock %}
{% block extrastyle %}<link rel="stylesheet" type="text/css" href="{% static 'css/stages.css' %}">{% endblock %}
{% block branding %}
<h1 id="site-name">École Pierre-Coullery<br>Gestion des stages</h1>
{% endblock %}

View file

@ -2,11 +2,7 @@
{% load i18n admin_static %}
{% block extrastyle %}{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}">
<style>
ul#main { margin: 1em; }
ul#main li { font-size: 14px; }
</style>
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/dashboard.css' %}">
{% endblock %}
{% block coltype %}colMS{% endblock %}

View file

@ -1,7 +1,7 @@
{% extends "admin/base_site.html" %}
{% load i18n admin_static %}
{% block extrastyle %}
{% block extrastyle %}{{ block.super }}
<style>
div#period_choice { margin: 0 auto; text-align: center; width: 60%; padding: 0.5em; margin-bottom: 1em; background-color: #EDF3FE;}
select#section_select { width: 8em; margin-right: 2em; }

View file

@ -1,6 +1,6 @@
{% extends "admin/base_site.html" %}
{% block extrastyle %}
{% block extrastyle %}{{ block.super }}
<style>
div.section {border: 1px solid #ccc; float: left; margin-right: 5em;}
</style>

View file

@ -1,7 +1,7 @@
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block extrastyle %}
{% block extrastyle %}{{ block.super }}
<style>
h3 {background-color: #eee; padding: 4px;}
tr.totaux td {font-style: italic;}