diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 703e19f..1a11383 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -11,12 +11,21 @@ class PagesController < ApplicationController end def show - # redirect_to domains_path if user_signed_in? # for home page only - render :template => current_page + if user_signed_in? && params[:id] == "home" + redirect_to domains_path + else + render :template => current_page + end end protected - - def current_page; "pages/#{clean_path}" end - def clean_path; Pathname.new("/#{params[:id]}").cleanpath.to_s[1..-1] end + + def current_page + @current_page ||= "pages/#{clean_path}" + end + + def clean_path + Pathname.new("/#{params[:id]}").cleanpath.to_s[1..-1] + end + end diff --git a/app/views/active_scaffold_overrides/_horizontal_subform_header.html.erb b/app/views/active_scaffold_overrides/_horizontal_subform_header.html.erb index eedab39..37bf299 100644 --- a/app/views/active_scaffold_overrides/_horizontal_subform_header.html.erb +++ b/app/views/active_scaffold_overrides/_horizontal_subform_header.html.erb @@ -1,3 +1,5 @@ +<%# use correct ACL https://github.com/activescaffold/active_scaffold/pull/72 %> + <% diff --git a/app/views/active_scaffold_overrides/list.html.erb b/app/views/active_scaffold_overrides/list.html.erb new file mode 100644 index 0000000..e789cfc --- /dev/null +++ b/app/views/active_scaffold_overrides/list.html.erb @@ -0,0 +1,7 @@ +
+
+
+ <%= render :super %> +
+
+
\ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 217c10a..9a266a2 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -11,15 +11,9 @@
<%= render :partial => 'fragments/top' %>
-
-
-
-
- <%= flash_display 'flash' %> - <%= yield %> -
-
-
+
+ <%= flash_display 'flash' %> + <%= yield %>
<%= render :partial => 'fragments/bottom' %>