This commit is contained in:
R1kM 2015-07-22 16:08:59 -04:00
parent ed2fafe61a
commit 20a02d1013
57 changed files with 698 additions and 44 deletions

View file

@ -3,11 +3,14 @@
{% block titre%}Création d'Évènement{% endblock %}
{% block content %}
{% if envoi %}Votre message a bien été envoyé !{% endif %}
{% if envoi %}L'événement a bien été créé !{% endif %}
<br>
{% if erreur %}
{{ erreur }}
{% endif %}
<form action="{% url 'calendrier.views.create_event' %}" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit" />
<input type="submit" value="Enregistrer" />
</form>
{% endblock %}

View file

@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block titre %}Suppression d'un événement{% endblock %}
{% block content %}<form action="" method="post">
{% csrf_token %}
<p>Voulez vous vraiment supprimer l'événement {{ object }}?</p>
<input type="submit" value="Oui" />
</form>
{% endblock %}

View file

@ -11,6 +11,14 @@
{% block content %}
<h1>L'Ernestophone, la fanfare de l'École normale supérieure</h1>
<div id="description">
<p>
Fanfaron de passage, musicien intrigué, Ernestophoniste en quête de sensations fortes ou de partitions, ou tout simplement internaute égaré, l'Ernestophone te souhaite la bienvenue sur son son site !
</p>
<p>
L'Ernestophone, c'est la fanfare de l'École normale supérieure, (re)créée en septembre 2011, pour le plus grand bonheur des petits. Et des grands.
</p>
</div>
<table width="100%">
<tr>
<td width="20%" align="left">

View file

@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block titre %}Participation à un événement{% endblock %}
{% block content %}
{% if envoi %}<p>Votre réponse a été enregistrée !</p>{% endif %}
<p><a href="{% url 'calendrier.views.view_eventbis' id %}">Retour à l'événement</a></p>
<div> Voulez vous participer à l'événement {{ ev.nom }}, le {{ ev.date }} à {{ ev.debut|time:"H:i" }} ?</div>
<form action="{% url 'calendrier.views.reponse' id %}" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Valider" />
</form>
{% endblock %}

View file

@ -3,8 +3,13 @@
{% block titre %}{{ nom }}{% endblock %}
{% block content %}
<div id="viewevent">
{% if user.profile.is_chef %}
<p><a href="/calendar/edition/{{ev.id}}">Modifier l'événement</a></p>
<p><a href="/calendar/supprimer/{{ev.id}}">Supprimer l'événement</a></p>
{% endif %}
{% if user.is_authenticated %}
<p><a href="{% url 'calendrier.views.reponse' id %}">Répondre à l'événement</a></p>
{% endif %}
<p>{{ nom }}</p>
<p>{{ev.date}}</p>
@ -17,5 +22,30 @@
{% if desc %}
<p>{{ev.description }}</p>
{% endif %}
</div>
{% if user.is_authenticated %}
<div id="doodle">
<h4>Participants</h4>
<p><b>{{ nboui }}</b> ont répondu oui, <b>{{ nbpe }}</b> peut-être, et <b>{{ nbnon }}</b> non</p>
<table>
{% if part %}<tr>
<th>Ernestophoniste</th>
<th>Réponse</th>
</tr>
{% endif %}
{% for p in part %}
<tr>
<td>{{ p.participant.user.username }}</td>
{% if p.reponse == "oui" %}<td class="oui"></td>
{% elif p.reponse == "pe" %}<td class="pe"></td>
{% elif p.reponse == "non" %}<td class="non"></td>
{% else %}<td></td>
{% endif %}
</tr>
{% empty %}
Pas de réponse pour l'instant
{% endfor %}
</table>
</div>
{% endif %}
{% endblock %}

View file

@ -7,28 +7,38 @@
<meta charset="utf-8" />
<title>{% block titre %}{% endblock %}</title>
<link rel="stylesheet" href={% static 'css/bootstrap.css' %} />
<link rel="stylesheet" href={% static 'css/main.css' %} />
<link rel="stylesheet" href={% static 'css/ernesto.css' %} />
{% block extrahead %}{% endblock %}
</head>
<body>
<div id="page">
<header>
{% block header %}
<ul id="menu">
<li><a href = '/'>Accueil</a></li>
{% if user.is_authenticated %}
<li>Vous êtes connecté en tant que {{user.username }}</li>
<li><a href = '/logout/'>Déconnexion</a></li>
{% if user.profile.is_chef %}
<li><a href = '/admin/'>Administration</a></li>
{% endif %}
{% else %}
<li><a href='/login/'>Connexion</a></li>
<li><a href='/registration/'>Créer un compte</a></li>
{% endif %}
<li><a href="{% url "partitions.views.liste" %}">Partitions</a></li>
</ul>
<div id="logo_ernesto">
<a href='/'><img src="{%static "logo.png" %}" alt="L'Ernestophone" /></a>
</div>
<nav>
<ul id="menu">
<li><a href="{% url 'partitions.views.liste' %}">Partitions</a></li>
{% if user.is_authenticated %}
{% if user.profile.is_chef %}
<li><a href = '/admin/'>Administration</a></li>
{% endif %}
<li><a href='/divers/'>Divers</a></li>
<li>Connecté en tant que {{user.username }}</li>
<li><a href = '/logout/'>Déconnexion</a></li>
{% else %}
<li><a href='/login/'>Connexion</a></li>
<li><a href='/registration/'>Créer un compte</a></li>
{% endif %}
</ul>
</nav>
{% endblock %}</header>
<section id="content">
{% block content %}
{% endblock %}
</section>
</div>
</body>
</html>

View file

@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block titre %}Divers{% endblock %}
{% block content %}
<h1>Divers</h1>
<ul>
<li><a href="{% url "propositions.views.liste" %}">Propositions de morceaux</a></li>
</ul>
{% endblock %}

View file

@ -2,6 +2,7 @@
{% block titre %}Connexion{% endblock %}
{% block content %}
<h1>Connexion</h1>
<div id="Connexion">
{% if form.errors %}
<p>Mot de passe ou nom d'utilisateur incorrect</p>
{% endif %}
@ -12,16 +13,18 @@
{% csrf_token %}
<table>
<tr>
<td>{{ form.username }}</td>
<td><input type="{{ form.username.type }}" name="login" placeholder="Login"/></td>
</tr>
<tr>
<td>{{ form.password }}</td>
<td><input type="password" name="{{ form.password.name }}" placeholder="Password"/></td>
</tr>
</table>
<input type="submit" value="Connexion" />
</form>
{% if next %}
<input type="hidden" name="next" value={{ next }} />
{% else %}
<input type="hidden" name="next" value="/" />
{% endif %}
</div>
{% endblock %}

View file

@ -4,16 +4,22 @@
{% if suppression %}
<p>{{ suppression }}</p>
{% endif %}
{% if user.is_authenticated %}
<h3><a href="{% url "partitions.views.ajouter_morceau" %}">Ajouter un morceau</a></h3>
{% endif %}
<ul class="filelist">
{% for part in partitions %}
<li>
{% if not user.is_authenticated %}
<p>{{ part.nom }} - {{ part.auteur }}</p>
{{ part.nom }} - {{ part.auteur }}
{% endif %}
{% if user.is_authenticated %}
<p><a href="{% url "partitions.views.listepart" part.nom part.auteur %}">{{ part.nom }} - {{ part.auteur }}</a></p>
<a href="{% url "partitions.views.listepart" part.nom part.auteur %}" class="fichier">{{ part.nom }} - {{ part.auteur }}</a>
{% endif %}
{% if user.profile.is_chef %}
<p><a href="{% url "partitions.views.conf_delete_morc" part.nom part.auteur %}">Supprimer</a></p>
<a href="{% url "partitions.views.conf_delete_morc" part.nom part.auteur %}" class="supprimer">Supprimer</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endblock %}

View file

@ -6,19 +6,22 @@
{% if suppression %}
<p>{{ suppression }}</p>
{% endif %}
<ul class="filelist">
{% for p in part %}
{% if user.is_authenticated and ".pdf" in p.part.url %}
<p><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}">{{ p.nom }}</a>
<li><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}" class="fichier">{{ p.nom }}</a>
{% elif user.is_authenticated and ".mp3" in p.part.url %}
<p><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}">{{ p.nom }}</a>
{% else %}<p>{{ p.nom }}
<li><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}" class="fichier">{{ p.nom }}</a>
{% else %}<li>{{ p.nom }}
{% endif %}
{% if user.is_authenticated %}<a href="{% url "partitions.views.download" nom auteur p.part.url|cuturl %}">Télécharger</a>{% endif %} </p>
{% if user.is_authenticated %}<a href="{% url "partitions.views.download" nom auteur p.part.url|cuturl %}" class="telecharger">Télécharger</a>{% endif %}
{% if user.profile.is_chef %}
<p><a href="{% url "partitions.views.conf_delete" nom auteur p.pk %}">Supprimer</a> </p>
<a href="{% url "partitions.views.conf_delete" nom auteur p.pk %}" class="supprimer">Supprimer</a>
{% endif %}
</li>
{% empty %}
<p> Pas de partitions pour le moment </p>
{% endfor %}
</ul>
<p><a href="{% url "partitions.views.upload" p.nom p.auteur %}">Ajouter un média</a></p>
{% endblock %}

View file

@ -0,0 +1,13 @@
{% extends "base.html" %}
{%block titre %}Proposition de morceau{% endblock %}
{% block content %}
<p><a href="{% url "propositions.views.liste" %}">Retour aux propositions</a></p>
{% if envoi %}<p>Votre proposition a été enregistrée.{% endif %}
<form action="{% url 'propositions.views.create_prop' %}" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Enregistrer" />
</form>
{% endblock %}

View file

@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block titre %}Suppression d'une proposition{% endblock %}
{% block content %}<form action="" method="post">
{% csrf_token %}
<p><a href="{% url "propositions.views.liste" %}">Retour aux propositions</a></p>
<p>Voulez vous vraiment supprimer la proposition {{ object }}?</p>
<input type="submit" value="Oui" />
</form>
{% endblock %}

View file

@ -0,0 +1,22 @@
{% extends "base.html" %}
{% load getresponse %}
{% block titre %}Propositions de morceau{% endblock %}
{% block content %}<h1>Liste des propositions</h1>
{% if error %}
<p>{{ error }}</p>
{% endif %}
<p><a href="{% url "propositions.views.create_prop" %}">Proposer un morceau</a></p>
{% if n > 0 %}
<table>
<tr><th></th><th>Oui</th><th>Non</th><th></th><th></th><th></th></tr>
{% for p in props %}
<tr><td>{% if p.lien %}<a href={{p.lien}}>{% endif %}<b>{{ p.nom }}</b>{% if p.artiste %} - {{ p.artiste }}{% endif %}{% if p.lien %}</a>{% endif %}</td>
<td>{{p.nboui }}</td><td>{{ p.nbnon }}</td><td><a href="{% url "propositions.views.repoui" p.id %}">Oui</a></td><td><a href="{% url "propositions.views.repnon" p.id %}">Non</a></td>
{% getresponse request.user.profile p %}<td>{% if p.user == request.user.profile or request.user.profile.is_chef %}<a href=/propositions/{{p.id}}/supprimer/>Supprimer</a>{% endif %}</td></tr>
{% endfor %}
</table>
{% else %}
Pas de proposition pour le moment
{% endif %}
{% endblock %}

View file

@ -0,0 +1 @@
<td>{% if reponse %}Vous avez voté {{ reponse }}{%endif%}</td>

View file

@ -0,0 +1,5 @@
{% extends "base.html" %}
{% block titre %}Vote pris en compte{% endblock %}
{% block content %}<p>Votre vote a été pris en compte</p>
<p><a href="{% url "propositions.views.liste" %}">Voir la liste des propositions</a></p>{% endblock %}