mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-21 23:31:18 +00:00
rename producttype
to product_type
This commit is contained in:
parent
8d643fc6b4
commit
5da27bb266
@ -52,7 +52,7 @@
|
||||
%}
|
||||
<li><a href="{{ url('counter:admin_list') }}">{% trans %}General counters management{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('counter:product_list') }}">{% trans %}Products management{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('counter:producttype_list') }}">{% trans %}Product types management{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('counter:product_type_list') }}">{% trans %}Product types management{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('counter:cash_summary_list') }}">{% trans %}Cash register summaries{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('counter:invoices_call') }}">{% trans %}Invoices call{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('counter:eticket_list') }}">{% trans %}Etickets{% endtrans %}</a></li>
|
||||
|
@ -315,7 +315,7 @@ class ProductType(OrderedModel):
|
||||
return self.name
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("counter:producttype_list")
|
||||
return reverse("counter:product_type_list")
|
||||
|
||||
def is_owned_by(self, user):
|
||||
"""Method to see if that object can be edited by the given user."""
|
||||
|
@ -38,7 +38,7 @@ class ProductTypeSchema(ModelSchema):
|
||||
|
||||
@staticmethod
|
||||
def resolve_url(obj: ProductType) -> str:
|
||||
return reverse("counter:producttype_edit", kwargs={"type_id": obj.id})
|
||||
return reverse("counter:product_type_edit", kwargs={"type_id": obj.id})
|
||||
|
||||
|
||||
class SimpleProductTypeSchema(ModelSchema):
|
||||
|
@ -14,12 +14,12 @@
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
<a href="{{ url('counter:new_producttype') }}" class="btn btn-blue">
|
||||
<a href="{{ url('counter:new_product_type') }}" class="btn btn-blue">
|
||||
{% trans %}New product type{% endtrans %}
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
</p>
|
||||
{% if producttype_list %}
|
||||
{% if product_types %}
|
||||
<aside>
|
||||
<p>
|
||||
{% trans %}Product types are in the same order on this page and on the eboutic.{% endtrans %}
|
||||
@ -46,15 +46,19 @@
|
||||
class="product-type-list"
|
||||
:aria-busy="loading"
|
||||
>
|
||||
{%- for t in producttype_list -%}
|
||||
<li x-sort:item="{{ t.id }}">
|
||||
{%- for product_type in product_types -%}
|
||||
<li x-sort:item="{{ product_type.id }}">
|
||||
<i class="fa fa-grip-vertical"></i>
|
||||
<a href="{{ url('counter:producttype_edit', type_id=t.id) }}">{{ t }}</a>
|
||||
<a href="{{ url('counter:product_type_edit', type_id=product_type.id) }}">
|
||||
{{ product_type.name }}
|
||||
</a>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
{% trans %}There is no product types in this website.{% endtrans %}
|
||||
<p>
|
||||
{% trans %}There are no product types in this website.{% endtrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
@ -121,19 +121,19 @@ urlpatterns = [
|
||||
name="product_edit",
|
||||
),
|
||||
path(
|
||||
"admin/producttype/list/",
|
||||
"admin/product-type/list/",
|
||||
ProductTypeListView.as_view(),
|
||||
name="producttype_list",
|
||||
name="product_type_list",
|
||||
),
|
||||
path(
|
||||
"admin/producttype/create/",
|
||||
"admin/product-type/create/",
|
||||
ProductTypeCreateView.as_view(),
|
||||
name="new_producttype",
|
||||
name="new_product_type",
|
||||
),
|
||||
path(
|
||||
"admin/producttype/<int:type_id>/",
|
||||
"admin/product-type/<int:type_id>/",
|
||||
ProductTypeEditView.as_view(),
|
||||
name="producttype_edit",
|
||||
name="product_type_edit",
|
||||
),
|
||||
path("admin/eticket/list/", EticketListView.as_view(), name="eticket_list"),
|
||||
path("admin/eticket/new/", EticketCreateView.as_view(), name="new_eticket"),
|
||||
|
@ -101,8 +101,9 @@ class ProductTypeListView(CounterAdminTabsMixin, CounterAdminMixin, ListView):
|
||||
"""A list view for the admins."""
|
||||
|
||||
model = ProductType
|
||||
template_name = "counter/producttype_list.jinja"
|
||||
template_name = "counter/product_type_list.jinja"
|
||||
current_tab = "product_types"
|
||||
context_object_name = "product_types"
|
||||
|
||||
|
||||
class ProductTypeCreateView(CounterAdminTabsMixin, CounterAdminMixin, CreateView):
|
||||
|
@ -99,7 +99,7 @@ class CounterAdminTabsMixin(TabedViewMixin):
|
||||
"name": _("Archived products"),
|
||||
},
|
||||
{
|
||||
"url": reverse_lazy("counter:producttype_list"),
|
||||
"url": reverse_lazy("counter:product_type_list"),
|
||||
"slug": "product_types",
|
||||
"name": _("Product types"),
|
||||
},
|
||||
|
@ -4197,20 +4197,20 @@ msgstr "Sans catégorie"
|
||||
msgid "There is no products in this website."
|
||||
msgstr "Il n'y a pas de produits dans ce site web."
|
||||
|
||||
#: counter/templates/counter/producttype_list.jinja:4
|
||||
#: counter/templates/counter/producttype_list.jinja:42
|
||||
#: counter/templates/counter/product_type_list.jinja:4
|
||||
#: counter/templates/counter/product_type_list.jinja:42
|
||||
msgid "Product type list"
|
||||
msgstr "Liste des types de produit"
|
||||
|
||||
#: counter/templates/counter/producttype_list.jinja:18
|
||||
#: counter/templates/counter/product_type_list.jinja:18
|
||||
msgid "New product type"
|
||||
msgstr "Nouveau type de produit"
|
||||
|
||||
#: counter/templates/counter/producttype_list.jinja:25
|
||||
#: counter/templates/counter/product_type_list.jinja:25
|
||||
msgid "Product types are in the same order on this page and on the eboutic."
|
||||
msgstr "Les types de produit sont dans le même ordre sur cette page et sur l'eboutic."
|
||||
|
||||
#: counter/templates/counter/producttype_list.jinja:28
|
||||
#: counter/templates/counter/product_type_list.jinja:28
|
||||
msgid ""
|
||||
"You can reorder them here by drag-and-drop. The changes will then be applied "
|
||||
"globally immediately."
|
||||
@ -4218,8 +4218,8 @@ msgstr ""
|
||||
"Vous pouvez les réorganiser ici. Les changements seront alors immédiatement "
|
||||
"appliqués globalement."
|
||||
|
||||
#: counter/templates/counter/producttype_list.jinja:58
|
||||
msgid "There is no product types in this website."
|
||||
#: counter/templates/counter/product_type_list.jinja:58
|
||||
msgid "There are no product types in this website."
|
||||
msgstr "Il n'y a pas de types de produit dans ce site web."
|
||||
|
||||
#: counter/templates/counter/refilling_list.jinja:15
|
||||
|
Loading…
Reference in New Issue
Block a user