]> git.openstreetmap.org Git - rails.git/commitdiff
Simplify layouting
authorJohn Firebaugh <john.firebaugh@gmail.com>
Thu, 3 Oct 2013 21:10:21 +0000 (14:10 -0700)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Sun, 13 Oct 2013 21:46:07 +0000 (14:46 -0700)
15 files changed:
app/controllers/browse_controller.rb
app/controllers/changeset_controller.rb
app/controllers/site_controller.rb
app/views/browse/changeset.html.erb
app/views/browse/node.html.erb
app/views/browse/node_history.html.erb
app/views/browse/note.html.erb
app/views/browse/relation.html.erb
app/views/browse/relation_history.html.erb
app/views/browse/way.html.erb
app/views/browse/way_history.html.erb
app/views/changeset/list.html.erb
app/views/layouts/map.html.erb
app/views/site/export.html.erb
app/views/site/index.html.erb

index 0103516fff412641e81d15099abdb3daefb668ef..638cb7302edbe628466afb8df6fa4c66c480410c 100644 (file)
@@ -1,14 +1,15 @@
 class BrowseController < ApplicationController
 class BrowseController < ApplicationController
-  layout 'site', :except => [ :start ]
+  layout 'map'
 
   before_filter :authorize_web  
   before_filter :set_locale 
   before_filter { |c| c.check_database_readable(true) }
   around_filter :web_timeout, :except => [:start]
 
 
   before_filter :authorize_web  
   before_filter :set_locale 
   before_filter { |c| c.check_database_readable(true) }
   around_filter :web_timeout, :except => [:start]
 
-  def start 
+  def start
+    render :layout => false
   end
   end
-  
+
   def relation
     @type = "relation"
     @relation = Relation.find(params[:id])
   def relation
     @type = "relation"
     @relation = Relation.find(params[:id])
index b07ca36ca28d022c1a6e7b749cc151a3fa3e5057..727522510f7563b9a47060dc5aa9ffd73117fb55 100644 (file)
@@ -321,7 +321,7 @@ class ChangesetController < ApplicationController
 
       @edits = changesets.order("changesets.created_at DESC").offset((@page - 1) * @page_size).limit(@page_size).preload(:user, :changeset_tags)
 
 
       @edits = changesets.order("changesets.created_at DESC").offset((@page - 1) * @page_size).limit(@page_size).preload(:user, :changeset_tags)
 
-      render :action => :list
+      render :action => :list, :layout => 'map'
     end
   end
 
     end
   end
 
index f4564100c1edc6ff284411b710776415f68fd7ed..cb57ddc3a3f20b683d9de7c22982a114655af6ec 100644 (file)
@@ -1,6 +1,6 @@
 class SiteController < ApplicationController
 class SiteController < ApplicationController
-  layout 'site', :except => [:key, :permalink]
-  layout false, :only => [:key, :permalink]
+  layout 'site'
+  layout 'map', :only => [:index, :export]
 
   before_filter :authorize_web
   before_filter :set_locale
 
   before_filter :authorize_web
   before_filter :set_locale
@@ -34,6 +34,7 @@ class SiteController < ApplicationController
 
   def key
     expires_in 7.days, :public => true
 
   def key
     expires_in 7.days, :public => true
+    render :layout => false
   end
 
   def edit
   end
 
   def edit
index 05e3d4391254d8630139352cee9640bca3fc869e..6c60349dd3121042b4a56a773fb0e2cf78d39524 100644 (file)
@@ -2,70 +2,66 @@
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
-<% content_for :sidebar do %>
-  <h2><%= t 'browse.changeset.changeset', :id => @changeset.id %></h2>
+<h2><%= t 'browse.changeset.changeset', :id => @changeset.id %></h2>
 
 
-  <div class='browse-section common'>
-    <div class='browse-field'>
-      <h4><%= t 'browse.changeset_details.created_at' %></h4>
-      <p><%= l @changeset.created_at %></p>
-    </div>
+<div class='browse-section common'>
+  <div class='browse-field'>
+    <h4><%= t 'browse.changeset_details.created_at' %></h4>
+    <p><%= l @changeset.created_at %></p>
+  </div>
 
 
+  <div class='browse-field'>
+    <h4><%= t 'browse.changeset_details.closed_at' %></h4>
+    <p><%= l @changeset.closed_at %></p>
+  </div>
+
+  <% if @changeset.user.data_public? %>
     <div class='browse-field'>
     <div class='browse-field'>
-      <h4><%= t 'browse.changeset_details.closed_at' %></h4>
-      <p><%= l @changeset.closed_at %></p>
+      <h4><%= t 'browse.changeset_details.belongs_to' %></h4>
+      <p><%= link_to h(@changeset.user.display_name), :controller => "user", :action => "view", :display_name => @changeset.user.display_name %></p>
     </div>
     </div>
+  <% end %>
+</div>
 
 
-    <% if @changeset.user.data_public? %>
-      <div class='browse-field'>
-        <h4><%= t 'browse.changeset_details.belongs_to' %></h4>
-        <p><%= link_to h(@changeset.user.display_name), :controller => "user", :action => "view", :display_name => @changeset.user.display_name %></p>
-      </div>
-    <% end %>
-  </div>
+<%= render :partial => "tag_details", :object => @changeset %>
 
 
-  <%= render :partial => "tag_details", :object => @changeset %>
+<% unless @nodes.empty? %>
+  <div class='browse-section clearfix'>
+    <h4><%= t 'browse.changeset_details.has_nodes', :count => @node_pages.item_count %></h4>
+    <ul>
+      <% @nodes.each do |node| %>
+        <li><%= link_to h(printable_name(node, true)), { :action => "node", :id => node.node_id.to_s }, :class => link_class('node', node), :title => link_title(node) %></li>
+      <% end %>
+    </ul>
+  </div>
+  <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
+<% end %>
 
 
-  <% unless @nodes.empty? %>
-    <div class='browse-section clearfix'>
-      <h4><%= t 'browse.changeset_details.has_nodes', :count => @node_pages.item_count %></h4>
-      <ul>
-        <% @nodes.each do |node| %>
-          <li><%= link_to h(printable_name(node, true)), { :action => "node", :id => node.node_id.to_s }, :class => link_class('node', node), :title => link_title(node) %></li>
-        <% end %>
-      </ul>
-    </div>
-    <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
-  <% end %>
+<% unless @ways.empty? %>
+  <div class='browse-section clearfix'>
+    <h4><%= t 'browse.changeset_details.has_ways', :count => @way_pages.item_count %></h4>
+    <ul>
+      <% @ways.each do |way| %>
+        <li><%= link_to h(printable_name(way, true)), { :action => "way", :id => way.way_id.to_s }, :class => link_class('way', way), :title => link_title(way) %></li>
+      <% end %>
+    </ul>
+  </div>
+  <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %>
+<% end %>
 
 
-  <% unless @ways.empty? %>
-    <div class='browse-section clearfix'>
-      <h4><%= t 'browse.changeset_details.has_ways', :count => @way_pages.item_count %></h4>
+<% unless @relations.empty? %>
+  <div class='browse-section clearfix'>
+    <h4><%= t 'browse.changeset_details.has_relations', :count => @relation_pages.item_count %></h4>
       <ul>
       <ul>
-        <% @ways.each do |way| %>
-          <li><%= link_to h(printable_name(way, true)), { :action => "way", :id => way.way_id.to_s }, :class => link_class('way', way), :title => link_title(way) %></li>
+        <% @relations.each do |relation| %>
+          <li><%= link_to h(printable_name(relation, true)), { :action => "relation", :id => relation.relation_id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %></li>
         <% end %>
       </ul>
         <% end %>
       </ul>
-    </div>
-    <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %>
-  <% end %>
-
-  <% unless @relations.empty? %>
-    <div class='browse-section clearfix'>
-      <h4><%= t 'browse.changeset_details.has_relations', :count => @relation_pages.item_count %></h4>
-        <ul>
-          <% @relations.each do |relation| %>
-            <li><%= link_to h(printable_name(relation, true)), { :action => "relation", :id => relation.relation_id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %></li>
-          <% end %>
-        </ul>
-    </div>
-    <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
-  <% end %>
-
-  <ul class='secondary-actions clearfix'>
-    <li><%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %></li>
-    <li><%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %></li>
-  </ul>
+  </div>
+  <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
 <% end %>
 
 <% end %>
 
-<%= render :template => 'layouts/map' %>
+<ul class='secondary-actions clearfix'>
+  <li><%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %></li>
+  <li><%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %></li>
+</ul>
index 92ccb775de328247603a4a5ae23cf78184d2017f..a395b95eac3a568fec6cef80729cbab0b702e0cc 100644 (file)
@@ -7,15 +7,11 @@
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
-<% content_for :sidebar do %>
-  <h2><%= t'browse.node.node_title', :node_name => @name %></h2>
+<h2><%= t'browse.node.node_title', :node_name => @name %></h2>
 
 
-  <%= render :partial => "node_details", :object => @node %>
+<%= render :partial => "node_details", :object => @node %>
 
 
-  <ul class='secondary-actions clearfix'>
-    <li><%= link_to(t('browse.node.download_xml'), :controller => "node", :action => "read") %></li>
-    <li><%= link_to(t('browse.node.view_history'), :action => "node_history") %></li>
-  </ul>
-<% end %>
-
-<%= render :template => 'layouts/map' %>
+<ul class='secondary-actions clearfix'>
+  <li><%= link_to(t('browse.node.download_xml'), :controller => "node", :action => "read") %></li>
+  <li><%= link_to(t('browse.node.view_history'), :action => "node_history") %></li>
+</ul>
index 6f1a3f0b74f11f53275a898786153f0b0ab689aa..687dc4f9b63787e1af86c377d3a6d1095ff49c31 100644 (file)
@@ -7,17 +7,13 @@
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
-<% content_for :sidebar do %>
-  <h2><%= raw t'browse.node_history.node_history_title', :node_name => link_to(h(@name), :action => "node", :id => @node.id) %></h2>
+<h2><%= raw t'browse.node_history.node_history_title', :node_name => link_to(h(@name), :action => "node", :id => @node.id) %></h2>
 
 
-  <% @node.old_nodes.reverse.each do |node| %>
-    <%= render :partial => "node_details", :object => node %>
-  <% end %>
-
-  <ul class='secondary-actions clearfix'>
-    <li><%= link_to(t('browse.node_history.download_xml'), :controller => "old_node", :action => "history") %></li>
-    <li><%= link_to(t('browse.node_history.view_details'), :action => "node") %></li>
-  </ul>
+<% @node.old_nodes.reverse.each do |node| %>
+  <%= render :partial => "node_details", :object => node %>
 <% end %>
 
 <% end %>
 
-<%= render :template => 'layouts/map' %>
+<ul class='secondary-actions clearfix'>
+  <li><%= link_to(t('browse.node_history.download_xml'), :controller => "old_node", :action => "history") %></li>
+  <li><%= link_to(t('browse.node_history.view_details'), :action => "node") %></li>
+</ul>
index 8ccd525a3d4c1fbfab599a5aa8bbfa235febc922..c18fd40b3efddcd8435d97899a4fe9aa7492477e 100644 (file)
@@ -2,57 +2,53 @@
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
-<% content_for :sidebar do %>
-  <h2><%= t "browse.note.#{@note.status}_title", :note_name => @note.id %></h2>
-
-  <% if @note.comments.find { |comment| comment.author.nil? } -%>
-  <div class='browse-section common'>
-    <p class="warning"><%= t "javascripts.notes.show.anonymous_warning" %></p>
+<h2><%= t "browse.note.#{@note.status}_title", :note_name => @note.id %></h2>
+
+<% if @note.comments.find { |comment| comment.author.nil? } -%>
+<div class='browse-section common'>
+  <p class="warning"><%= t "javascripts.notes.show.anonymous_warning" %></p>
+</div>
+<% end -%>
+
+<div class='browse-section common'>
+  <div class='browse-field'>
+    <h4><%= t "browse.note.opened" %></h4>
+    <p><%= note_event(@note.created_at, @note.author) %></p>
   </div>
   </div>
-  <% end -%>
 
 
-  <div class='browse-section common'>
+  <% if @note.status == "closed" %>
     <div class='browse-field'>
     <div class='browse-field'>
-      <h4><%= t "browse.note.opened" %></h4>
-      <p><%= note_event(@note.created_at, @note.author) %></p>
-    </div>
-
-    <% if @note.status == "closed" %>
-      <div class='browse-field'>
-        <h4><%= t "browse.note.closed" %></h4>
-        <p><%= note_event(@note.closed_at, @note.comments.last.author) %></p>
-      </div>
-    <% elsif @note.comments.length > 1 %>
-      <div class='browse-field'>
-        <h4><%= t "browse.note.last_modified" %></h4>
-        <p><%= note_event(@note.updated_at, @note.comments.last.author) %></p>
-      </div>
-    <% end %>
-
-    <div class='browse-field' id="c<%= @note.comments.first.id %>">
-      <h4><%= t "browse.note.description" %></h4>
-      <p><%= h(@note.comments.first.body.to_html) %></p>
+      <h4><%= t "browse.note.closed" %></h4>
+      <p><%= note_event(@note.closed_at, @note.comments.last.author) %></p>
     </div>
     </div>
-
+  <% elsif @note.comments.length > 1 %>
     <div class='browse-field'>
     <div class='browse-field'>
-      <h4><%= t "browse.node_details.coordinates" %></h4>
-      <p class="geo"><%= link_to ("<span class='latitude'>#{number_with_delimiter(@note.lat)}</span>, <span class='longitude'>#{number_with_delimiter(@note.lon)}</span>".html_safe), {:controller => 'site', :action => 'index', :lat => h(@note.lat), :lon => h(@note.lon), :zoom => "18"} %></p>
+      <h4><%= t "browse.note.last_modified" %></h4>
+      <p><%= note_event(@note.updated_at, @note.comments.last.author) %></p>
     </div>
     </div>
+  <% end %>
+
+  <div class='browse-field' id="c<%= @note.comments.first.id %>">
+    <h4><%= t "browse.note.description" %></h4>
+    <p><%= h(@note.comments.first.body.to_html) %></p>
   </div>
 
   </div>
 
-  <% if @note.comments.length > 1 %>
-    <div class='browse-section clearfix'>
-      <h4><%= t "browse.note.comments" %></h4>
-      <ul>
-        <% @note.comments[1..-1].each do |comment| %>
-          <li id="c<%= comment.id %>">
-            <%= comment.body.to_html %>
-            <small class="deemphasize"><%= note_event(comment.created_at, comment.author) %></small>
-          </li>
-        <% end %>
-      </ul>
-    </div>
-  <% end %>
+  <div class='browse-field'>
+    <h4><%= t "browse.node_details.coordinates" %></h4>
+    <p class="geo"><%= link_to ("<span class='latitude'>#{number_with_delimiter(@note.lat)}</span>, <span class='longitude'>#{number_with_delimiter(@note.lon)}</span>".html_safe), {:controller => 'site', :action => 'index', :lat => h(@note.lat), :lon => h(@note.lon), :zoom => "18"} %></p>
+  </div>
+</div>
+
+<% if @note.comments.length > 1 %>
+  <div class='browse-section clearfix'>
+    <h4><%= t "browse.note.comments" %></h4>
+    <ul>
+      <% @note.comments[1..-1].each do |comment| %>
+        <li id="c<%= comment.id %>">
+          <%= comment.body.to_html %>
+          <small class="deemphasize"><%= note_event(comment.created_at, comment.author) %></small>
+        </li>
+      <% end %>
+    </ul>
+  </div>
 <% end %>
 <% end %>
-
-<%= render :template => 'layouts/map' %>
index 1e3af0df29bd174556b9ac59c42919e4a3ac7388..dc634e3af87958e334927dbff2a249f2d2540919 100644 (file)
@@ -7,15 +7,11 @@
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
-<% content_for :sidebar do %>
-  <h2><%= t'browse.relation.relation_title', :relation_name => @name %></h2>
+<h2><%= t'browse.relation.relation_title', :relation_name => @name %></h2>
 
 
-  <%= render :partial => "relation_details", :object => @relation %>
+<%= render :partial => "relation_details", :object => @relation %>
 
 
-  <ul class='secondary-actions clearfix'>
-    <li><%= link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read") %></li>
-    <li><%= link_to(t('browse.relation.view_history'), :action => "relation_history") %></li>
-  </ul>
-<% end %>
-
-<%= render :template => 'layouts/map' %>
+<ul class='secondary-actions clearfix'>
+  <li><%= link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read") %></li>
+  <li><%= link_to(t('browse.relation.view_history'), :action => "relation_history") %></li>
+</ul>
index 5f419e6c7a17741b79457e8084ccf66261d43f76..486ada5c90a32dd94cdbac7828dce94297d4df9b 100644 (file)
@@ -7,17 +7,13 @@
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
-<% content_for :sidebar do %>
-  <h2><%= raw t'browse.relation_history.relation_history_title', :relation_name => link_to(h(@name), :action => "relation", :id => @relation.id) %></h2>
+<h2><%= raw t'browse.relation_history.relation_history_title', :relation_name => link_to(h(@name), :action => "relation", :id => @relation.id) %></h2>
 
 
-  <% @relation.old_relations.reverse.each do |relation| %>
-    <%= render :partial => "relation_details", :object => relation %>
-  <% end %>
-
-  <ul class='secondary-actions clearfix'>
-    <li><%= link_to(t('browse.relation_history.download_xml'), :controller => "old_relation", :action => "history") %></li>
-    <li><%= link_to(t('browse.relation_history.view_details'), :action => "relation") %></li>
-  </ul>
+<% @relation.old_relations.reverse.each do |relation| %>
+  <%= render :partial => "relation_details", :object => relation %>
 <% end %>
 
 <% end %>
 
-<%= render :template => 'layouts/map' %>
+<ul class='secondary-actions clearfix'>
+  <li><%= link_to(t('browse.relation_history.download_xml'), :controller => "old_relation", :action => "history") %></li>
+  <li><%= link_to(t('browse.relation_history.view_details'), :action => "relation") %></li>
+</ul>
index e5493d3f982b23d0eb2907006169ff7fb31e87e5..598e0472811e7f01800dde7b3aff5b89d125bd86 100644 (file)
@@ -7,15 +7,11 @@
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
-<% content_for :sidebar do %>
-  <h2><%= t'browse.way.way_title', :way_name => @name %></h2>
+<h2><%= t'browse.way.way_title', :way_name => @name %></h2>
 
 
-  <%= render :partial => "way_details", :object => @way %>
+<%= render :partial => "way_details", :object => @way %>
 
 
-  <ul class='secondary-actions clearfix'>
-    <li><%= link_to(t('browse.way.download_xml'), :controller => "way", :action => "read") %></li>
-    <li><%= link_to(t('browse.way.view_history'), :action => "way_history") %></li>
-  </ul>
-<% end %>
-
-<%= render :template => 'layouts/map' %>
+<ul class='secondary-actions clearfix'>
+  <li><%= link_to(t('browse.way.download_xml'), :controller => "way", :action => "read") %></li>
+  <li><%= link_to(t('browse.way.view_history'), :action => "way_history") %></li>
+</ul>
index 7fe4feeb27cfe0e483fbff8dfcce76c452e731a2..ddb8e288a6232ce81f74ace85b2829332913a1c4 100644 (file)
@@ -7,17 +7,13 @@
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
   <%= stylesheet_link_tag 'browse' %>
 <% end %>
 
-<% content_for :sidebar do %>
-  <h2><%= raw t'browse.way_history.way_history_title', :way_name => link_to(h(@name), :action => "way", :id => @way.id) %></h2>
+<h2><%= raw t'browse.way_history.way_history_title', :way_name => link_to(h(@name), :action => "way", :id => @way.id) %></h2>
 
 
-  <% @way.old_ways.reverse.each do |way| %>
-    <%= render :partial => "way_details", :object => way %>
-  <% end %>
-
-  <ul class='secondary-actions clearfix'>
-    <li><%= link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history") %></li>
-    <li><%= link_to(t('browse.way_history.view_details'), :action => "way") %></li>
-  </ul>
+<% @way.old_ways.reverse.each do |way| %>
+  <%= render :partial => "way_details", :object => way %>
 <% end %>
 
 <% end %>
 
-<%= render :template => 'layouts/map' %>
+<ul class='secondary-actions clearfix'>
+  <li><%= link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history") %></li>
+  <li><%= link_to(t('browse.way_history.view_details'), :action => "way") %></li>
+</ul>
index 965b66484b47127f54326a125515a5ed628a6dfa..fc135c6ca0ab477dea7de724f4987ed293af74a2 100644 (file)
@@ -6,26 +6,22 @@
   <% end -%>
 <% end -%>
 
   <% end -%>
 <% end -%>
 
-<% content_for :sidebar do %>
-  <h2><%= @heading %></h2>
+<h2><%= @heading %></h2>
 
 
-  <% if @edits.size > 0 %>
-    <ol class="changesets">
-      <%= render :partial => 'changeset',
-                 :collection => @edits %>
-    </ol>
+<% if @edits.size > 0 %>
+  <ol class="changesets">
+    <%= render :partial => 'changeset',
+               :collection => @edits %>
+  </ol>
 
 
-    <div class="search_more">
-      <div class="inner12 search_results_entry">
-        <%= link_to t('geocoder.results.more_results'), '#', :class => "button" %>
-      </div>
-      <%= image_tag "searching.gif", :class => ["search_searching", "hidden"] %>
+  <div class="search_more">
+    <div class="inner12 search_results_entry">
+      <%= link_to t('geocoder.results.more_results'), '#', :class => "button" %>
     </div>
     </div>
-  <% elsif @user and @user.display_name == params[:display_name] %>
-    <h4><%= t('changeset.list.empty_user_html') %></h4>
-  <% else %>
-    <h4><%= t('changeset.list.empty_anon_html') %></h4>
-  <% end %>
+    <%= image_tag "searching.gif", :class => ["search_searching", "hidden"] %>
+  </div>
+<% elsif @user and @user.display_name == params[:display_name] %>
+  <h4><%= t('changeset.list.empty_user_html') %></h4>
+<% else %>
+  <h4><%= t('changeset.list.empty_anon_html') %></h4>
 <% end %>
 <% end %>
-
-<%= render :template => 'layouts/map' %>
index 7019224861b69bf76006196dec15971b663d7bdd..d5666ed09be0f0b258b0546669696897c648fe9f 100644 (file)
@@ -22,7 +22,7 @@
         <p class="alert"><%= t 'layouts.osm_read_only' %></p>
       <% end %>
 
         <p class="alert"><%= t 'layouts.osm_read_only' %></p>
       <% end %>
 
-      <%= content_for :sidebar %>
+      <%= yield %>
     </div>
   </div>
 
     </div>
   </div>
 
@@ -51,3 +51,5 @@
     </table>
   </div>
 <% end %>
     </table>
   </div>
 <% end %>
+
+<%= render :template => 'layouts/site' %>
index 63afa3dd06bda662edcf0de9a788e6432bb7cb4a..c8d964a596327c053a694b20aae567572f596c3f 100644 (file)
@@ -1,53 +1,50 @@
-<% content_for :sidebar do %>
-  <h2><%= t 'export.start_rjs.export' %></h2>
-  <%= form_tag :controller => "export", :action => "finish" do %>
-    <%= hidden_field_tag 'format', 'osm' %>
-
-    <div class="export_bounds inner22">
-      <div class='export_area_inputs'>
-        <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %>
-        <br/>
-        <%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %>
-        <%= text_field_tag('maxlon', nil, :size => 10, :class => "export_bound") %>
-        <br/>
-        <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %>
-      </div>
-      <a id="drag_box" class='export_hint button' href="#"><%= t'export.start.manually_select' %></a>
+<h2><%= t 'export.start_rjs.export' %></h2>
+
+<%= form_tag :controller => "export", :action => "finish" do %>
+  <%= hidden_field_tag 'format', 'osm' %>
+
+  <div class="export_bounds inner22">
+    <div class='export_area_inputs'>
+      <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %>
+      <br/>
+      <%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %>
+      <%= text_field_tag('maxlon', nil, :size => 10, :class => "export_bound") %>
+      <br/>
+      <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %>
     </div>
     </div>
+    <a id="drag_box" class='export_hint button' href="#"><%= t'export.start.manually_select' %></a>
+  </div>
 
 
-    <div id="export_osm">
-      <h4><%= t'export.start.licence' %></h4>
+  <div id="export_osm">
+    <h4><%= t'export.start.licence' %></h4>
 
 
-      <div class="export_details inner22">
-        <p><%= raw t'export.start.export_details' %></p>
-      </div>
+    <div class="export_details inner22">
+      <p><%= raw t'export.start.export_details' %></p>
+    </div>
 
 
-      <div  id="export_osm_too_large">
-        <h4><%= t'export.start.too_large.heading' %></h4>
+    <div  id="export_osm_too_large">
+      <h4><%= t'export.start.too_large.heading' %></h4>
 
 
-        <div class="export_details inner22">
-          <p><%= t'export.start.too_large.body' %></p>
-          <dl>
-            <dt><a href="http://planet.openstreetmap.org/"><%= t'export.start.too_large.planet.title' %></a></dt>
-            <dd><%= t'export.start.too_large.planet.description' %></dd>
+      <div class="export_details inner22">
+        <p><%= t'export.start.too_large.body' %></p>
+        <dl>
+          <dt><a href="http://planet.openstreetmap.org/"><%= t'export.start.too_large.planet.title' %></a></dt>
+          <dd><%= t'export.start.too_large.planet.description' %></dd>
 
 
-            <dt><a href="http://download.geofabrik.de/"><%= t'export.start.too_large.geofabrik.title' %></a></dt>
-            <dd><%= t'export.start.too_large.geofabrik.description' %></dd>
+          <dt><a href="http://download.geofabrik.de/"><%= t'export.start.too_large.geofabrik.title' %></a></dt>
+          <dd><%= t'export.start.too_large.geofabrik.description' %></dd>
 
 
-            <dt><a href="http://metro.teczno.com/"><%= t'export.start.too_large.metro.title' %></a></dt>
-            <dd><%= t'export.start.too_large.metro.description' %></dd>
+          <dt><a href="http://metro.teczno.com/"><%= t'export.start.too_large.metro.title' %></a></dt>
+          <dd><%= t'export.start.too_large.metro.description' %></dd>
 
 
-            <dt><a href="http://wiki.openstreetmap.org/wiki/Download"><%= t'export.start.too_large.other.title' %></a></dt>
-            <dd><%= t'export.start.too_large.other.description' %></dd>
-          </dl>
-        </div>
+          <dt><a href="http://wiki.openstreetmap.org/wiki/Download"><%= t'export.start.too_large.other.title' %></a></dt>
+          <dd><%= t'export.start.too_large.other.description' %></dd>
+        </dl>
       </div>
     </div>
       </div>
     </div>
+  </div>
 
 
-    <div class="inner12">
-      <%= submit_tag t('export.start.export_button'), :id => "export_commit" %>
-    </div>
-  <% end %>
+  <div class="inner12">
+    <%= submit_tag t('export.start.export_button'), :id => "export_commit" %>
+  </div>
 <% end %>
 <% end %>
-
-<%= render :template => 'layouts/map' %>
index a98810172f8e95af89e112ce1396c8bd0378f4fc..fa3f31c1ad1326b188115facca66af4329ddc7c9 100644 (file)
@@ -1,25 +1,21 @@
-<% content_for :sidebar do %>
-  <h2>
-    <%= t 'layouts.intro_header' %>
-    <span class="icon close"></span>
-  </h2>
+<h2>
+  <%= t 'layouts.intro_header' %>
+  <span class="icon close"></span>
+</h2>
 
 
-  <p class="inner22"><%= t 'layouts.intro_text' %></p>
+<p class="inner22"><%= t 'layouts.intro_text' %></p>
 
 
-  <div class='footer'>
-    <a title="<%= t('layouts.make_a_donation.title') %>" href="http://donate.openstreetmap.org/" class="donate">
-      <span class='icon donate'></span>
-      <span><%= t('layouts.make_a_donation.text') %></span>
-    </a>
+<div class='footer'>
+  <a title="<%= t('layouts.make_a_donation.title') %>" href="http://donate.openstreetmap.org/" class="donate">
+    <span class='icon donate'></span>
+    <span><%= t('layouts.make_a_donation.text') %></span>
+  </a>
 
 
-    <p class='credits inner22'>
-      <%= t 'layouts.partners_html',
-            :ucl => link_to(t('layouts.partners_ucl'), "http://www.vr.ucl.ac.uk"),
-            :ic => link_to(t('layouts.partners_ic'), "http://www.imperial.ac.uk/"),
-            :bytemark => link_to(t('layouts.partners_bytemark'), "http://www.bytemark.co.uk"),
-            :partners => link_to(t('layouts.partners_partners'), t('layouts.partners_url')) %>
-    </p>
-  </div>
-<% end %>
-
-<%= render :template => 'layouts/map' %>
+  <p class='credits inner22'>
+    <%= t 'layouts.partners_html',
+          :ucl => link_to(t('layouts.partners_ucl'), "http://www.vr.ucl.ac.uk"),
+          :ic => link_to(t('layouts.partners_ic'), "http://www.imperial.ac.uk/"),
+          :bytemark => link_to(t('layouts.partners_bytemark'), "http://www.bytemark.co.uk"),
+          :partners => link_to(t('layouts.partners_partners'), t('layouts.partners_url')) %>
+  </p>
+</div>