From: Tom Hughes Date: Tue, 15 Jan 2013 22:02:53 +0000 (+0000) Subject: Fix notes page in data browser to match new site style X-Git-Tag: live~5100^2~49 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/76559d3de23b3af28b6d2014d12ed48d0cfc74cd?hp=8cd6168b48e03b8c3a2dbbfc2b6c882ef8b09465 Fix notes page in data browser to match new site style --- diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index fcc580021..dd9b3bbcb 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -927,6 +927,10 @@ ul.results-list li { border-bottom: 1px solid #ccc; } p, ul, .bbox { margin-left: 33.3333%; } + ul p { + margin-left: 0; + margin-bottom: 0; + } h4 { width: 33.3333%; float: left; @@ -958,28 +962,6 @@ ul.results-list li { border-bottom: 1px solid #ccc; } margin-bottom: 10px; } -td.browse_comments { - padding: 0px; - - table { - border-collapse: collapse; - - td { - padding-bottom: 10px; - - p { - margin-top: 0px; - margin-bottom: 0px; - } - - span.by { - font-size: small; - color: #999999; - } - } - } -} - /* Rules for the trace list shown by the traces tab etc */ #trace_list { diff --git a/app/views/browse/note.html.erb b/app/views/browse/note.html.erb index 12de1114f..ec4f8d3ae 100644 --- a/app/views/browse/note.html.erb +++ b/app/views/browse/note.html.erb @@ -1,57 +1,61 @@ -<%= render :partial => "navigation" %> - -

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

+<% content_for :head do %> +<%= stylesheet_link_tag 'browse' %> +<% end %> -<%= render :partial => "map", :object => @note %> +<% 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 %> - - - - - - - - <% if @note.status == "closed" %> - - - - - <% elsif @note.comments.length > 1 %> - - - - - <% end %> +<%= render :partial => "navigation" %> - - - - +<%= render :partial => "map", :object => @note %> - - - - +
+ +
+
+

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

+

<%= t "browse.note.at_by_html", :when => friendly_date(@note.created_at), :user => note_author(@note) %>

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

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

+

<%= t "browse.note.at_by_html", :when => friendly_date(@note.closed_at), :user => note_author(@note.comments.last) %>

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

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

+

<%= t "browse.note.at_by_html", :when => friendly_date(@note.updated_at), :user => note_author(@note.comments.last) %>

+
+ <% end %> + +
+

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

+

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

+
+ +
+

<%= 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"} %>

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

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

+ +
<% end %> -
<%= t "browse.note.opened" %><%= t "browse.note.at_by_html", :when => friendly_date(@note.created_at), :user => note_author(@note) %>
<%= t "browse.note.closed" %><%= t "browse.note.at_by_html", :when => friendly_date(@note.closed_at), :user => note_author(@note.comments.last) %>
<%= t "browse.note.last_modified" %><%= t "browse.note.at_by_html", :when => friendly_date(@note.updated_at), :user => note_author(@note.comments.last) %>
<%= t "browse.note.description" %><%= h(@note.comments.first.body) %>
<%= 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"} %>
<%= t "browse.note.comments" %> - - <% @note.comments[1..-1].each do |comment| %> - - - - <% end %> -
- <%= comment.body.to_html %> - <%= t "browse.note.at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment) %> -
-
+