Use DELETE when signing out from registrar area

#599
This commit is contained in:
Artur Beljajev 2017-10-09 04:43:37 +03:00
parent 62fbeadf34
commit c257983cdd
7 changed files with 46 additions and 13 deletions

View file

@ -0,0 +1,3 @@
<%= "#{current_user} (#{current_user.roles.first}) - #{current_user.registrar}" %>
<span class="text-muted">|</span>
<%= link_to t('.sign_out'), registrar_destroy_user_session_path, method: :delete %>

View file

@ -16,14 +16,5 @@
- active_class = ['registrar/xml_consoles'].include?(params[:controller]) ? 'active' :nil
%li{class: active_class}= link_to t(:xml_console), registrar_xml_console_path
%ul.nav.navbar-nav.navbar-right
%li.dropdown
%a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
= "#{current_user} (#{current_user.roles.first}) - #{current_user.registrar}"
%span.caret
%ul.dropdown-menu{role: "menu"}
- current_user.linked_users.each do |user|
%li= link_to "#{user} (#{user.roles.first}) - #{user.registrar}", registrar_switch_current_user_path(user),
id: "switch-current-user-#{user.id}-btn"
- if user_signed_in?
%li= link_to t(:log_out_), '/registrar/logout'
%div.navbar-text.navbar-right
= render 'current_user'