Skip to content

Commit

Permalink
move history controller to parent container, removing the duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Mar 27, 2023
1 parent eaa6edd commit c3c5af7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- if @collection && !@collection.empty?
.hide-if-loading
%div
%ul.simpleTree{data:{controller: 'simple-tree history','simple-tree': { 'auto-click-value': auto_click? }, action: 'clicked->history#updateURL'}}
%ul.simpleTree{data:{controller: 'simple-tree','simple-tree': { 'auto-click-value': auto_click? }, action: 'clicked->history#updateURL'}}
%li.root
%ul
= content
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/concepts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ def show_date_sorted_list
page: page,
sortby:'modified,created',
order:'desc,desc',
display: 'prefLabel,modified,created'
display: 'prefLabel,modified,created',
language: request_lang
}
if @last_date
params.merge!(last_date: @last_date)
Expand Down
2 changes: 1 addition & 1 deletion app/views/collections/_list_view.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
no collections detected
- else
%div
%ul.simpleTree{data:{controller: 'simple-tree history', 'simple-tree': { 'auto-click-value': "true" }, action: 'clicked->history#updateURL'}}
%ul.simpleTree{data:{controller: 'simple-tree', 'simple-tree': { 'auto-click-value': "true" }, action: 'clicked->history#updateURL'}}
%li.root
%ul
- collections_labels.sort_by{|s| [s["prefLabel"]]}.each do |s|
Expand Down
2 changes: 1 addition & 1 deletion app/views/ontologies/_treeview.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= turbo_frame_tag 'concepts_tree_view' do
#tree_wrapper.hide-if-loading
%ul.simpleTree{data:{controller: 'simple-tree history',
%ul.simpleTree{data:{controller: 'simple-tree',
'simple-tree': { 'auto-click-value': "#{autoCLick}" },
action: 'clicked->history#updateURL'}}
%li.root
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%div{data:{controller: 'skos-collection-colors turbo-frame history',
%div{data:{controller: 'skos-collection-colors turbo-frame',
'skos-collection-colors': {'collections-color-select-target-value': 'collection-color-filter'},
'turbo-frame': {
'url-value': "/ajax/classes/treeview?ontology=#{@ontology.acronym}&conceptid=root",
Expand Down
2 changes: 1 addition & 1 deletion app/views/schemes/_tree_view.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- if main_scheme_label.nil?
= no_main_scheme_alert
%div
%ul.simpleTree{data:{controller: 'simple-tree history', action: 'clicked->history#updateURL'}}
%ul.simpleTree{data:{controller: 'simple-tree', action: 'clicked->history#updateURL'}}
%li.root
%ul
- if main_scheme_label.nil?
Expand Down

0 comments on commit c3c5af7

Please sign in to comment.