socialforge/app/views/users/user_activities.html.erb

54 lines
2.0 KiB
Plaintext
Raw Normal View History

2014-03-28 14:55:34 +08:00
<!--<%# unless @events_by_day.empty? %>
2013-08-01 10:33:49 +08:00
<div id="activity">
2014-03-28 14:55:34 +08:00
<%# @events_by_day.keys.sort.reverse.each do |day| %>
<h4><%#= format_activity_day(day) %></h4>
2013-08-01 10:33:49 +08:00
<dl>
2014-03-28 14:55:34 +08:00
<%# @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
<dt class="<%#= e.event_type %>">
<span class="time"><%#= format_time(e.event_datetime, false) %></span>
<%#= content_tag('span', h(e.project), :class => 'project') %>
<%#= link_to format_activity_title(e.event_title), e.event_url %></dt>
<dd><span class="description"><%#= format_activity_description(e.event_description) %></span></dd>
<%# end -%>
2013-08-01 10:33:49 +08:00
</dl>
2014-03-28 14:55:34 +08:00
<%# end -%>
2013-08-01 10:33:49 +08:00
</div>
2014-03-28 14:55:34 +08:00
<%# end %> -->
2013-08-01 10:33:49 +08:00
<% unless @events_by_day.empty? %>
2013-08-01 10:33:49 +08:00
<div id="activity">
<% @events_by_day.keys.sort.reverse.each do |day| %>
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
<table width="660" border="0" align="left">
<tr>
<td colspan="2" valign="top" width="50" ><img src="/images/new/news.png" width="40" height="40"/></td>
<td><table width="580" border="0">
<tr>
2015-07-06 11:42:26 +08:00
<td colspan="2" valign="top"><strong> <%= content_tag('span', h(e.project), :class => 'project') %></strong>
<% if e.event_type.eql?("message") || e.event_type.eql?("reply") %>
<%= link_to format_activity_title(e.event_title), e.board.project ? project_boards_path(e.board.project,:topic_id => e.id):course_boards_path(e.board.course,:topic_id => e.id) %>
<%else %>
<%= link_to format_activity_title(e.event_title), e.event_url %>
<%end%>
</td>
2014-03-06 15:42:19 +08:00
</tr>
2013-08-01 10:33:49 +08:00
<tr>
<td colspan="2" width="580" ><p class="font_description"><%= format_activity_description(e.event_description) %></p></td>
2014-03-06 15:42:19 +08:00
</tr>
2013-08-01 10:33:49 +08:00
<tr>
<td align="left"><a class="font_lighter"></a></td>
<td width="200" align="right" class="a"><span class="font_lighter"><%= format_activity_day(day) %></span></td>
</tr>
<!-- <tr><div class="line_under"></div></tr> -->
</table></td>
</tr>
</table>
2013-08-01 10:33:49 +08:00
<% end %>
<% end %>
2013-08-01 10:33:49 +08:00
</div>
<% end %>