Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (29 sloc) 1.98 KB
<% unless node.is_a?(Comment) || node.is_a?(Revision) || node.type == 'page' %>
<%= translation('dashboard.dashboard.by') %> <a href="/profile/<%= node.author.name %>"><%= node.author.name %></a> <%= node.author.new_contributor %>
<% if node.has_power_tag('with') %>
with
<% node.coauthors.each_with_index do |coauthor,i| %>
<a href="/profile/<%= coauthor.username %>">
<%= coauthor.username%> <%= coauthor.new_contributor %></a>
<%= ',' if i < node.coauthors.length-1 %>
<% end %>
<% end %>
<% end %>
<%= distance_of_time_in_words(node.created_at, Time.current, { include_seconds: false, scope: 'datetime.time_ago_in_words' }) %>
<% node = node.parent if node.is_a?(Revision) %>
<span class="">
<% if params[:controller] == 'questions' %>
| <a href="<%= node.path(:question) %>#answers" title="Answers"><i class="fa fa-comments-o" style="color: #DAA583;"></i> <%= node.answers.length %></a>
<% end %>
| <a href="<%= node.path %>#comments"><i class="fa fa-comment-o"></i> <%= node.fetch_comments(current_user).length %></a>
| <a href="/n/<%= node.id %>"><i class="fa fa-link"></i></a>
<span class="d-none d-lg-inline">| <i class="fa fa-eye"></i> <%= number_with_delimiter(node.views) %></span>
| <i style="<% if node.likes > 0 %>color:#db4;<% end %>" class="fa fa-star-o"></i> <%= node.likes %>
<% if params[:mod] %>| <a href="#"><i class="fa fa-ban"></i></a><% end %>
<% if current_user %>
<a class="btn btn-outline-secondary btn-sm" rel="popover" data-container="body" data-placement="top" data-template='<div class="popover" role="tooltip"><div class="arrow"></div><div class="popover-body"><%= render partial:'dashboard/flag_list', locals: { node: node } %></div></div>' data-html="true" data-content="sample" > <i class="fa fa-flag"> </i> </a>
</a>
<% else %>
<a data-toggle="modal" data-target="#loginModal" class="btn btn-outline-secondary btn-sm" role="button" aria-pressed="true"> <i class="fa fa-flag"> </i> </a>
<% end %>
</span>
You can’t perform that action at this time.