diff --git a/app/controllers/registrar_controller.rb b/app/controllers/registrar_controller.rb index 6425f0f92..9def33a7e 100644 --- a/app/controllers/registrar_controller.rb +++ b/app/controllers/registrar_controller.rb @@ -1,4 +1,4 @@ class RegistrarController < ApplicationController before_action :authenticate_user! - layout 'registrar' + layout 'depp/application' end diff --git a/app/views/layouts/registrar.haml b/app/views/layouts/depp/application.haml similarity index 71% rename from app/views/layouts/registrar.haml rename to app/views/layouts/depp/application.haml index 7220a8a58..519cce7d6 100644 --- a/app/views/layouts/registrar.haml +++ b/app/views/layouts/depp/application.haml @@ -20,7 +20,7 @@ %span.icon-bar %span.icon-bar %span.icon-bar - = link_to registrar_root_path, class: 'navbar-brand' do + = link_to main_app.registrar_root_path, class: 'navbar-brand' do EIS Registrar - if unstable_env.present? .text-center @@ -29,7 +29,16 @@ .navbar-collapse.collapse %ul.nav.navbar-nav - if can? :show, Invoice - %li= link_to t('invoices'), registrar_invoices_path + %li= link_to t('invoices'), main_app.registrar_invoices_path + + - active_class = %w(domains check renew tranfer keyrelays).include?(params[:controller]) ? 'active' :nil + %li{class: active_class}= link_to t(:domains), depp.domains_path + + - active_class = ['contacts'].include?(params[:controller]) ? 'active' :nil + %li{class: active_class}= link_to t(:contacts), contacts_path + + - active_class = ['xml_consoles'].include?(params[:controller]) ? 'active' :nil + %li{class: active_class}= link_to t(:xml_console), xml_console_path %ul.nav.navbar-nav.navbar-right %li= link_to t('log_out', user: current_user), '/registrar/logout' diff --git a/config/routes.rb b/config/routes.rb index 334730e57..59dec51f5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -79,7 +79,7 @@ Rails.application.routes.draw do end namespace(:registrar) do - mount Depp::Engine, at: '/depp' + mount Depp::Engine, at: '/depp', as: 'depp' resources :invoices