scinote-web/app/views/activities/_activity.html.erb

33 lines
1.2 KiB
Text
Raw Normal View History

2016-02-12 23:52:43 +08:00
<li class="activity-item">
<span class="activity-item-date">
<%= l activity.created_at, format: '%H:%M' %>
</span>
<span class="activity-item-text">
2016-09-29 20:12:52 +08:00
<%= activity_truncate(activity.message) %>
2016-02-12 23:52:43 +08:00
<% if activity.my_module %>
2016-07-21 19:11:15 +08:00
[<%=t 'Project' %>:
<% if activity.my_module.experiment.project.name.length >
Constants::NAME_TRUNCATION_LENGTH %>
2016-07-21 19:11:15 +08:00
<div class="modal-tooltip">
<%= truncate(activity.my_module.experiment.project.name,
lenght: Constants::NAME_TRUNCATION_LENGTH).strip %>
<span class="modal-tooltiptext"><%= activity.my_module.experiment.project.name %></span>
2016-07-21 19:11:15 +08:00
</div>
<% else %>
<%= activity.my_module.experiment.project.name %>
2016-07-21 19:11:15 +08:00
<% end %>, <%=t 'Module' %>:
<% if activity.my_module.name.length >
Constants::NAME_TRUNCATION_LENGTH %>
<div class="modal-tooltip"><%= truncate(
activity.my_module.name,
lenght: Constants::NAME_TRUNCATION_LENGTH) %>
2016-07-21 19:11:15 +08:00
<span class="modal-tooltiptext"><%= activity.my_module.name %></span>
</div>
<% else %>
<%= activity.my_module.name %>
<% end %>
]
2016-02-12 23:52:43 +08:00
<% end %>
</span>
</li>