<% if @memberships.empty? %>
<% if @user != User.current %>
<%= l(:label_project_course_un) %>
<% else %>
<%= 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 %>
<% 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 %>
<% for membership in @memberships %>
-
<% 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 %> |
<%= 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 %>