Skip to content

Commit

Permalink
Don't show sortable icon for root taxon
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinetheta committed Dec 9, 2015
1 parent 6f1060a commit 8a6ffc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
taxons_template = null
Handlebars.registerHelper 'isRootTaxon', ->
!@parent_id?

get_taxonomy = ->
Spree.ajax
Expand Down
5 changes: 3 additions & 2 deletions backend/app/views/spree/admin/taxons/_list_template.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script type="text/template" id="taxons-list-template">
{{#each taxons}}
<li data-taxon-id="{{id}}" data-taxon-taxonomy-id="{{taxonomy_id}}">
<div class="sortable-handle">
<i class="fa fa-arrows"></i> {{name}}
<div class="sortable-handle">
{{#if (isRootTaxon) }}{{else}}<i class="fa fa-arrows"></i>{{/if}}
{{name}}
<div class="actions right">
<a href="/admin/taxonomies/{{taxonomy_id}}/taxons/{{id}}/edit" class="fa fa-edit icon_link with-tip no-text"></a>
<a href="#" class="delete-taxon-button fa fa-trash icon_link with-tip no-text"></a>
Expand Down

0 comments on commit 8a6ffc0

Please sign in to comment.