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; display: none;
} }
.slider-button.button-left { .slider-button.button-left {
left: 1em; left: .4em;
} }
.slider-button.button-right { .slider-button.button-right {
right: 1em; right: .4em;
} }
} }
@ -1163,4 +1163,42 @@ article {
bottom: 0; bottom: 0;
box-shadow: 0 -1px 0 rgba(115, 130, 140, 0.2); 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 %} {% endif %}
{% endblock %}{% endblock %} {% endblock %}{% endblock %}
{% block ajouter-bouton %}{% block ajouter-menu %}{% endblock %}{% endblock %}
{% block entete_header %} {% block entete_header %}
<script src="{% static 'choicejs/choices.min.js' %}"></script> <script src="{% static 'choicejs/choices.min.js' %}"></script>

View File

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

View File

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

View File

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

View File

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

View File

@ -34,12 +34,19 @@
{% load duplicated_extra %} {% load duplicated_extra %}
{% load rimports_extra %} {% load rimports_extra %}
<body> <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 id="main-nav">
<div class="header"> <div class="header">
<input class="menu-btn" type="checkbox" id="menu-btn" /> <input class="menu-btn" type="checkbox" id="menu-btn" />
<label class="menu-icon" for="menu-btn">{% picto_from_name "menu" %}</label> <label class="menu-icon" for="menu-btn">{% picto_from_name "menu" %}</label>
<ul class="menu"> <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 'aujourdhui' %}">Aujourd'hui</a></li>
<li><a href="{% url 'cette_semaine' %}">Cette semaine</a></li> <li><a href="{% url 'cette_semaine' %}">Cette semaine</a></li>
<li><a href="{% url 'ce_mois_ci' %}">Ce mois-ci</a></li> <li><a href="{% url 'ce_mois_ci' %}">Ce mois-ci</a></li>
@ -54,9 +61,6 @@
</li> </li>
<li> <li>
<div> <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 %} {% if perms.agenda_culturel.view_recurrentimport %}
{% show_badge_rimports "bottom" "failed" %} {% show_badge_rimports "bottom" "failed" %}
{% show_badge_rimports "bottom" "running" %} {% show_badge_rimports "bottom" "running" %}

View File

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