69 lines
2.8 KiB
Plaintext
69 lines
2.8 KiB
Plaintext
<div class="content_frame">
|
|
<% if @memberships.empty? %>
|
|
<% if @user != User.current %>
|
|
<p class="font_description">
|
|
<%= l(:label_project_course_un) %>
|
|
</p>
|
|
<% else %>
|
|
<p class="font_description">
|
|
<%= l(:label_project_course_unadd) %>
|
|
<% if User.current.user_extensions.identity == 0 %>
|
|
<%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1}, :class => 'icon icon-add' %>
|
|
<% end %>
|
|
</p>
|
|
<% end %>
|
|
<% else %>
|
|
<% if User.current.user_extensions.identity == 0 %>
|
|
<%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1}, :class => 'icon icon-add' %>
|
|
<% end %>
|
|
<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" ><% if get_avatar?(membership.project)%>
|
|
<%= link_to image_tag(url_to_avatar(membership.project), :class => 'avatar'), project_path(membership.project) %>
|
|
<% else %>
|
|
<%= link_to image_tag('../images/avatars/Project/course.jpg', :class => "avatar"), project_path(membership.project)%>
|
|
<% end %></td>
|
|
<td>
|
|
<table width="580" border="0">
|
|
<tr>
|
|
<td colspan="2" valign="top"><span><%= link_to_project(membership.project) %></span>
|
|
<span style="float: right"><%= l(:label_homework) %> (<span class=""><%= link_to (membership.project.homeworks.count), {:controller => 'projects', :action => 'homework', :id => membership.project.identifier} %></span>)
|
|
|
|
<%= l(:label_course_news)%> (<span style="color: #ed8924"><%= link_to (membership.project.news.count), {:controller => 'news', :action => 'index', :project_id => membership.project.identifier} %></span>)
|
|
<!-- <%= l(:label_member)%>(<span style="color: #ed8924"><%= link_to (membership.project.members.count), {:controller => 'news', :action => 'index', :project_id => membership.project.identifier} %></span>) </span> --></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" width="580" >
|
|
<p class="font_description">
|
|
<%= membership.project.description%>
|
|
</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="left"><span class="font_lighter"> <%= format_time(membership.created_on) %></span></td><!-- modified by ming -->
|
|
<td align="right" >
|
|
|
|
<% if membership.roles.sort.collect(&:to_s).join(', ') =='Manager' %>
|
|
Teacher
|
|
<% elsif membership.roles.sort.collect(&:to_s).join(', ') =='Reporter' %>
|
|
Student
|
|
<% elsif membership.roles.sort.collect(&:to_s).join(', ') =='TA' %>
|
|
TA
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
</table></td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<% end %>
|
|
<%= call_hook :view_account_left_bottom, :user => @user %>
|
|
</div>
|