Facilitation d'ajouts d'événements

Fix #160
This commit is contained in:
Jean-Marie Favreau 2024-10-03 16:16:17 +02:00
parent 93a478bacf
commit 4cb60d1968
8 changed files with 64 additions and 7 deletions

View File

@ -335,10 +335,10 @@ footer [data-tooltip] {
display: none;
}
.slider-button.button-left {
left: 1em;
left: .4em;
}
.slider-button.button-right {
right: 1em;
right: .4em;
}
}
@ -1163,4 +1163,42 @@ article {
bottom: 0;
box-shadow: 0 -1px 0 rgba(115, 130, 140, 0.2);
}
}
#menu-rechercher, #menu-ajouter {
display: none;
}
#boutons-fixes {
li {
list-style: none;
@extend [role="button"], .secondary;
height: 2em;
width: 2em;
padding: 0;
font-size: 150%;
border-radius: 1em;
line-height: 2em;
text-align: center;
z-index: 10;
opacity: 0.9;
a {
color: var(--primary-inverse);
}
float: left;
clear: both;
}
position: fixed;
bottom: calc(var(--spacing) + .4em);
right: calc(var(--spacing) + .4em);
}
@media only screen and (min-width: 992px) {
#boutons-fixes {
display: none;
}
#menu-rechercher, #menu-ajouter {
display: inline-block;
}
}

View File

@ -14,6 +14,9 @@
{% endif %}
{% endblock %}{% endblock %}
{% block ajouter-bouton %}{% block ajouter-menu %}{% endblock %}{% endblock %}
{% block entete_header %}
<script src="{% static 'choicejs/choices.min.js' %}"></script>

View File

@ -11,6 +11,8 @@
{% block fluid %}{% endblock %}
{% block ajouter-bouton %}{% block ajouter-menu %}{% endblock %}{% endblock %}
{% block content %}
<article>

View File

@ -6,6 +6,8 @@
{% block fluid %}{% endblock %}
{% block ajouter-bouton %}{% block ajouter-menu %}{% endblock %}{% endblock %}
{% block content %}

View File

@ -8,6 +8,7 @@
{% block fluid %}{% endblock %}
{% block ajouter-bouton %}{% block ajouter-menu %}{% endblock %}{% endblock %}
{% block content %}

View File

@ -8,6 +8,9 @@
{% css_categories %}
{% endblock %}
{% block ajouter-bouton %}{% block ajouter-menu %}{% endblock %}{% endblock %}
{% block content %}
<div class="grid two-columns">
<article>

View File

@ -34,12 +34,19 @@
{% load duplicated_extra %}
{% load rimports_extra %}
<body>
<div id="boutons-fixes">
<ul>
{% block ajouter-bouton %}<li class="ajouter-bouton"><a href="{% url 'add_event' %}" aria-label="Ajouter un événement">{% picto_from_name "plus" %}</a></li>{% endblock %}
{% block rechercher-bouton %}<li class="rechercher-bouton"><a href="{% url 'event_search' %}" aria-label="Rechercher">{% picto_from_name "search" %}</a></li>{% endblock %}
</ul>
</div>
<div id="main-nav">
<div class="header">
<input class="menu-btn" type="checkbox" id="menu-btn" />
<label class="menu-icon" for="menu-btn">{% picto_from_name "menu" %}</label>
<ul class="menu">
<li><a href="{% url 'event_search' %}">Rechercher {% picto_from_name "search" %}</a></li>
{% block ajouter-menu %}<li id="menu-ajouter" class="ajouter-bouton"><a href="{% url 'add_event' %}">Ajouter un événement {% picto_from_name "plus-circle" %}</a></li>{% endblock %}
{% block rechercher-menu %}<li id="menu-rechercher" class="rechercher-bouton"><a href="{% url 'event_search' %}">Rechercher {% picto_from_name "search" %}</a></li>{% endblock %}
<li><a href="{% url 'aujourdhui' %}">Aujourd'hui</a></li>
<li><a href="{% url 'cette_semaine' %}">Cette semaine</a></li>
<li><a href="{% url 'ce_mois_ci' %}">Ce mois-ci</a></li>
@ -54,9 +61,6 @@
</li>
<li>
<div>
{% if perms.agenda_culturel.add_event %}
<a class="badge simple" href="{% url 'add_event_urls' %}">{% picto_from_name "plus-circle" %} {% picto_from_name "calendar" %}</a>
{% endif %}
{% if perms.agenda_culturel.view_recurrentimport %}
{% show_badge_rimports "bottom" "failed" %}
{% show_badge_rimports "bottom" "running" %}

View File

@ -10,14 +10,18 @@
{% css_categories %}
{% endblock %}
{% block rechercher-bouton %}{% block rechercher-menu %}{% endblock %}{% endblock %}
{% block fluid %}{% endblock %}
{% block content %}
<article class="search">
<header>
<h1>Rechercher un événement</h1>
</header>
<form method="get" class="form django-form" action="#results">
<form method="get" class="form django-form">
{{ filter.form }}
<button type="submit">Rechercher</button>