From 7f0b66246b4a0f0bd0f127b754fd9126e7683c36 Mon Sep 17 00:00:00 2001 From: riking Date: Tue, 20 May 2014 16:21:47 -0700 Subject: [PATCH] Tweak the no-js layout --- app/views/topics/plain.html.erb | 28 +++++++++++++++++++--------- app/views/topics/show.html.erb | 4 ++-- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/views/topics/plain.html.erb b/app/views/topics/plain.html.erb index f97da5985..93e94d2f0 100644 --- a/app/views/topics/plain.html.erb +++ b/app/views/topics/plain.html.erb @@ -3,22 +3,32 @@ <%= @topic_view.topic.title %> + <%= crawlable_meta_data(title: @topic_view.title, + description: @topic_view.summary, + image: @topic_view.image_url) %> <% @topic_view.posts.each do |post| %> <% if post.user %> -
- #<%=post.post_number%> <%= t 'by'%>: <%= post.user.name %>, <%= post.created_at.to_formatted_s(:long_ordinal) %> +
+ <%= post.user.username_lower %> <%= "(#{post.user.name})" if SiteSetting.display_name_on_posts %> at <%= post.created_at.to_formatted_s(:long_ordinal) %> — #<%= post.post_number %>
-
- <%= post.cooked.html_safe %> +
+ <% if post.hidden %> + <%= t('flagging.user_must_edit').html_safe %> + <% else %> + <%= post.cooked.html_safe %> + <% end %>

<% end %> <% end %> -<% if @topic_view.next_page %> -

- <%= link_to(t('next_page').html_safe, @topic_view.next_page_path ) %> -

-<% end %> +

+ <% if @topic_view.prev_page %> + <%= link_to t(:prev_page), @topic_view.prev_page_path, rel: 'prev' %> + <% end %> + <% if @topic_view.next_page %> + <%= link_to t(:next_page), @topic_view.next_page_path, rel: 'next' %> + <% end %> +

diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index e4eaf680d..d18069c5b 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -6,7 +6,7 @@ <% @topic_view.posts.each do |post| %> <% if post.user %>
- #<%=post.post_number%> <%= t 'by'%>: <%= post.user.name %>, <%= post.created_at.to_formatted_s(:long_ordinal) %> + <%= post.user.username_lower %> <%= "(#{post.user.name})" if SiteSetting.display_name_on_posts %> at <%= post.created_at.to_formatted_s(:long_ordinal) %> — #<%= post.post_number %>
<% if post.hidden %> @@ -25,7 +25,7 @@ <%= link_to t(:prev_page), @topic_view.prev_page_path, rel: 'prev' %> <% end %> <% if @topic_view.next_page %> - <%= link_to t(:next_page), @topic_view.next_page_path, rel: 'next' %> + <%= link_to t(:next_page), @topic_view.next_page_path, rel: 'next' %> <% end %>