]> git.openstreetmap.org Git - rails.git/commitdiff
Fix notes page in data browser to match new site style
authorTom Hughes <tom@compton.nu>
Tue, 15 Jan 2013 22:02:53 +0000 (22:02 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 15 Jan 2013 22:25:22 +0000 (22:25 +0000)
app/assets/stylesheets/common.css.scss
app/views/browse/note.html.erb

index fcc580021bc84ee6b9af3c35f04f505b630e5b9e..dd9b3bbcb65a9c47e0b7a771d605b80151afd7bf 100644 (file)
@@ -927,6 +927,10 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   p, ul, .bbox {
     margin-left: 33.3333%;
   }
   p, ul, .bbox {
     margin-left: 33.3333%;
   }
+  ul p {
+    margin-left: 0;
+    margin-bottom: 0;
+  }
   h4 {
     width: 33.3333%;
     float: left;
   h4 {
     width: 33.3333%;
     float: left;
@@ -958,28 +962,6 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   margin-bottom: 10px;
 }
 
   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 {
 /* Rules for the trace list shown by the traces tab etc */
 
 #trace_list {
index 12de1114f654f67d106a48e789f353a54208c442..ec4f8d3ae60667e5cf837a522d9d290ec4520b71 100644 (file)
@@ -1,57 +1,61 @@
-<%= render :partial => "navigation" %>
-
-<h2>
-  <%= image_tag "#{@note.status}_note_marker.png", :alt => @note.status %>
-  <%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>
-</h2>
+<% content_for :head do %>
+<%= stylesheet_link_tag 'browse' %>
+<% end %>
 
 
-<%= render :partial => "map", :object => @note %>
+<% content_for :heading do %>
+  <h2>
+    <%= image_tag "#{@note.status}_note_marker.png", :alt => @note.status %>
+    <%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>
+  </h2>
+<% end %>
 
 
-<table class="browse_details">
-
-  <tr>
-    <th><%= t "browse.note.opened" %></th>
-    <td><%= t "browse.note.at_by_html", :when => friendly_date(@note.created_at), :user => note_author(@note) %></td>
-  </tr>  
-
-  <% if @note.status == "closed" %>
-    <tr>
-      <th><%= t "browse.note.closed" %></th>
-      <td><%= t "browse.note.at_by_html", :when => friendly_date(@note.closed_at), :user => note_author(@note.comments.last) %></td>
-    </tr>  
-  <% elsif @note.comments.length > 1 %>
-    <tr>
-      <th><%= t "browse.note.last_modified" %></th>
-      <td><%= t "browse.note.at_by_html", :when => friendly_date(@note.updated_at), :user => note_author(@note.comments.last) %></td>
-    </tr>  
-  <% end %>
+<%= render :partial => "navigation" %>
 
 
-  <tr>
-    <th><%= t "browse.note.description" %></th>
-    <td><%= h(@note.comments.first.body) %></td>
-  </tr>
+<%= render :partial => "map", :object => @note %>
 
 
-  <tr>
-    <th><%= t "browse.node_details.coordinates" %></th>
-    <td><div 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"} %></div></td>
-  </tr>
+<div class='column-1'>
+
+  <div class='browse-section common'>
+    <div>
+      <h4><%= t "browse.note.opened" %></h4>
+      <p><%= t "browse.note.at_by_html", :when => friendly_date(@note.created_at), :user => note_author(@note) %></p>
+    </div>
+
+    <% if @note.status == "closed" %>
+      <div>
+        <h4><%= t "browse.note.closed" %></h4>
+        <p><%= t "browse.note.at_by_html", :when => friendly_date(@note.closed_at), :user => note_author(@note.comments.last) %></p>
+      </div>  
+    <% elsif @note.comments.length > 1 %>
+      <div>
+        <h4><%= t "browse.note.last_modified" %></h4>
+        <p><%= t "browse.note.at_by_html", :when => friendly_date(@note.updated_at), :user => note_author(@note.comments.last) %></p>
+      </div>  
+    <% end %>
+
+    <div>
+      <h4><%= t "browse.note.description" %></h4>
+      <p><%= h(@note.comments.first.body) %></p>
+    </div>
+
+    <div>
+      <h4><%= t "browse.node_details.coordinates" %></h4>
+      <p><div 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"} %></div></p>
+    </div>
+  </div>
 
   <% if @note.comments.length > 1 %>
 
   <% if @note.comments.length > 1 %>
-    <tr valign="top">
-      <th><%= t "browse.note.comments" %></th>
-      <td class="browse_comments">
-        <table>
-          <% @note.comments[1..-1].each do |comment| %>
-            <tr>
-              <td>
-                <%= comment.body.to_html %>
-                <span class="by"><%= t "browse.note.at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment) %></span>
-              </td>
-            </tr>
-          <% end %>
-        </table>
-      </td>
-    </tr>
+    <div class='browse-section clearfix'>
+      <h4><%= t "browse.note.comments" %></h4>
+      <ul>
+        <% @note.comments[1..-1].each do |comment| %>
+          <li>
+            <%= comment.body.to_html %>
+            <small class="deemphasize"><%= t "browse.note.at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment) %></small>
+          </li>
+        <% end %>
+      </ul>
+    </div>
   <% end %>
 
   <% end %>
 
-</table>
+</div>