diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb new file mode 100644 index 0000000000000000000000000000000000000000..26e35e8c8978d80f3ef93d0797e1583d0853502e --- /dev/null +++ b/app/controllers/home_controller.rb @@ -0,0 +1,5 @@ +class HomeController < ApplicationController + def index + redirect_to admin_root_path unless current_extranet + end +end diff --git a/app/views/application/_logo.html.erb b/app/views/application/_logo.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..e98dff7805545100858d02858f82c3a7729c880f --- /dev/null +++ b/app/views/application/_logo.html.erb @@ -0,0 +1,5 @@ +<% if current_context.logo.attached? %> + <%= image_tag current_context.logo, width: 200, alt: current_context.to_s %> +<% else %> + <%= current_context %> +<% end %> diff --git a/app/views/application/_nav.html.erb b/app/views/application/_nav.html.erb index e36e224d71176e04c82cc538fd2857d1ffb35e7f..8d4c112e49109312be2c3e8c87ee137a0e8ad5b4 100644 --- a/app/views/application/_nav.html.erb +++ b/app/views/application/_nav.html.erb @@ -1,11 +1,7 @@ <nav class="navbar navbar-light"> <div class="container"> <a class="navbar-brand" href="/"> - <% if current_website %> - <%= current_website %><br> - <% else %> - <%= current_university %> - <% end %> + <%= render 'logo' %> </a> </div> </nav> diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/app/views/layouts/devise.html.erb b/app/views/layouts/devise.html.erb index da32f8c68dbf28f08c67e47c2de97b812c1c1800..e8bd461767905d1ea26d7739a4c50d5189aca512 100644 --- a/app/views/layouts/devise.html.erb +++ b/app/views/layouts/devise.html.erb @@ -16,11 +16,7 @@ <div class="col-sm-10 mx-auto"> <h1 class="my-5 py-5 text-center"> <%= link_to root_path do %> - <% if current_context.logo.attached? %> - <%= image_tag current_context.logo, width: 200, alt: current_context.to_s %> - <% else %> - <%= current_context %> - <% end %> + <%= render 'logo' %> <% end %> </h1> <div class="card"> diff --git a/config/routes.rb b/config/routes.rb index c6ef305618ce4894cd0a0937f66f47ca71d11832..f58bf5c2ababb9c7f5d7cfb0c739a2ee06ae48ba 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -31,5 +31,5 @@ Rails.application.routes.draw do get '/media/:signed_id/:filename_with_transformations' => 'media#show', as: :medium - root to: 'admin/dashboard#index' + root to: 'home#index' end