Skip to content

Commit

Permalink
Categories sort ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtasvoboda committed May 12, 2019
1 parent 1e58048 commit fec5e45
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 9 deletions.
4 changes: 3 additions & 1 deletion controllers/brands/_reorder_toolbar.htm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div data-control="toolbar">
<a href="<?= Backend::url('vojtasvoboda/brands/brands') ?>" class="btn btn-primary oc-icon-caret-left"><?= e(trans('backend::lang.form.return_to_list')) ?></a>
<a href="<?= Backend::url('vojtasvoboda/brands/brands') ?>" class="btn btn-primary oc-icon-caret-left">
<?= e(trans('backend::lang.form.return_to_list')) ?>
</a>
</div>
2 changes: 1 addition & 1 deletion controllers/brands/config_reorder.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Brands
title: Reorder brands
modelClass: VojtaSvoboda\Brands\Models\Brand
nameFrom: name
toolbar:
Expand Down
15 changes: 10 additions & 5 deletions controllers/categories/_list_toolbar.htm
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<div data-control="toolbar">
<a
href="<?= Backend::url('vojtasvoboda/brands/categories/create') ?>"
class="btn btn-primary oc-icon-plus">
New Category
</a>
<div class="btn-group">
<a
href="<?= Backend::url('vojtasvoboda/brands/categories/create') ?>"
class="btn btn-primary oc-icon-plus">
New Category
</a>
<a href="<?= Backend::url('vojtasvoboda/brands/categories/reorder') ?>" class="btn btn-default oc-icon-list-ol">
Change order
</a>
</div>
</div>
5 changes: 5 additions & 0 deletions controllers/categories/_reorder_toolbar.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div data-control="toolbar">
<a href="<?= Backend::url('vojtasvoboda/brands/categories') ?>" class="btn btn-primary oc-icon-caret-left">
<?= e(trans('backend::lang.form.return_to_list')) ?>
</a>
</div>
2 changes: 1 addition & 1 deletion controllers/categories/config_reorder.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Categories
title: Reorder categories
modelClass: VojtaSvoboda\Brands\Models\Category
nameFrom: name
toolbar:
Expand Down
8 changes: 8 additions & 0 deletions controllers/categories/reorder.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('vojtasvoboda/brands/categories') ?>">Categories</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>

<?= $this->reorderRender() ?>
3 changes: 2 additions & 1 deletion updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
1.0.4: Fix typo
1.0.5: Add letters filtration
1.0.6: Fix letters component when replacing component with own code
1.0.7: Fix showing only enabled brands
1.0.7: Fix showing only enabled brands
1.0.8: Categories sort ordering

0 comments on commit fec5e45

Please sign in to comment.