Skip to content

Commit

Permalink
Use explicit show category flag instead of req.get('category') using. f…
Browse files Browse the repository at this point in the history
  • Loading branch information
uzulla committed Aug 8, 2021
1 parent 9ec94bf commit c4cbee9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/src/Web/Controller/Admin/CategoriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function create(Request $request): string

// 初期表示時
if (!$request->get('category') || !$request->isValidSig()) {
$this->set('show_category_list', true);
return "admin/categories/create.twig";
}

Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/categories/create.twig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</form>
{% endif %}

{% if not req.get('category') %}
{% if show_category_list %}
<h3>{{ _('Categories') }}</h3>
<ul id="sys-category-list">
{{ renderCategoriesTree2(req, categories) }}
Expand Down
3 changes: 1 addition & 2 deletions app/twig_templates/admin/categories/create_sp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
{{ input(req, 'sig', 'hidden', {'value': sig}) }}
</form>

{% if not req.get('category') %}

{% if show_category_list %}
<h2><span class="h2_inner">{{ _('Categories') }}</span></h2>
<div class="category_list">
<ul id="sys-category-list">
Expand Down

0 comments on commit c4cbee9

Please sign in to comment.