Module: Workbench::LayoutHelper

Defined in:
app/helpers/workbench/layout_helper.rb

Overview

helpers specifically use in /views/layouts only

Instance Method Summary collapse

Instance Method Details

#sandbox_cssObject



5
6
7
# File 'app/helpers/workbench/layout_helper.rb', line 5

def sandbox_css
  Settings.sandbox_mode? ? 'sandbox' : nil
end

#sandbox_details_tagObject



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? 
    (: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_tagObject



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