Module: Workbench::LayoutHelper
- Defined in:
- app/helpers/workbench/layout_helper.rb
Overview
helpers specifically use in /views/layouts only
Instance Method Summary collapse
- #issue_tracker_tag ⇒ Object
- #sandbox_css ⇒ Object
- #sandbox_details_tag ⇒ Object
- #taxonworks_version_tag ⇒ Object
Instance Method Details
#issue_tracker_tag ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'app/helpers/workbench/layout_helper.rb', line 30 def issue_tracker_tag [ link_to( 'Issues', 'https://github.com/SpeciesFileGroup/taxonworks/issues', target: '_blank', data: { 'curation-issue-tracker': sessions_current_project&.data_curation_issue_tracker_url } ), (content_tag('div','', id: 'curation-issue-tracker-container') if sessions_current_project&.data_curation_issue_tracker_url) ].join().html_safe end |
#sandbox_css ⇒ Object
5 6 7 |
# File 'app/helpers/workbench/layout_helper.rb', line 5 def sandbox_css Settings.sandbox_mode? ? 'sandbox' : nil end |
#sandbox_details_tag ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/helpers/workbench/layout_helper.rb', line 15 def sandbox_details_tag if Settings.sandbox_mode? content_tag(:span, class: 'subtle') do [ 'SANDBOX - build', (Settings.sandbox_short_commit_sha ? link_to(Settings.sandbox_short_commit_sha, 'https://github.com/SpeciesFileGroup/taxonworks/tree/' + Settings.sandbox_commit_sha, class: [:font_subtitle]) : 'unknown SHA' ), 'on', ( Settings.sandbox_commit_date ? Settings.sandbox_commit_date : 'date unknown') ].join(' ').html_safe end end end |
#taxonworks_version_tag ⇒ Object
9 10 11 12 13 |
# File 'app/helpers/workbench/layout_helper.rb', line 9 def taxonworks_version_tag unless Settings.sandbox_mode? link_to("v#{Taxonworks::VERSION}", "https://github.com/SpeciesFileGroup/taxonworks/releases/tag/v#{Taxonworks::VERSION}", id: 'taxonworks_version') end end |