forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix nil parentCategory issue in nest_categories_children method * add empty illustration if a taxonomy list is empty * remove random code in taxonomy index view file * treat the case when a category is deleted while keeping its id as a parent for a certain category * use empty_state helper in taxonomies page * internationalize no taxonomy is created * use current_user_admin? helper in taxonomies page * use regular button helper in taxonomies page * remove added code just to test in taxonomy page
- Loading branch information
1 parent
f095c59
commit 2b4e882
Showing
7 changed files
with
44 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
.taxonomy-section | ||
- pairs, impairs = taxonomies.each_with_index.partition { |_, index| index.even? } | ||
- taxonomies_first_row = pairs.map(&:first) | ||
- taxonomies_second_row = impairs.map(&:first) | ||
.first-row | ||
- taxonomies_first_row.each do |taxonomy| | ||
= render Display::TaxonomyCardComponent.new(taxonomy: taxonomy, ontologies_names: @ontologies_names) | ||
.second-row | ||
- taxonomies_second_row.each do |taxonomy| | ||
= render Display::TaxonomyCardComponent.new(taxonomy: taxonomy, ontologies_names: @ontologies_names) | ||
- if taxonomies.blank? | ||
.taxonomy-empty-illustration | ||
= empty_state(t('taxonomy.no_taxonomy_created', type: type)) | ||
- if current_user_admin? | ||
.taxonomy-empty-illustration-button | ||
= regular_button('create-taxonomy', "Create #{type}", variant: "secondary", size: "slim", href: "/admin?section=#{type}") | ||
- else | ||
- pairs, impairs = taxonomies.each_with_index.partition { |_, index| index.even? } | ||
- taxonomies_first_row = pairs.map(&:first) | ||
- taxonomies_second_row = impairs.map(&:first) | ||
.first-row | ||
- taxonomies_first_row.each do |taxonomy| | ||
= render Display::TaxonomyCardComponent.new(taxonomy: taxonomy, ontologies_names: @ontologies_names) | ||
.second-row | ||
- taxonomies_second_row.each do |taxonomy| | ||
= render Display::TaxonomyCardComponent.new(taxonomy: taxonomy, ontologies_names: @ontologies_names) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters