diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 813c214..059fe48 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,6 +1,6 @@ class HomeController < ApplicationController skip_before_filter :authenticate_user! - layout 'home' + layout proc{|controller| request.xhr? ? false : 'marketing'} def index redirect_to dashboard_path if user_signed_in? diff --git a/app/views/fragments/_sidebar.html.erb b/app/views/fragments/_sidebar.html.erb deleted file mode 100644 index 0acf8af..0000000 --- a/app/views/fragments/_sidebar.html.erb +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/app/views/fragments/_user_navigation.html.erb b/app/views/fragments/_user_navigation.html.erb deleted file mode 100644 index 6024b0f..0000000 --- a/app/views/fragments/_user_navigation.html.erb +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 8e625e3..db379d1 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -12,11 +12,11 @@ <%= render :partial => 'fragments/top' %>
<%= flash_display 'flash' %> -
+
@@ -26,7 +26,6 @@
- <%= render :partial => 'fragments/sidebar' %>
<%= render :partial => 'fragments/bottom' %>
diff --git a/app/views/layouts/devise.html.erb b/app/views/layouts/devise.html.erb deleted file mode 100644 index b11e0e7..0000000 --- a/app/views/layouts/devise.html.erb +++ /dev/null @@ -1,23 +0,0 @@ - - - - Simple DNS - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tag %> - - - -
- <%= render :partial => 'fragments/top' %> -
- <%= flash_display 'flash' %> -
- <%= yield %> -
-
- <%= render :partial => 'fragments/bottom' %> -
- - - diff --git a/app/views/layouts/home.html.erb b/app/views/layouts/marketing.html.erb similarity index 80% rename from app/views/layouts/home.html.erb rename to app/views/layouts/marketing.html.erb index 16a2907..ffc5994 100644 --- a/app/views/layouts/home.html.erb +++ b/app/views/layouts/marketing.html.erb @@ -12,7 +12,9 @@ <%= render :partial => 'fragments/top' %>
<%= flash_display 'flash' %> - <%= yield %> +
+ <%= yield %> +
<%= render :partial => 'fragments/bottom' %> diff --git a/config/application.rb b/config/application.rb index b309469..7bcebeb 100644 --- a/config/application.rb +++ b/config/application.rb @@ -46,11 +46,15 @@ module Simpledns config.assets.version = '1.0' config.to_prepare do - Devise::SessionsController.layout "devise" - Devise::RegistrationsController.layout proc{ |controller| user_signed_in? ? "application" : "devise" } - Devise::ConfirmationsController.layout "devise" - Devise::UnlocksController.layout "devise" - Devise::PasswordsController.layout "devise" + layout = proc{|controller| + l = user_signed_in? ? "application" : "marketing" + request.xhr? ? false : l + } + Devise::SessionsController.layout layout + Devise::RegistrationsController.layout layout + Devise::ConfirmationsController.layout layout + Devise::UnlocksController.layout layout + Devise::PasswordsController.layout layout end end