1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-06-21 01:58:21 +02:00

Remove old views

This commit is contained in:
Alexandre Iooss
2019-08-09 22:26:32 +02:00
parent b4cfb8d3b6
commit 7f2f22f156
16 changed files with 56 additions and 363 deletions

View File

@ -1,20 +0,0 @@
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% if auteurs_list.paginator %}
{% include "pagination.html" with list=auteurs_list %}
{% endif %}
<table class="table table-striped">
<thead>
<tr>
<th>Nom</th>
</tr>
</thead>
{% for auteur in auteurs_list %}
<tr>
<td>{{ auteur.nom }}</td>
</tr>
{% endfor %}
</table>

View File

@ -1,44 +0,0 @@
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% if emprunts_list.paginator %}
{% include "pagination.html" with list=emprunts_list %}
{% endif %}
<table class="table table-striped">
<thead>
<tr>
<th>Media</th>
<th>Utilisateur</th>
<th>Date emprunt</th>
<th>Permanencier emprunt</th>
<th>Date rendu</th>
<th>Permanencier rendu</th>
<th></th>
</tr>
</thead>
{% for emprunt in emprunts_list %}
<tr>
<td>{{ emprunt.media }}</td>
<td>{{ emprunt.user }}</td>
<td>{{ emprunt.date_emprunt }}</td>
<td>{{ emprunt.permanencier_emprunt }}</td>
<td>
{% if not emprunt.date_rendu %}
{% if perms.media.change_emprunt %}
<a class="btn btn-primary btn-sm" href="{% url 'media:retour-emprunt' emprunt.id %}">Retour</a>
{% endif %}
{% else %}
{{ emprunt.date_rendu }}
{% endif %}
</td>
<td>{{ emprunt.permanencier_rendu }}</td>
<td>
{% if perms.media.change_emprunt %}
<a href="{% url 'media:edit-emprunt' emprunt.id %}">Editer</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>

View File

@ -1,30 +0,0 @@
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% if jeux_list.paginator %}
{% include "pagination.html" with list=jeux_list %}
{% endif %}
<table class="table table-striped">
<thead>
<tr>
<th>Nom</th>
<th>Proprietaire</th>
<th>Durée</th>
<th>Joueurs min</th>
<th>Joueurs max</th>
<th>Comment</th>
</tr>
</thead>
{% for jeu in jeux_list %}
<tr>
<td>{{ jeu.nom }}</td>
<td>{{ jeu.proprietaire }}</td>
<td>{{ jeu.duree }}</td>
<td>{{ jeu.nombre_joueurs_min }}</td>
<td>{{ jeu.nombre_joueurs_max }}</td>
<td>{{ jeu.comment }}</td>
</tr>
{% endfor %}
</table>

View File

@ -1,24 +0,0 @@
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% if medias_list.paginator %}
{% include "pagination.html" with list=medias_list %}
{% endif %}
<table class="table table-striped">
<thead>
<tr>
<th>Titre</th>
<th>Auteur</th>
<th>Cote</th>
</tr>
</thead>
{% for media in medias_list %}
<tr>
<td>{{ media.titre }}</td>
<td>{% for aut in media.auteur.all %}{{ aut }}, {% endfor %}</td>
<td>{{ media.cote }}</td>
</tr>
{% endfor %}
</table>

View File

@ -1,16 +0,0 @@
{% extends "media/sidebar.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n %}
{% block title %}Auteurs{% endblock %}
{% block content %}
<h2>Liste des auteurs</h2>
{% if user.is_staff %}
<a class="changelink" href="{% url 'admin:media_auteur_changelist' %}">{% trans 'Go to admin' %}</a>
{% endif %}
{% include "media/aff_auteurs.html" with auteurs_list=auteurs_list %}
{% endblock %}

View File

@ -1,16 +0,0 @@
{% extends "media/sidebar.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n %}
{% block title %}Emprunts{% endblock %}
{% block content %}
<h2>Liste des emprunts</h2>
{% if user.is_staff %}
<a class="changelink" href="{% url 'admin:media_emprunt_changelist' %}">{% trans 'Go to admin' %}</a>
{% endif %}
{% include "media/aff_emprunts.html" with emprunts_list=emprunts_list %}
{% endblock %}

View File

@ -1,16 +0,0 @@
{% extends "media/sidebar.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n %}
{% block title %}Jeux{% endblock %}
{% block content %}
<h2>Liste des jeux</h2>
{% if user.is_staff %}
<a class="changelink" href="{% url 'admin:media_jeu_changelist' %}">{% trans 'Go to admin' %}</a>
{% endif %}
{% include "media/aff_jeux.html" with jeux_list=jeux_list %}
{% endblock %}

View File

@ -1,16 +0,0 @@
{% extends "media/sidebar.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n %}
{% block title %}Media{% endblock %}
{% block content %}
<h2>Liste des medias</h2>
{% if user.is_staff %}
<a class="changelink" href="{% url 'admin:media_media_changelist' %}">{% trans 'Go to admin' %}</a>
{% endif %}
{% include "media/aff_medias.html" with medias_list=medias_list %}
{% endblock %}

View File

@ -1,18 +1,40 @@
{% extends "media/sidebar.html" %}
{% extends "base_form.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load bootstrap3 %}
{% block title %}Création et modification de media{% endblock %}
{% load i18n %}
{% block content %}
{% bootstrap_form_errors mediaform %}
<form method="post" onsubmit="window.onbeforeunload=null">{% csrf_token %}
{% if form.non_field_errors %}
<p class="errornote">
{% for error in form.non_field_errors %}
{{ error }}
{% endfor %}
</p>
{% endif %}
<fieldset class="module aligned">
{% for field in form %}
<div class="form-row{% if field.errors %} errors{% endif %}">
{{ field.errors }}
<div>
{{ field.label_tag }}
{% if field.is_readonly %}
<div class="readonly">{{ field.contents }}</div>
{% else %}
{{ field }}
{% endif %}
{% if field.field.help_text %}
<div class="help">{{ field.field.help_text|safe }}</div>
{% endif %}
</div>
</div>
{% endfor %}
</fieldset>
<form class="form" method="post">
{% csrf_token %}
{% bootstrap_form mediaform %}
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="star" %}
<div class="submit-row">
<input class="default" type="submit" value="{% trans 'Save' %}">
</div>
</form>
{% endblock %}

View File

@ -1,24 +0,0 @@
{% extends "base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% block sidebar %}
<a class="list-group-item list-group-item-info" href="{% url "media:index" %}">
<i class="glyphicon glyphicon-list"></i>
Emprunts
</a>
<a class="list-group-item list-group-item-info" href="{% url "media:index-auteurs" %}">
<i class="glyphicon glyphicon-list"></i>
Auteurs
</a>
<a class="list-group-item list-group-item-info" href="{% url "media:index-medias" %}">
<i class="glyphicon glyphicon-list"></i>
Medias
</a>
<a class="list-group-item list-group-item-info" href="{% url "media:index-jeux" %}">
<i class="glyphicon glyphicon-list"></i>
Jeux
</a>
{% endblock %}