Merge pull request #4301 from BrokenEagle/forum-topic-bur-indicators
Add BUR counters to forum topics index
This commit is contained in:
@@ -10,4 +10,12 @@ module ForumTopicsHelper
|
||||
def new_forum_topic?(topic, read_forum_topics)
|
||||
!read_forum_topics.map(&:id).include?(topic.id)
|
||||
end
|
||||
|
||||
def bulk_update_request_counts(topic)
|
||||
requests = []
|
||||
requests << %(<span class="topic-pending-burs">Pending: #{topic.pending_bur_count}</span>) if topic.pending_bur_count.positive?
|
||||
requests << %(<span class="topic-approved-burs">Approved: #{topic.approved_bur_count}</span>) if topic.approved_bur_count.positive?
|
||||
requests << %(<span class="topic-rejected-burs">Rejected: #{topic.rejected_bur_count}</span>) if topic.rejected_bur_count.positive?
|
||||
requests.join(" | ").html_safe
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user