Skip to content

Commit

Permalink
Simplify and rename stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Jun 19, 2024
1 parent cc1eb7f commit 0760243
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 26 deletions.
17 changes: 1 addition & 16 deletions lemarche/templates/dashboard/_siae_activity_card.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load static siae_sectors_display %}

<div class="bg-white d-block rounded-lg shadow-lg p-3 p-lg-5">
<div class="bg-white d-block rounded-lg shadow-lg p-3 mb-3">
<div class="row">
<div class="col-12 col-lg-8">
<p class="h4 lh-sm">{{ activity.sector_group }}</p>
Expand All @@ -20,20 +20,5 @@
<span>{{ activity.location }}</span>
</p>
</div>
<!--
<div class="col-12 col-lg-4 text-right">
<a href="" class="btn btn-outline-primary btn-sm btn-ico" disabled>
<i class="ri-pencil-fill ri-lg"></i>
<span>Modifier</span>
</a>
<br />
<br />
<a href="" class="btn btn-outline-secondary btn-sm btn-ico" disabled>
<i class="ri-delete-bin-line ri-lg"></i>
<span>Supprimer</span>
</a>
</div>
</div>
-->
</div>
</div>
2 changes: 1 addition & 1 deletion lemarche/templates/dashboard/siae_edit_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</li>
{% if user.is_authenticated and user.is_admin %}
<li class="nav-item" role="presentation">
<a href="{% url 'dashboard_siaes:siae_edit_search_2' siae.slug %}#editTabs" id="siae-edit-search-2-tab" class="nav-link {% if 'siae_edit_search_2' in request.resolver_match.url_name %}active{% endif %}" aria-selected="{% if 'siae_edit_search_2' in request.resolver_match.url_name %}true{% else %}false{% endif %}">
<a href="{% url 'dashboard_siaes:siae_edit_activities' siae.slug %}#editTabs" id="siae-edit-search-2-tab" class="nav-link {% if 'siae_edit_activities' in request.resolver_match.url_name %}active{% endif %}" aria-selected="{% if 'siae_edit_activities' in request.resolver_match.url_name %}true{% else %}false{% endif %}">
Votre référencement (2)
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions lemarche/www/dashboard_siaes/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
from django.views.generic.base import RedirectView

from lemarche.www.dashboard_siaes.views import (
SiaeEditActivitiesView,
SiaeEditContactView,
SiaeEditInfoView,
SiaeEditLinksView,
SiaeEditOfferView,
SiaeEditSearch2View,
SiaeEditSearchView,
SiaeSearchAdoptConfirmView,
SiaeSearchBySiretView,
Expand Down Expand Up @@ -34,7 +34,7 @@
),
path("contact/", SiaeEditContactView.as_view(), name="siae_edit_contact"),
path("recherche/", SiaeEditSearchView.as_view(), name="siae_edit_search"),
path("recherche_2/", SiaeEditSearch2View.as_view(), name="siae_edit_search_2"),
path("activite/", SiaeEditActivitiesView.as_view(), name="siae_edit_activities"),
path("info/", SiaeEditInfoView.as_view(), name="siae_edit_info"),
path("offre/", SiaeEditOfferView.as_view(), name="siae_edit_offer"),
path("liens/", SiaeEditLinksView.as_view(), name="siae_edit_links"),
Expand Down
9 changes: 2 additions & 7 deletions lemarche/www/dashboard_siaes/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,10 @@ def get_success_url(self):
return reverse_lazy("dashboard_siaes:siae_edit_search", args=[self.kwargs.get("slug")])


class SiaeEditSearch2View(SiaeMemberRequiredMixin, SuccessMessageMixin, UpdateView):
form_class = SiaeEditSearchForm
template_name = "dashboard/siae_edit_search_2.html"
class SiaeEditActivitiesView(SiaeMemberRequiredMixin, DetailView):
template_name = "dashboard/siae_edit_activities.html"
context_object_name = "siae"
queryset = Siae.objects.all()
success_message = "Vos modifications ont bien été prises en compte."

def get_success_url(self):
return reverse_lazy("dashboard_siaes:siae_edit_search_2", args=[self.kwargs.get("slug")])


class SiaeEditInfoView(SiaeMemberRequiredMixin, SuccessMessageMixin, UpdateView):
Expand Down

0 comments on commit 0760243

Please sign in to comment.