Method: Sufia::SufiaHelperBehavior#render_visibility_label

Defined in:
app/helpers/sufia/sufia_helper_behavior.rb

#render_visibility_label(document) ⇒ Object



173
174
175
176
177
178
179
180
181
# File 'app/helpers/sufia/sufia_helper_behavior.rb', line 173

def render_visibility_label document
  if document.registered?
     :span, t('sufia.institution_name'), class: "label label-info", title: t('sufia.institution_name')
  elsif document.public?
     :span, t('sufia.visibility.open'), class: "label label-success", title: t('sufia.visibility.open_title_attr')
  else
     :span, t('sufia.visibility.private'), class: "label label-danger", title: t('sufia.visibility.private_title_attr')
  end
end