scinote-web/app/views/project_activities/_index.html.erb

27 lines
909 B
Text
Raw Normal View History

2016-02-12 23:52:43 +08:00
<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>
2016-02-12 23:52:43 +08:00
</li>
<% end %>
<% end %>
</ul>