style updates

This commit is contained in:
albert
2013-03-17 23:48:06 -04:00
parent a52eb3ddc2
commit 04b18abc6e
6 changed files with 17 additions and 3 deletions

View File

@@ -5,9 +5,10 @@ div.comments-for-post {
margin: 1em 0;
}
.info {
p.info {
color: #AAA;
font-style: italic;
font-size: 80%;
}
div.list-of-comments {

View File

@@ -1,4 +1,10 @@
div.list-of-forum-posts {
p.info {
color: #AAA;
font-style: italic;
font-size: 80%;
}
article {
margin-bottom: 3em;

View File

@@ -109,6 +109,10 @@ class ForumPost < ActiveRecord::Base
def creator_name
User.id_to_name(creator_id)
end
def updater_name
User.id_to_name(updater_id)
end
def quoted_response
stripped_body = body.gsub(/\[quote\](?:.|\n|\r)+?\[\/quote\][\n\r]*/m, "")

View File

@@ -10,7 +10,7 @@
<%= format_text(comment.body) %>
<% if comment.updater_id.present? && (comment.updater_id != comment.creator_id || comment.created_at != comment.updated_at) %>
<p class="info">Updated by <%= link_to comment.updater_name, user_path(comment.updater_id) %> <%= time_ago_in_words_tagged(comment.updated_at) %>.</p>
<p class="info">Updated by <%= link_to comment.updater_name, user_path(comment.updater_id) %> <%= time_ago_in_words_tagged(comment.updated_at) %></p>
<% end %>
</div>
<menu>

View File

@@ -15,6 +15,9 @@
<div class="prose">
<%= format_text(forum_post.body) %>
</div>
<% if forum_post.updated_at != forum_post.created_at %>
<p class="info">Updated by <%= link_to forum_post.updater_name, user_path(forum_post.updater_id) %> <%= time_ago_in_words_tagged(forum_post.updated_at) %></p>
<% end %>
<menu>
<li>ID: <%= forum_post.id %></li>
<% if @forum_topic %>

View File

@@ -14,7 +14,7 @@
<li>Source: <%= post_source_tag(post) %></li>
<li>Rating: <%= post.pretty_rating %></li>
<li>Score: <span id="score-for-post-<%= post.id %>"><%= post.score %></span> <% if CurrentUser.is_privileged? %>(vote <%= link_to "up", post_votes_path(:post_id => post.id, :score => "up"), :remote => true, :method => :post %>/<%= link_to "down", post_votes_path(:post_id => post.id, :score => "down"), :remote => true, :method => :post %>)<% end %></li>
<li>Fav count: <%= post.fav_count %></li>
<li>Favorites: <%= post.fav_count %></li>
<li>
Status:
<% if post.is_pending? %>