From 684e7db45afda7f26074343a111196aa7b51a093 Mon Sep 17 00:00:00 2001 From: Aaron Lidman Date: Tue, 5 Nov 2013 13:31:41 -0800 Subject: [PATCH] Improve notes template --- app/assets/stylesheets/common.css.scss | 4 ++-- app/views/browse/note.html.erb | 25 ++++++++++++++++++------- config/locales/en.yml | 1 + 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 6e1c8e016..a2d8e994e 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1013,7 +1013,7 @@ a.donate { } } - .paginate ul { + .paginate ul, .note-comments ul { padding-left: 20px; } @@ -1077,7 +1077,7 @@ a.donate { #sidebar_content { .browse-section.header { padding: 20px; - border-bottom: $keyline; + border-bottom: 1px solid #ccc; h2 { padding: 0 0 5px 0; diff --git a/app/views/browse/note.html.erb b/app/views/browse/note.html.erb index dbf384799..8e277d25f 100644 --- a/app/views/browse/note.html.erb +++ b/app/views/browse/note.html.erb @@ -1,5 +1,20 @@

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

+ + <%= t "browse.note.opened" %>: + <%= note_event(@note.created_at, @note.author) %> by + <% if @note.author.nil? %> + <%= t "browse.note.anonymous" %> + <% else %> + <%= note_author(@note.author) %> + <% end %> + <% if @note.status == "closed" %> + + <%= t "browse.note.closed" %>: + <%= note_event(@note.closed_at, @note.author) %> by + <%= @note.comments.last.author %> + <% end %> +
<% if @note.comments.find { |comment| comment.author.nil? } -%> @@ -9,11 +24,6 @@ <% end -%>
-
-

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

-

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

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

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

@@ -28,7 +38,8 @@

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

-

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

+ <%= h(@note.comments.first.body.to_html) %> +
@@ -38,7 +49,7 @@
<% if @note.comments.length > 1 %> -
+

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

    <% @note.comments[1..-1].each do |comment| %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 808234cea..0192641e1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -288,6 +288,7 @@ en: at_by_html: "%{when} ago by %{user}" description: "Description" comments: "Comments" + anonymous: "anonymous" changeset: changeset_paging_nav: showing_page: "Page %{page}" -- 2.43.2