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

142 lines
8.2 KiB
Plaintext
Raw Normal View History

<% unless @activity.empty? %>
2013-08-01 10:33:49 +08:00
<div id="activity">
<% @activity.each do |e| %>
<% act = e.act %>
<% unless act.nil? %>
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;">
<tr>
<!-- fq -->
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(e.user), :class => "avatar"), user_path(e.user_id), :class => "avatar" %></td>
<td>
<table width="580" border="0">
<% case e.act_type %>
<% when 'Bid' %>
<tr>
<% if e.user == User.current%>
2013-08-19 20:09:43 +08:00
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
<% else %>
2013-08-19 20:09:43 +08:00
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
<% end %>
</tr>
<tr>
<td colspan="2" width="580" >
<p class="font_description">
<%= textilizable act.description %>
</p></td>
</tr>
2013-08-20 15:12:49 +08:00
<tr>
<td>
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), respond_path(e.act_id) %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.commit)%></a></div>
<% when 'Journal' %>
<tr>
<% if e.user == User.current%>
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %></td>
<% else %>
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %></td>
<% end %>
</tr>
<tr>
<td colspan="2" width="580" >
<p class="font_description">
<%= textilizable act.notes %>
</p></td>
</tr>
2013-08-20 15:12:49 +08:00
<tr>
<td>
<div style="display: inline-block; float: right; margin-top: 0px"></div>
<% when 'Changeset' %>
<tr>
<% if e.user == User.current%>
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></td>
<% else %>
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></td>
<% end %>
</tr>
<tr>
<td colspan="2" width="580" >
<p class="font_description">
<%= textilizable act.long_comments %>
</p></td>
</tr>
2013-08-20 15:12:49 +08:00
<tr>
<td>
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.count)%></a></div>
<% when 'Message' %>
<tr>
<% if e.user == User.current%>
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %></td>
<% else %>
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %></td>
<% end %>
</tr>
<tr>
<td colspan="2" width="580" >
<p class="font_description">
<%= textilizable act.content %>
</p></td>
</tr>
2013-08-20 15:12:49 +08:00
<tr>
<td>
<div style="display: inline-block; float: right; margin-top: 0px"></div>
<% when 'News' %>
<tr>
<% if e.user == User.current%>
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %></td>
<% else %>
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %></td>
<% end %>
</tr>
<tr>
<td colspan="2" width="580" >
<p class="font_description">
<%= textilizable act.description %>
</p></td>
</tr>
2013-08-20 15:12:49 +08:00
<tr>
<td>
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.comments_count)%></a></div>
<% when 'Issue' %>
<tr>
<% if e.user == User.current%>
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %></td>
<% else %>
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %></td>
<% end %>
</tr>
<tr>
<td colspan="2" width="580" >
<p class="font_description">
<%= textilizable act.description %>
</p></td>
</tr>
2013-08-20 15:12:49 +08:00
<!--modified by nie -->
<tr>
2013-08-20 15:12:49 +08:00
<td>
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.journals.count)%></a></div>
<% end %>
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a"><span class="font_lighter"> <% if e.act_type == 'Changeset' %>
<%= format_time(e.act.committed_on) %>
<% else %>
<%= format_time(e.act.created_on) %>
2013-08-20 15:12:49 +08:00
<% end %></span></div>
</td>
</tr>
<!-- <tr><div class="line_under"></div></tr> -->
</table></td>
</tr>
</table>
<% end %>
2013-08-20 15:12:49 +08:00
<% end %>
2013-08-20 15:12:49 +08:00
</div>
2013-08-08 10:04:44 +08:00
<div class="pagination" style="float:left;">
<ul>
<%= pagination_links_full @activity_pages %>
<ul>
</div>
2013-08-20 15:12:49 +08:00
<% else %>
<p class="font_description">
<%= l(:label_user_activities) %>
</p>
2013-08-12 23:42:22 +08:00
<% end %>