socialforge/app/views/users/user_courses.html.erb

21 lines
496 B
Plaintext
Raw Normal View History

2013-09-12 17:19:51 +08:00
<!-- added by fq -->
2013-10-07 22:23:42 +08:00
2013-09-12 17:19:51 +08:00
<%= user_course @state%>
2013-09-23 08:44:48 +08:00
<% if @state == 0 %>
2013-10-07 22:23:42 +08:00
<% if @user.user_extensions.identity == 0 %>
2013-09-12 17:19:51 +08:00
<%= render :partial => 'my_course' %>
2013-10-07 22:23:42 +08:00
<% else %>
<%= render :partial => 'my_joinedcourse' %>
<% end %>
2013-09-23 08:44:48 +08:00
<% elsif @state == 1 %>
2013-10-07 22:23:42 +08:00
<% if @user.user_extensions.identity == 0 %>
<%= render :partial => 'my_create_homework' %>
<% else %>
2013-09-12 17:19:51 +08:00
<%= render :partial => 'my_homework' %>
2013-10-07 22:23:42 +08:00
<% end %>
2013-09-23 08:44:48 +08:00
<% else @state == 2 %>
2013-10-07 22:23:42 +08:00
<%= render :partial => 'my_joinedcourse' %>
2013-09-12 17:19:51 +08:00
<% end %>