scinote-web/app/views/project_activities/_index.html.erb
2016-12-29 16:31:48 +01:00

26 lines
909 B
Text

<h5 class="text-center"><%= t("projects.index.activity_tab") %></h5>
<hr>
<ul class="no-style double-line content-activities">
<% if @activities.size == 0 then %>
<li><em><%= t 'projects.index.no_activities' %></em></li>
<% else %>
<% @activities.each do |activity| %>
<li><span class="text-muted"><%= l activity.created_at, format: :full %></span>
<br>
<span>
<%= activity_truncate(activity.message) %>
<% if activity.my_module %>
[<%=t 'Module' %>:
<% if activity.my_module.name.length >
Constants::NAME_TRUNCATION_LENGTH %>
<%= truncate(activity.my_module.name,
lenght: Constants::NAME_TRUNCATION_LENGTH) %>
<% else %>
<%= activity.my_module.name %>
<% end %>]
<% end %>
</span>
</li>
<% end %>
<% end %>
</ul>