misc: apply pre-commit-hooks (#74979)
This commit is contained in:
parent
ccdafb5c30
commit
164021cf9e
|
@ -1,8 +1,8 @@
|
|||
{% extends "passerelle/manage.html" %}
|
||||
|
||||
{% block breadcrumb %}
|
||||
{{ block.super }}
|
||||
{% if object.id %}
|
||||
<a href="{{object.get_absolute_url}}">{{ object.title }}</a>
|
||||
{% endif %}
|
||||
{{ block.super }}
|
||||
{% if object.id %}
|
||||
<a href="{{object.get_absolute_url}}">{{ object.title }}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,28 +2,28 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block appbar %}
|
||||
<h2>{% trans 'Collect Days' %}</h2>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-collectday-add' %}">{% trans 'New' %}</a>
|
||||
<h2>{% trans 'Collect Days' %}</h2>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-collectday-add' %}">{% trans 'New' %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if object_list %}
|
||||
<div class="objects-list">
|
||||
<ul>
|
||||
{% for object in object_list %}
|
||||
<li>{{ object }}
|
||||
<a rel="popup" class="icon-remove-sign" href="{% url 'montpellier-encombrants-collectday-remove' pk=object.id %}"></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="big-msg-info">
|
||||
{% blocktrans %}
|
||||
There is no collect day yet. Click on the "New" button in the top
|
||||
right of the page to add a first one.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if object_list %}
|
||||
<div class="objects-list">
|
||||
<ul>
|
||||
{% for object in object_list %}
|
||||
<li>{{ object }}
|
||||
<a rel="popup" class="icon-remove-sign" href="{% url 'montpellier-encombrants-collectday-remove' pk=object.id %}"></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="big-msg-info">
|
||||
{% blocktrans %}
|
||||
There is no collect day yet. Click on the "New" button in the top
|
||||
right of the page to add a first one.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,26 +2,26 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block appbar %}
|
||||
<h2>{{ commune }}</h2>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-commune-streets-edit-view' pk=commune.pk %}">{% trans 'Edit streets' %}</a>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-commune-edit' pk=commune.pk %}">{% trans 'Edit' %}</a>
|
||||
<h2>{{ commune }}</h2>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-commune-streets-edit-view' pk=commune.pk %}">{% trans 'Edit streets' %}</a>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-commune-edit' pk=commune.pk %}">{% trans 'Edit' %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if streets %}
|
||||
<h3>{% trans "Limited by the following streets:" %}</h3>
|
||||
<div class="objects-list">
|
||||
<ul>
|
||||
{% for street in streets %}
|
||||
<li>{{ street.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="big-msg-info">
|
||||
{% blocktrans %}Including all the streets. Click on "Edit streets" to add or delete streets.{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if streets %}
|
||||
<h3>{% trans "Limited by the following streets:" %}</h3>
|
||||
<div class="objects-list">
|
||||
<ul>
|
||||
{% for street in streets %}
|
||||
<li>{{ street.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="big-msg-info">
|
||||
{% blocktrans %}Including all the streets. Click on "Edit streets" to add or delete streets.{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,28 +2,28 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block appbar %}
|
||||
<h2>{% trans 'Communes' %}</h2>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-commune-add' %}">{% trans 'New' %}</a>
|
||||
<h2>{% trans 'Communes' %}</h2>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-commune-add' %}">{% trans 'New' %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if object_list %}
|
||||
<div class="objects-list">
|
||||
<ul>
|
||||
{% for object in object_list %}
|
||||
<li><a href="{% url 'montpellier-encombrants-commune-view' pk=object.id %}">{{ object }}</a>
|
||||
<a rel="popup" class="icon-remove-sign" href="{% url 'montpellier-encombrants-commune-remove' pk=object.id %}"></a> </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="big-msg-info">
|
||||
{% blocktrans %}
|
||||
There is no commune yet. Click on the "New" button in the top
|
||||
right of the page to add a first one.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if object_list %}
|
||||
<div class="objects-list">
|
||||
<ul>
|
||||
{% for object in object_list %}
|
||||
<li><a href="{% url 'montpellier-encombrants-commune-view' pk=object.id %}">{{ object }}</a>
|
||||
<a rel="popup" class="icon-remove-sign" href="{% url 'montpellier-encombrants-commune-remove' pk=object.id %}"></a> </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="big-msg-info">
|
||||
{% blocktrans %}
|
||||
There is no commune yet. Click on the "New" button in the top
|
||||
right of the page to add a first one.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,31 +3,31 @@
|
|||
|
||||
{% block endpoints %}
|
||||
|
||||
<ul>
|
||||
<li>{% trans 'Listing available days:' %} <a href="{% url 'montpellier-encombrants-available-days' slug=object.slug insee=34088 %}"
|
||||
>{{ site_base_uri }}{% url 'montpellier-encombrants-view' slug=object.slug %}available/<i><insee></i></a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>{% trans 'Listing available days:' %} <a href="{% url 'montpellier-encombrants-available-days' slug=object.slug insee=34088 %}"
|
||||
>{{ site_base_uri }}{% url 'montpellier-encombrants-view' slug=object.slug %}available/<i><insee></i></a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block description %}
|
||||
{% if perms.passerelle_montpellier_encombrants.change_passerelle_montpellier_encombrants %}
|
||||
<div>
|
||||
<h3>{% trans "Management" %}</h3>
|
||||
{% if perms.passerelle_montpellier_encombrants.change_passerelle_montpellier_encombrants %}
|
||||
<div>
|
||||
<h3>{% trans "Management" %}</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="{% url 'montpellier-encombrants-sector-listing' %}">{% trans 'Sectors' %}</a></li>
|
||||
<li><a href="{% url 'montpellier-encombrants-commune-listing' %}">{% trans 'Communes' %}</a></li>
|
||||
<li><a href="{% url 'montpellier-encombrants-collectday-listing' %}">{% trans 'Collect Days' %}</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{% url 'montpellier-encombrants-sector-listing' %}">{% trans 'Sectors' %}</a></li>
|
||||
<li><a href="{% url 'montpellier-encombrants-commune-listing' %}">{% trans 'Communes' %}</a></li>
|
||||
<li><a href="{% url 'montpellier-encombrants-collectday-listing' %}">{% trans 'Collect Days' %}</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block security %}
|
||||
<p>
|
||||
{% trans 'Accessing the listings is open, but posting requests is limited to the following API users:' %}
|
||||
</p>
|
||||
<p>
|
||||
{% trans 'Accessing the listings is open, but posting requests is limited to the following API users:' %}
|
||||
</p>
|
||||
|
||||
{% access_rights_table resource=object permission='can_post_request' %}
|
||||
{% access_rights_table resource=object permission='can_post_request' %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,29 +2,29 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block appbar %}
|
||||
<h2>{% trans 'Sectors' %}</h2>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-sector-add' %}">{% trans 'New' %}</a>
|
||||
<h2>{% trans 'Sectors' %}</h2>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-sector-add' %}">{% trans 'New' %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if object_list %}
|
||||
<div class="objects-list">
|
||||
<ul>
|
||||
{% for object in object_list %}
|
||||
<li>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-sector-update' pk=object.id %}">{{ object }}</a>
|
||||
<a rel="popup" class="icon-remove-sign" href="{% url 'montpellier-encombrants-sector-remove' pk=object.id %}"></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="big-msg-info">
|
||||
{% blocktrans %}
|
||||
There is no sector yet. Click on the "New" button in the top
|
||||
right of the page to add a first one.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if object_list %}
|
||||
<div class="objects-list">
|
||||
<ul>
|
||||
{% for object in object_list %}
|
||||
<li>
|
||||
<a rel="popup" href="{% url 'montpellier-encombrants-sector-update' pk=object.id %}">{{ object }}</a>
|
||||
<a rel="popup" class="icon-remove-sign" href="{% url 'montpellier-encombrants-sector-remove' pk=object.id %}"></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="big-msg-info">
|
||||
{% blocktrans %}
|
||||
There is no sector yet. Click on the "New" button in the top
|
||||
right of the page to add a first one.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -14,19 +14,19 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf.urls import include, url
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.urls import include, path, re_path
|
||||
from passerelle.urls_utils import app_enabled, decorated_includes, required
|
||||
|
||||
from .views import *
|
||||
|
||||
public_urlpatterns = [
|
||||
url(
|
||||
re_path(
|
||||
r'^(?P<slug>[\w,-]+)/$',
|
||||
EncombrantsManagementDetailView.as_view(),
|
||||
name='montpellier-encombrants-view',
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r'^(?P<slug>[\w,-]+)/available/(?P<insee>\d+)$',
|
||||
AvailableDaysView.as_view(),
|
||||
name='montpellier-encombrants-available-days',
|
||||
|
@ -34,50 +34,52 @@ public_urlpatterns = [
|
|||
]
|
||||
|
||||
management_urlpatterns = [
|
||||
url(r'^add$', EncombrantsManagementCreateView.as_view(), name='montpellier-encombrants-add'),
|
||||
url(
|
||||
path('add', EncombrantsManagementCreateView.as_view(), name='montpellier-encombrants-add'),
|
||||
re_path(
|
||||
r'^(?P<slug>[\w,-]+)/edit$',
|
||||
EncombrantsManagementUpdateView.as_view(),
|
||||
name='montpellier-encombrants-edit',
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r'^(?P<slug>[\w,-]+)/delete$',
|
||||
EncombrantsManagementDeleteView.as_view(),
|
||||
name='montpellier-encombrants-delete',
|
||||
),
|
||||
url(r'^sectors/$', SectorListView.as_view(), name='montpellier-encombrants-sector-listing'),
|
||||
url(r'^sectors/add$', SectorCreateView.as_view(), name='montpellier-encombrants-sector-add'),
|
||||
url(
|
||||
path('sectors/', SectorListView.as_view(), name='montpellier-encombrants-sector-listing'),
|
||||
path('sectors/add', SectorCreateView.as_view(), name='montpellier-encombrants-sector-add'),
|
||||
re_path(
|
||||
r'^sectors/(?P<pk>[\w,-]+)/$',
|
||||
SectorUpdateView.as_view(),
|
||||
name='montpellier-encombrants-sector-update',
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r'^sectors/(?P<pk>[\w,-]+)/delete$',
|
||||
SectorDeleteView.as_view(),
|
||||
name='montpellier-encombrants-sector-remove',
|
||||
),
|
||||
url(r'^communes/$', CommuneListView.as_view(), name='montpellier-encombrants-commune-listing'),
|
||||
url(r'^communes/add$', CommuneCreateView.as_view(), name='montpellier-encombrants-commune-add'),
|
||||
url(
|
||||
path('communes/', CommuneListView.as_view(), name='montpellier-encombrants-commune-listing'),
|
||||
path('communes/add', CommuneCreateView.as_view(), name='montpellier-encombrants-commune-add'),
|
||||
re_path(
|
||||
r'^communes/(?P<pk>[\w,-]+)/edit$',
|
||||
CommuneUpdateView.as_view(),
|
||||
name='montpellier-encombrants-commune-edit',
|
||||
),
|
||||
url(r'^communes/(?P<pk>[\w,-]+)$', CommuneView.as_view(), name='montpellier-encombrants-commune-view'),
|
||||
url(
|
||||
re_path(
|
||||
r'^communes/(?P<pk>[\w,-]+)$', CommuneView.as_view(), name='montpellier-encombrants-commune-view'
|
||||
),
|
||||
re_path(
|
||||
r'^communes/(?P<pk>[\w,-]+)/streets$',
|
||||
StreetEditView.as_view(),
|
||||
name='montpellier-encombrants-commune-streets-edit-view',
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r'^communes/(?P<pk>[\w,-]+)/delete$',
|
||||
CommuneDeleteView.as_view(),
|
||||
name='montpellier-encombrants-commune-remove',
|
||||
),
|
||||
url(r'^collectdays/$', CollectDayListView.as_view(), name='montpellier-encombrants-collectday-listing'),
|
||||
url(r'^collectdays/add$', CollectDayCreateView.as_view(), name='montpellier-encombrants-collectday-add'),
|
||||
url(
|
||||
path('collectdays/', CollectDayListView.as_view(), name='montpellier-encombrants-collectday-listing'),
|
||||
path('collectdays/add', CollectDayCreateView.as_view(), name='montpellier-encombrants-collectday-add'),
|
||||
re_path(
|
||||
r'^collectdays/(?P<pk>[\w,-]+)/delete$',
|
||||
CollectDayDeleteView.as_view(),
|
||||
name='montpellier-encombrants-collectday-remove',
|
||||
|
@ -87,8 +89,8 @@ management_urlpatterns = [
|
|||
urlpatterns = required(
|
||||
app_enabled('passerelle_montpellier_encombrants'),
|
||||
[
|
||||
url(r'^montpellier-encombrants/', include(public_urlpatterns)),
|
||||
url(
|
||||
re_path(r'^montpellier-encombrants/', include(public_urlpatterns)),
|
||||
re_path(
|
||||
r'^manage/montpellier-encombrants/',
|
||||
decorated_includes(login_required, include(management_urlpatterns)),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue