<div class="content-title-top">
<% if @memberships.empty? %>
		<% if @user != User.current %>
		<p class="font_description">
			<%= l(:label_project_course_un) %>
		</p>
		<% else %>
			<p class="font_description">			
			<!--teacher could create the course directly-->
			<%= l(:label_project_course_unadd) %><%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1, :project_type => 1}, :class => 'icon icon-add' %>									
			</p>
		<% end %>
<% else %>
	<p>
	<span><%=l(:label_course_doing)%>(<%=@memberships_doing.count%>)</span>
	<%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1, :project_type => 1}, :class => 'icon icon-add'  if @user == User.current %>
	</p>
	<div>
		<%= render :partial => 'course_form', :locals => {:memberships => @memberships_doing}%>
	</div>

	<div style="clear:both;"></div>

	<p>
	<%= link_to l(:label_course_done)+"("+@memberships_done.count.to_s+")", 'javascript:void(0);', :onclick => '$("#courses_history_block").slideToggle(400);' , style:"color:#666666" if User.current.logged? %>
	</p>

	<div id="courses_history_block" class="courses_history hidden" >
		<%= render :partial => 'course_form', :locals => {:memberships => @memberships_done}%>
	</div>

<% end %>	
</div>
