From e5bca50cc52784e541167e9448b5f77f6cd4d482 Mon Sep 17 00:00:00 2001 From: alexisben <alexiben7@gmail.com> Date: Thu, 19 May 2022 12:11:11 +0200 Subject: [PATCH] Block posts: enhance select categories --- .../admin/communication/blocks/templates/posts/_edit.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/communication/blocks/templates/posts/_edit.html.erb b/app/views/admin/communication/blocks/templates/posts/_edit.html.erb index a022d14ac..10ca5a411 100644 --- a/app/views/admin/communication/blocks/templates/posts/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/posts/_edit.html.erb @@ -1,4 +1,4 @@ -<% categories = collection_tree(@block.about&.website.categories.ordered) %> +<% categories = collection_tree(@block.about&.website.categories) %> <div class="row mb-1"> <div class="col-md-6"> @@ -34,7 +34,7 @@ class="form-select select" v-model="data.category_id"> <% categories.each_with_index do |category, index| %> - <option value="<%= category.id %>"><%= category %></option> + <option value="<%= category[:id] %>"><%= category[:label].html_safe %></option> <% end %> </select> </div> -- GitLab