Browse Source

fix double wrapper, redirect

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
d527c093b9
  1. 19
      app/controllers/pages_controller.rb
  2. 2
      app/views/active_scaffold_overrides/_horizontal_subform_header.html.erb
  3. 7
      app/views/active_scaffold_overrides/list.html.erb
  4. 12
      app/views/layouts/application.html.erb

19
app/controllers/pages_controller.rb

@ -11,12 +11,21 @@ class PagesController < ApplicationController
end end
def show def show
# redirect_to domains_path if user_signed_in? # for home page only if user_signed_in? && params[:id] == "home"
render :template => current_page redirect_to domains_path
else
render :template => current_page
end
end end
protected protected
def current_page; "pages/#{clean_path}" end def current_page
def clean_path; Pathname.new("/#{params[:id]}").cleanpath.to_s[1..-1] end @current_page ||= "pages/#{clean_path}"
end
def clean_path
Pathname.new("/#{params[:id]}").cleanpath.to_s[1..-1]
end
end end

2
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 %>
<thead> <thead>
<tr> <tr>
<% <%

7
app/views/active_scaffold_overrides/list.html.erb

@ -0,0 +1,7 @@
<div class="block">
<div class="content">
<div class="inner" data-pjax-container="true">
<%= render :super %>
</div>
</div>
</div>

12
app/views/layouts/application.html.erb

@ -11,15 +11,9 @@
<div id="container"> <div id="container">
<%= render :partial => 'fragments/top' %> <%= render :partial => 'fragments/top' %>
<div id="wrapper" class="wat-cf"> <div id="wrapper" class="wat-cf">
<div id="main" style="width: 100%;"> <div id="main" style="width: 100%;" data-pjax-container="true">
<div class="block"> <%= flash_display 'flash' %>
<div class="content"> <%= yield %>
<div class="inner" data-pjax-container="true">
<%= flash_display 'flash' %>
<%= yield %>
</div>
</div>
</div>
</div> </div>
</div> </div>
<%= render :partial => 'fragments/bottom' %> <%= render :partial => 'fragments/bottom' %>

Loading…
Cancel
Save