<% if @memberships.empty? %>
<% if @user != User.current %>
<%= l(:label_project_course_un) %>
<% else %>
<%= l(:label_project_course_unadd) %><%= link_to"#{l(:label_course_new)}",:controller=>'projects',:action=>'new', :course => 1 %>
<% end %>
<% else %>
<%= link_to"#{l(:label_course_new)}",:controller=>'projects',:action=>'new', :course => 1 %>
<% for membership in @memberships %>
-
<%= link_to image_tag(url_to_avatar(membership.project), :class => 'avatar'), project_path(membership.project) %> |
<%= link_to_project(membership.project) %>
<%= l(:label_homework) %> (<%= link_to (membership.project.homeworks.count), {:controller => 'projects', :action => 'homework', :id => membership.project.identifier} %>)
<%= l(:label_course_news)%> (<%= link_to (membership.project.news.count), {:controller => 'news', :action => 'index', :project_id => membership.project.identifier} %>)
|
<%= membership.project.description%>
|
<%= format_time(membership.created_on) %> |
<% 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 %>
|
|
<% end %>
<% end %>
<%= call_hook :view_account_left_bottom, :user => @user %>