Skip to content

Commit

Permalink
Merge pull request #878 from DaanVanVugt/feature/tab-deeplinking
Browse files Browse the repository at this point in the history
use bootstrap-tab-history to pop tab switches onto history
  • Loading branch information
fbacall authored Aug 4, 2023
2 parents aaa96ce + d03f74d commit 2f4861c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ gem 'icalendar', '~> 2.4.1'
gem 'rss'

gem 'bootstrap-datepicker-rails', '~> 1.6.4.1'
gem 'bootstrap-tab-history-rails'

gem 'rack-cors', require: 'rack/cors'

Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ GEM
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
bootstrap-tab-history-rails (0.1.0)
railties (>= 3.1)
builder (3.2.4)
byebug (11.1.3)
case_transform (0.2)
Expand Down Expand Up @@ -785,6 +787,7 @@ DEPENDENCIES
bootsnap (>= 1.4.4)
bootstrap-datepicker-rails (~> 1.6.4.1)
bootstrap-sass (>= 3.4.1)
bootstrap-tab-history-rails
by_star!
byebug
committee (~> 4.4)
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
//= require jquery.turbolinks
//= require jquery_ujs
//= require bootstrap-sprockets
//= require bootstrap-tab-history
//= require cytoscape
//= require cytoscape-panzoom
//= require jscolor
Expand Down
3 changes: 3 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ def tab(text, icon, href, disabled: { check: false }, active: false, count: nil,
options['data-toggle'] = 'tooltip'
else
options['data-toggle'] = 'tab'
options['data-tab-history'] = true
options['data-tab-history-changer'] = 'replace'
options['data-tab-history-update-url'] = true
end

text << " (#{count})" if count
Expand Down

0 comments on commit 2f4861c

Please sign in to comment.