2014-10-23 11:30:34 +08:00
|
|
|
<!--add by huang-->
|
|
|
|
|
|
|
|
<!--span class="font_lighter" >温馨提示:项目可以是一次作业,也可以是别人或者自己创建的一项小工程~</span-->
|
|
|
|
<div class="menu-div">
|
|
|
|
<div class="menu">
|
|
|
|
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => 0}, :class => 'icon icon-add') if(User.current.allowed_to?(:add_project, nil, :global => true) && @user == User.current)%>
|
|
|
|
<ul><%#链接绑定在页面最下方的jQuery%>
|
|
|
|
<li mode='take' class="<%= "on" if @state.eql?(0)%>"><%=l :label_project_take%></li>
|
|
|
|
<li mode='watched' class="<%= "on" if @state.eql?(1)%>"><%=l :label_has_watched_project%></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div style="height:20px"></div>
|
|
|
|
|
|
|
|
<%#= watch_projects @state %>
|
|
|
|
<% unless @memberships.empty? %>
|
|
|
|
<div class="content_frame">
|
|
|
|
<ul class="user_project_sort">
|
|
|
|
<% for membership in @memberships %>
|
|
|
|
<li>
|
|
|
|
<table width="660" border="0" align="center" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(membership.project), :class => 'avatar') %></td>
|
|
|
|
<td>
|
|
|
|
<table width="580" border="0">
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to_user(membership.user) if membership.respond_to?(:user) %></strong>
|
2015-03-10 09:45:36 +08:00
|
|
|
<span class="font_lighter"> <%= l(:label_project_take_in) %></span> <%= link_to_project(membership.project) %></td>
|
2014-10-23 11:30:34 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" style="word-break:break-all;word-wrap: break-word;">
|
|
|
|
<p class="font_description">
|
|
|
|
<%= membership.project.short_description%>
|
|
|
|
</p></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td align="left"><span class="font_lighter"><%= l(:label_create_time) %> : <%= format_time(membership.created_on) %></span></td><!-- modified by ming -->
|
|
|
|
<td align="right" ><%= h membership.roles.sort.collect(&:to_s).join(', ') %> </td>
|
|
|
|
</tr>
|
|
|
|
</table></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<% else %>
|
|
|
|
<% if @user != User.current %>
|
|
|
|
<p class="font_description"><%= l(:label_project_un) %></p>
|
|
|
|
<% else %>
|
|
|
|
<p class="font_description"><%= l(:label_project_unadd) %></p>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<%= call_hook :view_account_left_bottom, :user => @user %>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
$(document).ready(function($) {
|
|
|
|
$("#content .tabs_new~").find("a").attr("target", "_blank");
|
|
|
|
$("#content .tabs_new~ .pagination").find("a").removeAttr("target");
|
|
|
|
$('[mode=take]').click(function(event) {window.location.href='<%=user_projects_user_url%>'; });
|
|
|
|
$('[mode=watched]').click(function(event) {window.location.href='<%=watch_projects_user_url(type: 1)%>'; });
|
|
|
|
});
|
|
|
|
</script>
|
2014-10-16 15:07:36 +08:00
|
|
|
<% html_title(l(:label_user_project)) -%>
|