summaryrefslogtreecommitdiff
path: root/app/views/users/terms/index.html.haml
blob: 4fa04402a1cf8292322cadda41df37c7838bbd5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- redirect_params = { redirect: @redirect } if @redirect

.card-body.rendered-terms{ data: { qa_selector: 'terms_content' } }
  = markdown_field(@term, :terms)
- if current_user
  .card-footer.footer-block.clearfix
    - if can?(current_user, :accept_terms, @term)
      .float-right
        = button_to accept_term_path(@term, redirect_params), class: 'btn btn-success prepend-left-8', data: { qa_selector: 'accept_terms_button' } do
          = _('Accept terms')
    - else
      .pull-right
        = link_to root_path, class: 'btn btn-success prepend-left-8' do
          = _('Continue')
    - if can?(current_user, :decline_terms, @term)
      .float-right
        = button_to decline_term_path(@term, redirect_params), class: 'btn btn-default prepend-left-8' do
          =  _('Decline and sign out')