This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed css issues and category namespace issue
- Loading branch information
1 parent
9b2f681
commit 0d7e5d8
Showing
3 changed files
with
806 additions
and
697 deletions.
There are no files selected for viewing
118 changes: 118 additions & 0 deletions
118
ecommerce/templates/oscar/dashboard/catalogue/category_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{% extends 'oscar/dashboard/layout.html' %} | ||
{% load category_tags %} | ||
{% load i18n %} | ||
|
||
{% block body_class %}{{ block.super }} create-page catalogue{% endblock %} | ||
|
||
{% block title %} | ||
{{ title }} | {% trans "Categories" %} | {{ block.super }} | ||
{% endblock %} | ||
|
||
{% block breadcrumbs %} | ||
<nav aria-label="breadcrumb"> | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'dashboard:index' %}">{% trans "Dashboard" %}</a> | ||
</li> | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'dashboard:catalogue-category-list' %}">{% trans "Categories" %}</a> | ||
</li> | ||
<li class="breadcrumb-item active" aria-current="page"> | ||
{{ title }} | ||
</li> | ||
</ol> | ||
</nav> | ||
{% endblock %} | ||
|
||
{% block headertext %}{{ title }}{% endblock %} | ||
|
||
{% block dashboard_content %} | ||
<form action="{% if request.GET.urlencode %}?{{ request.GET.urlencode }}{% endif %}" method="post" class="form-stacked wysiwyg fixed-actions" enctype="multipart/form-data" data-behaviour="tab-nav-errors" autocomplete="off"> | ||
{% csrf_token %} | ||
<div class="row"> | ||
{% block tab_nav %} | ||
<div class="col-md-3"> | ||
<div class="tab-nav sticky-top"> | ||
<div class="table-header"> | ||
<h3>{% trans "Sections" %}</h3> | ||
</div> | ||
<ul class="nav flex-column bs-docs-sidenav" id="category_update_tabs"> | ||
{% block tabs %} | ||
<li class="nav-item"> | ||
<a class="nav-link active" href="#category_details" data-toggle="tab"> | ||
{% trans 'Category details' %} | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#seo" data-toggle="tab"> | ||
{% trans 'Search engine optimisation' %} | ||
</a> | ||
</li> | ||
{% endblock tabs %} | ||
</ul> | ||
</div> | ||
</div> | ||
{% endblock tab_nav %} | ||
<div class="col-md-9"> | ||
<div class="tab-content"> | ||
{% block tab_content %} | ||
{% block category_details %} | ||
<div class="tab-pane active" id="category_details"> | ||
<div class="table-header"> | ||
<h3>{% trans "Category details" %}</h3> | ||
</div> | ||
<div class="card card-body category-details"> | ||
{% block category_details_content %} | ||
<span class="error-block">{{ form.non_field_errors }}</span> | ||
{% for field in form.hidden_fields %} | ||
{{ field }} | ||
{% endfor %} | ||
{% for field in form.primary_form_fields %} | ||
{% if 'attr' not in field.id_for_label %} | ||
{% include 'oscar/dashboard/partials/form_field.html' with field=field %} | ||
{% endif %} | ||
{% endfor %} | ||
{% endblock category_details_content %} | ||
</div> | ||
</div> | ||
{% endblock category_details %} | ||
{% block seo %} | ||
<div class="tab-pane" id="seo"> | ||
<div class="table-header"> | ||
<h3>{% trans "Search engine optimisation" %}</h3> | ||
</div> | ||
<div class="card card-body"> | ||
{% block seo_content %} | ||
{% for field in form.seo_form_fields %} | ||
{% if 'attr' not in field.id_for_label %} | ||
{% include 'oscar/dashboard/partials/form_field.html' with field=field %} | ||
{% endif %} | ||
{% endfor %} | ||
{% endblock seo_content %} | ||
</div> | ||
</div> | ||
{% endblock seo %} | ||
{% endblock tab_content %} | ||
</div> | ||
</div> | ||
</div> | ||
{% block fixed_actions_group %} | ||
<div class="fixed-actions-group"> | ||
<div class="form-group"> | ||
<div class="float-right"> | ||
<a href="{% url 'dashboard:catalogue-category-list' %}"> | ||
{% trans "Cancel" %} | ||
</a> | ||
{% trans "or" %} | ||
<button class="btn btn-secondary" name="action" type="submit" value="continue" data-loading-text="{% trans 'Saving...' %}"> | ||
{% trans "Save and continue editing" %} | ||
</button> | ||
<button class="btn btn-primary" name="action" type="submit" value="save" data-loading-text="{% trans 'Saving...' %}"> | ||
{% trans "Save" %} | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock fixed_actions_group %} | ||
</form> | ||
{% endblock dashboard_content %} |
44 changes: 18 additions & 26 deletions
44
ecommerce/templates/oscar/dashboard/catalogue/category_row_actions.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,24 @@ | ||
{% load django_tables2 %} | ||
{% load i18n %} | ||
<div class="btn-toolbar"> | ||
<div class="btn-group"> | ||
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="true"> | ||
{% trans "Actions" as tmsg %}{{ tmsg | force_escape }} | ||
<span class="caret"></span> | ||
<div class="dropdown"> | ||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
{% trans "Actions" %} | ||
</button> | ||
<ul class="nav dropdown-menu pull-right"> | ||
<li> | ||
<a href="{% url 'dashboard:catalogue-category-update' pk=record.id %}"> | ||
{% trans "Edit category" as tmsg %}{{ tmsg | force_escape }} | ||
</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'dashboard:catalogue-category-create-child' parent=record.pk %}"> | ||
{% trans "Add child category" as tmsg %}{{ tmsg | force_escape }} | ||
</a> | ||
</li> | ||
<li{% if not record.has_children %} class="disabled"{% endif %}> | ||
<a href="{% url 'dashboard:catalogue-category-detail-list' pk=record.pk %}"> | ||
{% trans "Edit children" as tmsg %}{{ tmsg | force_escape }} | ||
</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'dashboard:catalogue-category-delete' pk=record.id %}"> | ||
{% trans "Delete" as tmsg %}{{ tmsg | force_escape }} | ||
</a> | ||
</li> | ||
</ul> | ||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton"> | ||
<a class="dropdown-item" href="{% url 'dashboard:catalogue-category-update' pk=record.id %}"> | ||
{% trans "Edit category" %} | ||
</a> | ||
<a class="dropdown-item" href="{% url 'dashboard:catalogue-category-create-child' parent=record.pk %}"> | ||
{% trans "Add child category" %} | ||
</a> | ||
<a class="dropdown-item {% if not record.has_children %}disabled{% endif %}" | ||
href="{% if not record.has_children %}#{% else %}{% url 'dashboard:catalogue-category-detail-list' pk=record.pk %}{% endif %}"> | ||
{% trans "Edit children" %} | ||
</a> | ||
<a class="dropdown-item" href="{% url 'dashboard:catalogue-category-delete' pk=record.id %}"> | ||
{% trans "Delete" %} | ||
</a> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.