mconf/mconf-web

View on GitHub
app/views/frontpage/show.html.haml

Summary

Maintainability
Test Coverage
- show_register = current_site.registration_enabled?
- show_login = current_site.local_auth_enabled? || current_site.ldap_enabled?

- content_for :navbar do
  #navbar
    %a#navbar-logo{:href => root_path}

#content.container-fluid

  #headline
    - if current_site.description.blank?
      = t(".headline")
    - else
      = current_site.description

  #center-container
    #action-links
      - if show_register
        = link_to t('.register.title'), register_path, class: 'btn btn-primary btn-lg'
      - if show_register && show_login
        %span= t('.or')
      - if show_login
        = link_to t('.login.title'), login_path, class: 'btn btn-primary btn-lg'

    %ul#action-links-extra
      - if current_site.local_auth_enabled?
        %li= link_to t('.login.lost_password'), new_password_path(resource_name)
      - if current_site.certificate_login_enabled?
        %li= certificate_auth_link t('.login.certificate')
      - if current_site.shib_enabled?
        %li= link_to t('.login.federation'), shibboleth_path