From b30983f02bd1a0963157c14f14e996f258936625 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 27 Sep 2013 18:09:34 -0700 Subject: [PATCH] Convert browse details to sidebar layout --- app/assets/javascripts/browse.js | 2 - app/assets/stylesheets/browse.css.scss | 9 -- app/assets/stylesheets/common.css.scss | 113 +++++++++++-------- app/assets/stylesheets/small.css.scss | 5 - app/views/browse/_changeset_details.html.erb | 78 ------------- app/views/browse/_common_details.html.erb | 10 +- app/views/browse/_navigation.html.erb | 43 ------- app/views/browse/_node_details.html.erb | 7 -- app/views/browse/_tag.html.erb | 5 +- app/views/browse/_tag_details.html.erb | 6 +- app/views/browse/_way_details.html.erb | 1 + app/views/browse/changeset.html.erb | 70 ++++++++++-- app/views/browse/node.html.erb | 18 ++- app/views/browse/node_history.html.erb | 21 ++-- app/views/browse/note.html.erb | 34 +++--- app/views/browse/relation.html.erb | 15 +-- app/views/browse/relation_history.html.erb | 18 +-- app/views/browse/way.html.erb | 16 +-- app/views/browse/way_history.html.erb | 18 +-- config/locales/en.yml | 50 ++++---- 20 files changed, 226 insertions(+), 313 deletions(-) delete mode 100644 app/views/browse/_changeset_details.html.erb delete mode 100644 app/views/browse/_navigation.html.erb diff --git a/app/assets/javascripts/browse.js b/app/assets/javascripts/browse.js index 565af41af..d51b1c1a9 100644 --- a/app/assets/javascripts/browse.js +++ b/app/assets/javascripts/browse.js @@ -23,7 +23,6 @@ $(document).ready(function () { }).addTo(map); $("#loading").hide(); - $("#browse_map .secondary-actions").show(); $("a[data-editor=remote]").click(function () { return remoteEditHandler(bbox); @@ -41,7 +40,6 @@ $(document).ready(function () { bbox = map.getBounds(); $("#loading").hide(); - $("#browse_map .secondary-actions").show(); $("a[data-editor=remote]").click(function () { return remoteEditHandler(bbox); diff --git a/app/assets/stylesheets/browse.css.scss b/app/assets/stylesheets/browse.css.scss index 179f0c102..ff9dad9b4 100644 --- a/app/assets/stylesheets/browse.css.scss +++ b/app/assets/stylesheets/browse.css.scss @@ -1,14 +1,5 @@ /* Make space for icons */ -li.node::before, -li.way::before, -li.relation::before, -a.node:first-child::before, -a.way:first-child::before, -a.relation:first-child::before { - margin-left: -25px; -} - .node::before, .way::before, .relation::before { diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index fe8e4f238..20648a8ef 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -926,7 +926,8 @@ ul.results-list li { border-bottom: 1px solid #ccc; } .site-index, .site-export, .site-edit, -.changeset-list { +.changeset-list, +.browse { #content { position: absolute; top: $headerHeight; @@ -1083,59 +1084,71 @@ ul.results-list li { border-bottom: 1px solid #ccc; } /* Rules for the data browser */ -.browse-section { - border-top: 1px solid #ccc; - margin-top: $lineheight/2; - padding-top: $lineheight/2; - &:first-child { - margin-top: 0; - } - .warning { - background-color: #ffe0cc; - margin: 0px; - padding: 4px 6px; - max-width: 100%; - } - h4, p { - margin-bottom: $lineheight/4; - } - ul, .bbox, .geo { - display: inline-block; - vertical-align: top; - max-width: 65%; - } - ul p { - margin-left: 0; - margin-bottom: 0; - } - h4 { - float: left; - width: 33.3333%; - display: inline-block; - vertical-align: top; - } -} +body.browse #sidebar_content { + .browse-section { + padding: 20px; + border-bottom: 1px solid #CCC; -.bbox { - div { - width: 33.3333%; - text-align: center; - padding: $lineheight/4 0; - overflow: hidden; - text-overflow: ellipsis; - float: left; + ul { + margin: 0; + } } - .max_lat, - .min_lat { - margin-left: auto; - margin-right: auto; - width: 100%; + + .browse-field { + margin-bottom: 10px; + + h4 { + margin: 0; + padding: 5px 0 5px 10px; + font-size: 12px; + border: 1px solid #CCC; + border-radius: 4px 4px 0 0; + background-color: #F6F6F6; + } + + p { + margin: 0; + padding: 7px 10px; + font-size: 12px; + background-color: #FFF; + border: 1px solid #CCC; + border-top: 0; + border-radius: 0 0 4px 4px; + } } -} -#browse_map .secondary-actions { - display: none; - margin-bottom: $lineheight/2; + .browse-tag-list { + border: 1px solid #CCC; + border-radius: 4px; + font-size: 12px; + + li { + border-bottom: 1px solid #CCC; + } + + li:last-child { + border-bottom: 0; + } + + .browse-tag-k, + .browse-tag-v { + display: inline-block; + width: 50%; + height: 30px; + float: left; + padding: 9px 10px; + } + + .browse-tag-k { + font-weight: bold; + background-color: #F6F6F6; + border-radius: 4px 0 0 4px; + } + + .browse-tag-v { + border-left: 1px solid #CCC; + } + } } /* Rules for the trace list shown by the traces tab etc */ diff --git a/app/assets/stylesheets/small.css.scss b/app/assets/stylesheets/small.css.scss index a1ba2216d..5c4d72e43 100644 --- a/app/assets/stylesheets/small.css.scss +++ b/app/assets/stylesheets/small.css.scss @@ -46,11 +46,6 @@ h2, h3, h4 { /* Rules for greeting bar in the top right corner */ -#browse_map ul.secondary-actions { - float: right; - font-size: 10px; -} - #map { border: 0; } diff --git a/app/views/browse/_changeset_details.html.erb b/app/views/browse/_changeset_details.html.erb deleted file mode 100644 index 7a0deac50..000000000 --- a/app/views/browse/_changeset_details.html.erb +++ /dev/null @@ -1,78 +0,0 @@ -
- -
-
-

<%= t 'browse.changeset_details.created_at' %>

-

<%= l changeset_details.created_at %>

-
- -
-

<%= t 'browse.changeset_details.closed_at' %>

-

<%= l changeset_details.closed_at %>

-
- - <% if changeset_details.user.data_public? %> -
-

<%= t 'browse.changeset_details.belongs_to' %>

-

<%= link_to h(changeset_details.user.display_name), :controller => "user", :action => "view", :display_name => changeset_details.user.display_name %>

-
- <% end %> -
- - <%= render :partial => "tag_details", :object => changeset_details %> - -
-

<%= t 'browse.changeset_details.bounding_box' %>

- <% unless changeset_details.has_valid_bbox? %> -

<%= t 'browse.changeset_details.no_bounding_box' %>

- <% else bbox = changeset_details.bbox.to_unscaled %> -
-
<%=bbox.max_lat -%>
-
<%=bbox.min_lon -%>
-
(<%= link_to t('browse.changeset_details.box'), root_path(:minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => 'yes'), :title => t('browse.changeset_details.show_area_box') %>)
-
<%=bbox.max_lon -%>
-
<%= bbox.min_lat -%>
-
- <% end %> -
- - <% unless @nodes.empty? %> -
-

<%= t 'browse.changeset_details.has_nodes', :count => @node_pages.item_count %>

-
    - <% @nodes.each do |node| %> -
  • <%= link_to h(printable_name(node, true)), { :action => "node", :id => node.node_id.to_s }, :class => link_class('node', node), :title => link_title(node) %>
  • - <% end %> -
-
- <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %> - <% end %> - - <% unless @ways.empty? %> -
-

<%= t 'browse.changeset_details.has_ways', :count => @way_pages.item_count %>

-
    - <% @ways.each do |way| %> -
  • <%= link_to h(printable_name(way, true)), { :action => "way", :id => way.way_id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
  • - <% end %> - <%= - #render :partial => "containing_relation", :collection => changeset_details.containing_relation_members - %> -
-
- <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %> - <% end %> - - <% unless @relations.empty? %> -
-

<%= t 'browse.changeset_details.has_relations', :count => @relation_pages.item_count %>

-
    - <% @relations.each do |relation| %> -
  • <%= link_to h(printable_name(relation, true)), { :action => "relation", :id => relation.relation_id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %>
  • - <% end %> -
-
- <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %> - <% end %> - -
\ No newline at end of file diff --git a/app/views/browse/_common_details.html.erb b/app/views/browse/_common_details.html.erb index 7c8165c67..bea1fbbe0 100644 --- a/app/views/browse/_common_details.html.erb +++ b/app/views/browse/_common_details.html.erb @@ -1,5 +1,5 @@
-
+
<% if common_details.visible? %>

<%= t 'browse.common_details.edited_at' %>

<% else %> @@ -9,7 +9,7 @@
<% if common_details.changeset.user.data_public? %> -
+
<% if common_details.visible? %>

<%= t 'browse.common_details.edited_by' %>

<% else %> @@ -19,18 +19,18 @@
<% end %> -
+

<%= t 'browse.common_details.version' %>

<%= h(common_details.version) %>

-
+

<%= t 'browse.common_details.in_changeset' %>

<%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %>

<% if common_details.changeset.tags['comment'].present? %> -
+

<%= t 'browse.common_details.changeset_comment' %>

<%= linkify(h(common_details.changeset.tags['comment'])) %>

diff --git a/app/views/browse/_navigation.html.erb b/app/views/browse/_navigation.html.erb deleted file mode 100644 index 0856044c8..000000000 --- a/app/views/browse/_navigation.html.erb +++ /dev/null @@ -1,43 +0,0 @@ -<% type = (@next || @prev).class.name.downcase %> -
    - <% if @prev %> -
  • - <%= link_to t('browse.navigation.paging.all.prev', :id => @prev.id.to_s), - { :id => @prev.id }, - { :title => t("browse.navigation.all.prev_#{type}_tooltip") } %> -
  • - <% end %> - <% if @next %> -
  • - <%= link_to t('browse.navigation.paging.all.next', :id => @next.id.to_s), - { :id => @next.id }, - { :title => t("browse.navigation.all.next_#{type}_tooltip") } %> -
  • - <% end %> -
- <% if @next_by_user or @prev_by_user %> -
    - <% if @prev_by_user %> -
  • - <%= link_to t('browse.navigation.paging.user.prev', :id => @prev_by_user.id.to_s), - { :id => @prev_by_user.id }, - { :title => t("browse.navigation.user.prev_#{type}_tooltip", :user => @prev_by_user.user.display_name) } %> -
  • - <% end %> -
  • - <%= - user = (@prev_by_user || @next_by_user).user.display_name - link_to h(user), - { :controller => "changeset", :action => "list", :display_name => user }, - { :title => t("browse.navigation.user.name_#{type}_tooltip", :user => h(user)) } - %> -
  • - <% if @next_by_user %> -
  • - <%= link_to t('browse.navigation.paging.user.next', :id => @next_by_user.id.to_s), - { :id => @next_by_user.id }, - { :title => t("browse.navigation.user.next_#{type}_tooltip", :user => @next_by_user.user.display_name) } %> -
  • - <% end %> -
- <% end %> diff --git a/app/views/browse/_node_details.html.erb b/app/views/browse/_node_details.html.erb index 8dec338d6..10a64b7f7 100644 --- a/app/views/browse/_node_details.html.erb +++ b/app/views/browse/_node_details.html.erb @@ -6,13 +6,6 @@ <% else %> <%= render :partial => "common_details", :object => node_details %> - <% if node_details.visible -%> -
-

<%= t 'browse.node_details.coordinates' %>

-
<%= link_to(content_tag(:span, number_with_delimiter(node_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(node_details.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :lat => h(node_details.lat), :lon => h(node_details.lon), :zoom => "18"}) %>
-
- <% end -%> - <% unless node_details.ways.empty? and node_details.containing_relation_members.empty? %>

<%= t 'browse.node_details.part_of' %>

diff --git a/app/views/browse/_tag.html.erb b/app/views/browse/_tag.html.erb index 298331832..b9296fa48 100644 --- a/app/views/browse/_tag.html.erb +++ b/app/views/browse/_tag.html.erb @@ -1 +1,4 @@ -
  • <%= format_key(tag[0]) %> = <%= format_value(tag[0], tag[1]) %>
  • \ No newline at end of file +
  • + <%= format_key(tag[0]) %> + <%= format_value(tag[0], tag[1]) %> +
  • diff --git a/app/views/browse/_tag_details.html.erb b/app/views/browse/_tag_details.html.erb index 9d0a2af54..cd087bc7f 100644 --- a/app/views/browse/_tag_details.html.erb +++ b/app/views/browse/_tag_details.html.erb @@ -1,6 +1,8 @@ <% unless tag_details.tags.empty? %>

    <%= t'browse.tag_details.tags' %>

    -
      <%= render :partial => "tag", :collection => tag_details.tags.sort %>
    +
      + <%= render :partial => "tag", :collection => tag_details.tags.sort %> +
    -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/browse/_way_details.html.erb b/app/views/browse/_way_details.html.erb index 6bff887b3..1c7972aa8 100644 --- a/app/views/browse/_way_details.html.erb +++ b/app/views/browse/_way_details.html.erb @@ -29,6 +29,7 @@
      <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %>
    +
    <% end %> <% end %>
    diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index 96a5280a5..36d8734a1 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -1,18 +1,72 @@ <% content_for :head do %> -<%= stylesheet_link_tag 'browse' %> + <%= stylesheet_link_tag 'browse' %> + <%= javascript_include_tag 'index' %> <% end %> -<% content_for :heading do %> +<% content_for :sidebar do %>

    <%= t 'browse.changeset.changeset', :id => @changeset.id %>

    + +
    +
    +

    <%= t 'browse.changeset_details.created_at' %>

    +

    <%= l @changeset.created_at %>

    +
    + +
    +

    <%= t 'browse.changeset_details.closed_at' %>

    +

    <%= l @changeset.closed_at %>

    +
    + + <% if @changeset.user.data_public? %> +
    +

    <%= t 'browse.changeset_details.belongs_to' %>

    +

    <%= link_to h(@changeset.user.display_name), :controller => "user", :action => "view", :display_name => @changeset.user.display_name %>

    +
    + <% end %> +
    + + <%= render :partial => "tag_details", :object => @changeset %> + + <% unless @nodes.empty? %> +
    +

    <%= t 'browse.changeset_details.has_nodes', :count => @node_pages.item_count %>

    +
      + <% @nodes.each do |node| %> +
    • <%= link_to h(printable_name(node, true)), { :action => "node", :id => node.node_id.to_s }, :class => link_class('node', node), :title => link_title(node) %>
    • + <% end %> +
    +
    + <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %> + <% end %> + + <% unless @ways.empty? %> +
    +

    <%= t 'browse.changeset_details.has_ways', :count => @way_pages.item_count %>

    +
      + <% @ways.each do |way| %> +
    • <%= link_to h(printable_name(way, true)), { :action => "way", :id => way.way_id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
    • + <% end %> +
    +
    + <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %> + <% end %> + + <% unless @relations.empty? %> +
    +

    <%= t 'browse.changeset_details.has_relations', :count => @relation_pages.item_count %>

    +
      + <% @relations.each do |relation| %> +
    • <%= link_to h(printable_name(relation, true)), { :action => "relation", :id => relation.relation_id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %>
    • + <% end %> +
    +
    + <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %> + <% end %> +
    • <%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %>
    • <%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %>
    <% end %> -<%= render :partial => "navigation" %> - -<% if @changeset.has_valid_bbox? %> -<%= render :partial => "map", :object => @changeset %> -<% end %> -<%= render :partial => "changeset_details", :object => @changeset %> \ No newline at end of file +<%= render :template => 'layouts/map' %> diff --git a/app/views/browse/node.html.erb b/app/views/browse/node.html.erb index f41562a7f..30662c13f 100644 --- a/app/views/browse/node.html.erb +++ b/app/views/browse/node.html.erb @@ -2,12 +2,17 @@ @name = printable_name @node @title = t('browse.node.node') + ' | ' + @name %> + <% content_for :head do %> -<%= stylesheet_link_tag 'browse' %> + <%= stylesheet_link_tag 'browse' %> + <%= javascript_include_tag 'index' %> <% end %> -<% content_for :heading do %> +<% content_for :sidebar do %>

    <%= t'browse.node.node_title', :node_name => @name %>

    + + <%= render :partial => "node_details", :object => @node %> +
    • <%= link_to(t('browse.node.download_xml'), :controller => "node", :action => "read") %>
    • <%= link_to(t('browse.node.view_history'), :action => "node_history") %>
    • @@ -16,12 +21,5 @@ <% end -%>
    <% end %> -<%= render :partial => "navigation" %> - -<% if @node.visible -%> -<%= render :partial => "map", :object => @node %> -<% end -%> -
    - <%= render :partial => "node_details", :object => @node %> -
    \ No newline at end of file +<%= render :template => 'layouts/map' %> diff --git a/app/views/browse/node_history.html.erb b/app/views/browse/node_history.html.erb index e37f0e037..98b6745e4 100644 --- a/app/views/browse/node_history.html.erb +++ b/app/views/browse/node_history.html.erb @@ -2,24 +2,23 @@ @name = printable_name @node @title = t('browse.node_history.node_history') + ' | ' + @name %> + <% content_for :head do %> -<%= stylesheet_link_tag 'browse' %> + <%= stylesheet_link_tag 'browse' %> + <%= javascript_include_tag 'index' %> <% end %> -<% content_for :heading do %> +<% content_for :sidebar do %>

    <%= raw t'browse.node_history.node_history_title', :node_name => link_to(h(@name), :action => "node", :id => @node.id) %>

    + + <% @node.old_nodes.reverse.each do |node| %> + <%= render :partial => "node_details", :object => node %> + <% end %> +
    • <%= link_to(t('browse.node_history.download_xml'), :controller => "old_node", :action => "history") %>
    • <%= link_to(t('browse.node_history.view_details'), :action => "node") %>
    <% end %> -<% if @node.visible -%> - <%= render :partial => "map", :object => @node %> -<% end -%> - -
    - <% @node.old_nodes.reverse.each do |node| %> - <%= render :partial => "node_details", :object => node %> - <% end %> -
    +<%= render :template => 'layouts/map' %> diff --git a/app/views/browse/note.html.erb b/app/views/browse/note.html.erb index 31fd00f01..90c1f358d 100644 --- a/app/views/browse/note.html.erb +++ b/app/views/browse/note.html.erb @@ -1,19 +1,10 @@ <% content_for :head do %> -<%= stylesheet_link_tag 'browse' %> + <%= stylesheet_link_tag 'browse' %> + <%= javascript_include_tag 'index' %> <% end %> -<% content_for :heading do %> -

    - <%= image_tag "#{@note.status}_note_marker.png", :alt => @note.status %> - <%= t "browse.note.#{@note.status}_title", :note_name => @note.id %> -

    -<% end %> - -<%= render :partial => "navigation" %> - -<%= render :partial => "map", :object => @note %> - -
    +<% content_for :sidebar do %> +

    <%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>

    <% if @note.comments.find { |comment| comment.author.nil? } -%>
    @@ -22,29 +13,29 @@ <% end -%>
    -
    +

    <%= t "browse.note.opened" %>

    <%= note_event(@note.created_at, @note.author) %>

    <% if @note.status == "closed" %> -
    +

    <%= t "browse.note.closed" %>

    <%= note_event(@note.closed_at, @note.comments.last.author) %>

    -
    +
    <% elsif @note.comments.length > 1 %> -
    +

    <%= t "browse.note.last_modified" %>

    <%= note_event(@note.updated_at, @note.comments.last.author) %>

    -
    +
    <% end %> -
    +

    <%= t "browse.note.description" %>

    <%= h(@note.comments.first.body.to_html) %>

    -
    +

    <%= t "browse.node_details.coordinates" %>

    <%= link_to ("#{number_with_delimiter(@note.lat)}, #{number_with_delimiter(@note.lon)}".html_safe), {:controller => 'site', :action => 'index', :lat => h(@note.lat), :lon => h(@note.lon), :zoom => "18"} %>

    @@ -63,5 +54,6 @@
    <% end %> +<% end %> -
    +<%= render :template => 'layouts/map' %> diff --git a/app/views/browse/relation.html.erb b/app/views/browse/relation.html.erb index 3ba355054..9d1cee107 100644 --- a/app/views/browse/relation.html.erb +++ b/app/views/browse/relation.html.erb @@ -2,20 +2,21 @@ @name = printable_name @relation @title = t('browse.relation.relation') + ' | ' + @name %> + <% content_for :head do %> -<%= stylesheet_link_tag 'browse' %> + <%= stylesheet_link_tag 'browse' %> + <%= javascript_include_tag 'index' %> <% end %> -<% content_for :heading do %> +<% content_for :sidebar do %>

    <%= t'browse.relation.relation_title', :relation_name => @name %>

    + + <%= render :partial => "relation_details", :object => @relation %> +
    • <%= link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read") %>
    • <%= link_to(t('browse.relation.view_history'), :action => "relation_history") %>
    <% end %> -<%= render :partial => "navigation" %> -<%= render :partial => "map", :object => @relation %> -
    - <%= render :partial => "relation_details", :object => @relation %> -
    \ No newline at end of file +<%= render :template => 'layouts/map' %> diff --git a/app/views/browse/relation_history.html.erb b/app/views/browse/relation_history.html.erb index e0640d900..c22df2f1e 100644 --- a/app/views/browse/relation_history.html.erb +++ b/app/views/browse/relation_history.html.erb @@ -2,21 +2,23 @@ @name = printable_name @relation @title = t('browse.relation_history.relation_history') + ' | ' + @name %> + <% content_for :head do %> -<%= stylesheet_link_tag 'browse' %> + <%= stylesheet_link_tag 'browse' %> + <%= javascript_include_tag 'index' %> <% end %> -<% content_for :heading do %> +<% content_for :sidebar do %>

    <%= raw t'browse.relation_history.relation_history_title', :relation_name => link_to(h(@name), :action => "relation", :id => @relation.id) %>

    + + <% @relation.old_relations.reverse.each do |relation| %> + <%= render :partial => "relation_details", :object => relation %> + <% end %> +
    • <%= link_to(t('browse.relation_history.download_xml'), :controller => "old_relation", :action => "history") %>
    • <%= link_to(t('browse.relation_history.view_details'), :action => "relation") %>
    <% end %> -<%= render :partial => "map", :object => @relation %> -
    -<% @relation.old_relations.reverse.each do |relation| %> - <%= render :partial => "relation_details", :object => relation %> -<% end %> -
    \ No newline at end of file +<%= render :template => 'layouts/map' %> diff --git a/app/views/browse/way.html.erb b/app/views/browse/way.html.erb index 15a0dcad8..1be783a88 100644 --- a/app/views/browse/way.html.erb +++ b/app/views/browse/way.html.erb @@ -2,12 +2,17 @@ @name = printable_name @way @title = t('browse.way.way') + ' | ' + @name %> + <% content_for :head do %> -<%= stylesheet_link_tag 'browse' %> + <%= stylesheet_link_tag 'browse' %> + <%= javascript_include_tag 'index' %> <% end %> -<% content_for :heading do %> +<% content_for :sidebar do %>

    <%= t'browse.way.way_title', :way_name => @name %>

    + + <%= render :partial => "way_details", :object => @way %> +
    • <%= link_to(t('browse.way.download_xml'), :controller => "way", :action => "read") %>
    • <%= link_to(t('browse.way.view_history'), :action => "way_history") %>
    • @@ -15,9 +20,4 @@
    <% end %> -<%= render :partial => "navigation" %> -<%= render :partial => "map", :object => @way %> - -
    - <%= render :partial => "way_details", :object => @way %> -
    \ No newline at end of file +<%= render :template => 'layouts/map' %> diff --git a/app/views/browse/way_history.html.erb b/app/views/browse/way_history.html.erb index 49058edc1..8bc50e307 100644 --- a/app/views/browse/way_history.html.erb +++ b/app/views/browse/way_history.html.erb @@ -2,21 +2,23 @@ @name = printable_name @way @title = t('browse.way_history.way_history') + ' | ' + @name %> + <% content_for :head do %> -<%= stylesheet_link_tag 'browse' %> + <%= stylesheet_link_tag 'browse' %> + <%= javascript_include_tag 'index' %> <% end %> -<% content_for :heading do %> +<% content_for :sidebar do %>

    <%= raw t'browse.way_history.way_history_title', :way_name => link_to(h(@name), :action => "way", :id => @way.id) %>

    + + <% @way.old_ways.reverse.each do |way| %> + <%= render :partial => "way_details", :object => way %> + <% end %> +
    • <%= link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history") %>
    • <%= link_to(t('browse.way_history.view_details'), :action => "way") %>
    <% end %> -<%= render :partial => "map", :object => @way %> -
    -<% @way.old_ways.reverse.each do |way| %> - <%= render :partial => "way_details", :object => way %> -<% end %> -
    \ No newline at end of file +<%= render :template => 'layouts/map' %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 3268e7733..06e6442ff 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -97,7 +97,7 @@ en: browse: changeset: title: "Changeset" - changeset: "Changeset: %{id}" + changeset: "Changeset %{id}" changesetxml: "Changeset XML" osmchangexml: "osmChange XML" feed: @@ -127,30 +127,20 @@ en: prev_note_tooltip: "Previous note" next_note_tooltip: "Next note" changeset_details: - created_at: "Created at:" - closed_at: "Closed at:" - belongs_to: "Belongs to:" - bounding_box: "Bounding box:" - no_bounding_box: "No bounding box has been stored for this changeset." - show_area_box: "Show Area Box" - box: "box" - has_nodes: - one: "Has the following %{count} node:" - other: "Has the following %{count} nodes:" - has_ways: - one: "Has the following %{count} way:" - other: "Has the following %{count} ways:" - has_relations: - one: "Has the following %{count} relation:" - other: "Has the following %{count} relations:" + created_at: "Created" + closed_at: "Closed" + belongs_to: "Author" + has_nodes: "Nodes (%{count})" + has_ways: "Ways (%{count})" + has_relations: "Relations (%{count})" common_details: - edited_at: "Edited at:" - edited_by: "Edited by:" - deleted_at: "Deleted at:" - deleted_by: "Deleted by:" - version: "Version:" - in_changeset: "In changeset:" - changeset_comment: "Comment:" + edited_at: "Edited At" + edited_by: "Edited By" + deleted_at: "Deleted At" + deleted_by: "Deleted By" + version: "Version" + in_changeset: "Changeset" + changeset_comment: "Comment" containing_relation: entry: "Relation %{relation_name}" entry_role: "Relation %{relation_name} (as %{relation_role})" @@ -266,7 +256,7 @@ en: way: "Way %{id}" # There is no 'relation' type because it is not represented in OpenLayers tag_details: - tags: "Tags:" + tags: "Tags" wiki_link: key: "The wiki description page for the %{key} tag" tag: "The wiki description page for the %{key}=%{value} tag" @@ -292,13 +282,13 @@ en: title: "Note" open_title: "Unresolved note: %{note_name}" closed_title: "Resolved note: %{note_name}" - opened: "Opened:" - last_modified: "Last modified:" - closed: "Closed:" + opened: "Opened" + last_modified: "Last modified" + closed: "Closed" at_html: "%{when} ago" at_by_html: "%{when} ago by %{user}" - description: "Description:" - comments: "Comments:" + description: "Description" + comments: "Comments" changeset: changeset_paging_nav: showing_page: "Page %{page}" -- 2.43.2