From 8a6ffc02004d46e34bc4341930b7a09f33dbf072 Mon Sep 17 00:00:00 2001 From: Sinetheta Date: Fri, 4 Dec 2015 14:17:00 -0800 Subject: [PATCH] Don't show sortable icon for root taxon --- .../app/assets/javascripts/spree/backend/taxonomy.js.coffee | 2 ++ backend/app/views/spree/admin/taxons/_list_template.html.erb | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/app/assets/javascripts/spree/backend/taxonomy.js.coffee b/backend/app/assets/javascripts/spree/backend/taxonomy.js.coffee index 0ac0ad93b8f..f694120a37f 100644 --- a/backend/app/assets/javascripts/spree/backend/taxonomy.js.coffee +++ b/backend/app/assets/javascripts/spree/backend/taxonomy.js.coffee @@ -1,4 +1,6 @@ taxons_template = null +Handlebars.registerHelper 'isRootTaxon', -> + !@parent_id? get_taxonomy = -> Spree.ajax diff --git a/backend/app/views/spree/admin/taxons/_list_template.html.erb b/backend/app/views/spree/admin/taxons/_list_template.html.erb index a073372777d..0a16ea4ddb5 100644 --- a/backend/app/views/spree/admin/taxons/_list_template.html.erb +++ b/backend/app/views/spree/admin/taxons/_list_template.html.erb @@ -1,8 +1,9 @@