Suite de l'amélioration du rendu
This commit is contained in:
parent
95a599ecc0
commit
be7a8de1b1
@ -168,16 +168,12 @@ msgid "Events"
|
||||
msgstr "Événements"
|
||||
|
||||
#: agenda_culturel/models.py:101
|
||||
#, fuzzy
|
||||
#| msgid "URLs"
|
||||
msgid "URL"
|
||||
msgstr "URLs"
|
||||
msgstr "URL"
|
||||
|
||||
#: agenda_culturel/models.py:101
|
||||
#, fuzzy
|
||||
#| msgid "List of all the urls where this event can be found."
|
||||
msgid "URL where this event can be found."
|
||||
msgstr "Liste de toutes les urls où l'événement peut être trouvé."
|
||||
msgstr "URL où l'événement peut être trouvé."
|
||||
|
||||
#: agenda_culturel/models.py:105
|
||||
msgid "Event submission form"
|
||||
|
@ -10,8 +10,9 @@ $primary-700: #008080;
|
||||
// Import Pico
|
||||
@import "./pico/pico";
|
||||
|
||||
a>.cat,
|
||||
a>.action {
|
||||
|
||||
.cat,
|
||||
.action {
|
||||
margin-left: .2em;
|
||||
line-height: 1.2em;
|
||||
height: 1.2em;
|
||||
@ -25,13 +26,15 @@ a>.action {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
a>.cat {
|
||||
.cat {
|
||||
margin-left: 0;
|
||||
margin-right: .3em;
|
||||
margin-right: .2em;
|
||||
}
|
||||
|
||||
a:hover>.cat,
|
||||
a:hover>.action {
|
||||
a:hover>.action,
|
||||
span:hover>.cat,
|
||||
span:hover>.action {
|
||||
transition: color var(--transition);
|
||||
color: $primary-600;
|
||||
background: var(--primary-inverse);
|
||||
@ -59,4 +62,10 @@ details[role="list"] summary + ul li.selected>a:hover {
|
||||
|
||||
body>nav {
|
||||
box-shadow: 0 1px 0 rgba(115, 130, 140, 0.2);
|
||||
}
|
||||
|
||||
.small-cat {
|
||||
@extend .outline;
|
||||
font-size: 90%;
|
||||
padding: 0.15em 0.4em 0.3em 0.4em;
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
{% extends "agenda_culturel/page.html" %}
|
||||
|
||||
{% block title %}Proposer un événement{% endblock %}
|
||||
{% block title %}Importer un événement{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Formulaire de proposition d'événement</h1>
|
||||
<h1>Importer un événement</h1>
|
||||
<form method="post" action="">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Proposer un événement">
|
||||
<input type="submit" value="Lancer l'import">
|
||||
</form>
|
||||
{% endblock %}
|
@ -5,6 +5,8 @@
|
||||
{% block content %}
|
||||
<h1>Derniers événements soumis</h1>
|
||||
|
||||
<details>
|
||||
<summary>Filtrer et trier</summary>
|
||||
<section>
|
||||
<form method="get" class="form django-form">
|
||||
{% csrf_token %}<br />
|
||||
@ -12,6 +14,8 @@
|
||||
<button type="submit">Filtrer</button><br />
|
||||
</form>
|
||||
</section>
|
||||
</details>
|
||||
|
||||
|
||||
{% for obj in paginator_filter %}
|
||||
{{ obj.title }} <br />
|
||||
|
@ -71,13 +71,18 @@
|
||||
{% if events_date %}
|
||||
<h2>{{ date |date:"l j F"| capfirst }}</h2>
|
||||
{% for event in events_date %}
|
||||
<article>{% if category %}
|
||||
<article>
|
||||
<h3><a href="{{ event.get_absolute_url }}">{{ event.title }}</a></h3>
|
||||
{{ event.description }}
|
||||
<footer>
|
||||
{% if category %}
|
||||
{{ event.category | small_cat }}
|
||||
{% else %}
|
||||
{% url 'view_mode_cat' selected_mode.name event.category.pk as url_cat %}
|
||||
{{ event.category | small_cat:url_cat }}
|
||||
{% endif %} <a href="{{ event.get_absolute_url }}">{{ event.title }}</a>
|
||||
</article>
|
||||
{% endif %}
|
||||
</article>
|
||||
</footer>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
@ -40,7 +40,7 @@
|
||||
<details role="list" dir="rtl">
|
||||
<summary aria-haspopup="listbox" role="link">Événements</summary>
|
||||
<ul role="listbox">
|
||||
<li><a href="{% url 'event_submission_form' %}">Ajouter</a></li>
|
||||
<li><a href="{% url 'event_import_form' %}">Importer</a></li>
|
||||
<li><a>Exporter</a></li>
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="{% url 'view_all_events' %}">Gérer</a></li>
|
||||
@ -55,15 +55,21 @@
|
||||
</main>
|
||||
|
||||
<footer class="container">
|
||||
<ul>
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="{% url 'admin:index' %}">administration</a></li>
|
||||
<li><a href="{% url 'logout' %}?next={% url 'home' %}">déconnexion</a></li>
|
||||
<li>vous êtes connecté(e) en tant que {{ user }}</li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'login' %}?next={% url 'view_all_events' %}">connexion</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="grid">
|
||||
<ul>
|
||||
<li>À propos</li>
|
||||
</ul>
|
||||
<ul>
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="{% url 'admin:index' %}">administration</a></li>
|
||||
<li><a href="{% url 'logout' %}?next={% url 'home' %}">déconnexion</a></li>
|
||||
<li>vous êtes connecté(e) en tant que {{ user }}</li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'login' %}?next={% url 'view_all_events' %}">connexion</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</body>
|
@ -86,6 +86,6 @@ def css_categories():
|
||||
@register.filter
|
||||
def small_cat(category, url=None):
|
||||
if url is None:
|
||||
return mark_safe('<span class="small-cat selected ' + category.css_class() + ' button">' + category.name + "</span>")
|
||||
return mark_safe('<span class="small-cat" role="button"><span class="cat ' + category.css_class() + '"></span> ' + category.name + "</span>")
|
||||
else:
|
||||
return mark_safe('<a class="small-cat selected ' + category.css_class() + ' button" href="' + url + '">' + category.name + "</a>")
|
||||
return mark_safe('<a class="small-cat" role="button" href="' + url + '"><span class="cat ' + category.css_class() + '"></span> ' + category.name + "</a>")
|
@ -15,7 +15,7 @@ urlpatterns = [
|
||||
re_path(r'^(?P<mode>' + modes + ')/(?P<cat_id>\d+)/$', view_mode_cat, name='view_mode_cat'),
|
||||
path("events/", event_list, name='view_all_events'),
|
||||
path("event/<int:pk>-<extra>", EventDetailView.as_view(), name="view_event"),
|
||||
path("proposer", EventSubmissionFormView.as_view(), name="event_submission_form"),
|
||||
path("importer", EventSubmissionFormView.as_view(), name="event_import_form"),
|
||||
path("admin/", admin.site.urls),
|
||||
path('accounts/', include('django.contrib.auth.urls')),
|
||||
path("test_app/", include("test_app.urls")),
|
||||
|
@ -92,7 +92,7 @@ class EventDetailView(DetailView):
|
||||
|
||||
class EventSubmissionFormView(FormView):
|
||||
form_class = EventSubmissionModelForm
|
||||
template_name = "agenda_culturel/submission.html"
|
||||
template_name = "agenda_culturel/import.html"
|
||||
success_url = "/"
|
||||
|
||||
def form_valid(self, form):
|
||||
|
Loading…
Reference in New Issue
Block a user