mconf/mconf-web

View on GitHub
app/views/devise/shared/_links.html.haml

Summary

Maintainability
Test Coverage
- registration_enabled = current_site.registration_enabled?
- shib_enabled = current_site.shib_enabled?
- certificate_login_enabled = current_site.certificate_login_enabled?

-# - if registration_enabled || shib_enabled
  -# %h3= t('.other_options')
%ul#login-extra-links

  -# -# we show this even if local auth is disabled because admins can still sign in
  -# - if controller_name != 'sessions'
  -#   %li= link_to t('.login.default'), login_path

  -# -# we show this even if local auth is disabled because admins can still sign in
  -# - if devise_mapping.recoverable? && controller_name != 'passwords'
  -#   %li= link_to t('.lost_password'), new_password_path(resource_name)

  -# - if registration_enabled
  -#   - if devise_mapping.registerable? && controller_name != 'registrations'
  -#     %li= link_to t('.register'), register_path

  - if shib_enabled
    %li= link_to t('.login.federation'), shibboleth_path

  - if certificate_login_enabled
    %li= certificate_auth_link t('.login.certificate')