]> git.openstreetmap.org Git - rails.git/commitdiff
Display formatted notes in the web UI
authorTom Hughes <tom@compton.nu>
Sun, 2 Dec 2012 17:06:59 +0000 (17:06 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 3 Dec 2012 14:50:55 +0000 (14:50 +0000)
app/assets/javascripts/templates/notes/show.jst.ejs
app/assets/stylesheets/common.css.scss

index eb3a1474b74e141c8440a35fc02d859fecba58e9..028f4d084dd5bd5bdc1e164754c82328718fce57 100644 (file)
@@ -1,7 +1,7 @@
 <div class="note">
   <h2><%- I18n.t('javascripts.notes.show.title', { id: note.id }) %></h2>
   <% note.comments.forEach(function (comment) { %>
-  <p>
+  <div>
     <small class="deemphasize">
       <% if (comment.user) { %>
         <%= I18n.t('javascripts.notes.show.event', {
@@ -14,9 +14,8 @@
         }) %>
       <% } %>
     </small>
-    <br/>
-    <%- comment.text %>
-  </p>
+    <div class="comment_body"><%= comment.html %></div>
+  </div>
   <% }) %>
   <% if (note.status == "open") { %>
   <form action="#">
index 53fa9ccf3798cd936a8cdd6072b40eb7d7317135..5174e475d5e8063995ef7b5b13a481e34d49d6e3 100644 (file)
@@ -1428,7 +1428,19 @@ abbr.geo {
 
 /* Rules for the notes interface */
 
-.note .buttons {
-  margin-top: 5px;
-  text-align: right;
+.note {
+  .comment_body {
+    margin-top: 4px;
+    margin-bottom: 4px;
+
+    p {
+      margin-top: 0px;
+      margin-bottom: 0px;
+    }
+  }
+
+  .buttons {
+    margin-top: 5px;
+    text-align: right;
+  }
 }