docbrown/app/views/additional_content_boxes/_article_content_area.html.erb
Andy Zhao c42fd3461e
[deploy] Rename positive_reactions_count to public_reactions_count in logic (#7926)
* Rename positive_reactions_count to public_reactions_count

* Add positive reactions count back in so we can remove it

* Use public_category method for reactions

* Add positive_reactions_count in case any old caches rely on it

* Add positive_rxn_count to account for API endpoints

* Remove unused method

* One more spot...

* Add method back in because of caches

* Update specs to match new functionality

* Fix typo

* Remove unused methods
2020-05-26 12:36:28 -04:00

22 lines
1.1 KiB
Text

<h2>
<a href="<%= article.path + article.decorate.internal_utm_params %>" class="<%= "partner-link" if classification == "boosted" %>" data-details="<%= organization&.slug %>__<%= article.slug %>"><%= article.title %></a>
</h2>
<div class="content-author">
<a href="<%= article.user.path + article.decorate.internal_utm_params %>">
<img class="profile-pic" src="<%= ProfileImage.new(article.user).get(width: 50) %>" alt="<%= article.user.username %> profile image" />
<span><%= article.user.name %></span>
</a>
</div>
<p>
<a href="<%= article.path + article.decorate.internal_utm_params %>" class="<%= "partner-link" if classification == "boosted" %>" data-details="<%= organization&.slug %>__<%= article.slug %>">
<%= article.description %>
</a>
<div class="engagement-count">
<% if article.public_reactions_count > 0 %>
<img src="<%= asset_path("reactions-stack.png") %>" alt="Reactions" /> <%= article.public_reactions_count %>
<% end %>
<% if article.comments_count > 0 %>
<img src="<%= asset_path("comments-bubble.png") %>" alt="Reactions" class="comments-bubble" /> <%= article.comments_count %>
<% end %>
</div>
</p>