highlight stories to their authors that have suggestions - merged with i18n
This commit is contained in:
parent
830d0e6586
commit
a702fae66a
|
@ -607,6 +607,9 @@ span.user_is_author, a.user_is_author,
|
||||||
li .byline a.user_is_author {
|
li .byline a.user_is_author {
|
||||||
color: #6081bd;
|
color: #6081bd;
|
||||||
}
|
}
|
||||||
|
li .byline a.story_has_suggestions {
|
||||||
|
color: #6081bd;
|
||||||
|
}
|
||||||
|
|
||||||
li.story.hidden {
|
li.story.hidden {
|
||||||
opacity: 0.25;
|
opacity: 0.25;
|
||||||
|
|
|
@ -328,6 +328,10 @@ class Story < ActiveRecord::Base
|
||||||
"hotness = '#{self.calculated_hotness}' WHERE id = #{self.id.to_i}")
|
"hotness = '#{self.calculated_hotness}' WHERE id = #{self.id.to_i}")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def has_suggestions?
|
||||||
|
self.suggested_taggings.any? || self.suggested_titles.any?
|
||||||
|
end
|
||||||
|
|
||||||
def hider_count
|
def hider_count
|
||||||
@hider_count ||= HiddenStory.where(:story_id => self.id).count
|
@hider_count ||= HiddenStory.where(:story_id => self.id).count
|
||||||
end
|
end
|
||||||
|
|
|
@ -119,7 +119,8 @@ class="story <%= story.vote && story.vote[:vote] == 1 ? "upvoted" : "" %>
|
||||||
|
|
||||||
<% if story.is_editable_by_user?(@user) %>
|
<% if story.is_editable_by_user?(@user) %>
|
||||||
|
|
|
|
||||||
<a href="<%= edit_story_path(story.short_id) %>"><%= t('.edit') %></a>
|
<a href="<%= edit_story_path(story.short_id) %>" class="<%=
|
||||||
|
story.has_suggestions? ? "story_has_suggestions" : "" %>"><%= t('.edit') %></a>
|
||||||
|
|
||||||
<% if story.is_gone? && story.is_undeletable_by_user?(@user) %>
|
<% if story.is_gone? && story.is_undeletable_by_user?(@user) %>
|
||||||
|
|
|
|
||||||
|
|
Loading…
Reference in a new issue