course_form

This commit is contained in:
yanxd 2014-05-20 14:52:30 +08:00
parent d47facc9e8
commit 7189d9a14a
1 changed files with 58 additions and 55 deletions

View File

@ -10,7 +10,6 @@
<tr>
<td colspan="2" valign="top">
<span><%= link_to_project(membership.project) %></span>
<!--added by huang for: filter by roles-->
<span style="float: right">
<%= render :partial => 'courses/set_course_time', :locals => {:project => membership.project} %>
<% if User.current == @user %>
@ -21,11 +20,13 @@
<% end %>
<% else %>
<% end %>
<!--end-->
<%= l(:label_x_base_courses_member, :count => membership.project.members.count) %>(<%= link_to "#{membership.project.members.count}", project_member_path(membership.project), :course =>'1' %>)&nbsp;&nbsp;
<%= l(:label_homework) %> (<span class=""><%= link_to (membership.project.homeworks.count), {:controller => 'projects', :action => 'homework', :id => membership.project.identifier} %></span>)
<%= l(:label_x_base_courses_member, :count => membership.project.members.count) %>
(<%= "#{membership.project.members.count}" %>)&nbsp;&nbsp;
<%= l(:label_homework) %>
(<span class=""><%= link_to (membership.project.homeworks.count), {:controller => 'projects', :action => 'homework', :id => membership.project.identifier} %></span>)
&nbsp;&nbsp;
<%= 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_course_news) %>
(<span style="color: #ed8924"><%= link_to (membership.project.news.count), {:controller => 'news', :action => 'index', :project_id => membership.project.identifier} %></span>)
</span></td>
</tr>
<tr>
@ -34,23 +35,25 @@
<%= membership.project.description %>
</p></td>
</tr>
<tr><td>
<tr>
<td>
<!-- added by bai -->
<% @course = Course.find_by_extra(membership.project.identifier) %>
<% unless (@course.nil? || @course.teacher.nil? || @course.teacher.name.nil?) %>
<span class="font-lighter" style="float: left"><%= l(:label_main_teacher) %> : <%= link_to(@course.teacher.name, user_path(@course.teacher)) %></span>
<span style="float: right; padding-left: 8px" ><%= l(:label_course_term) %> : <%= @course.time %><%= @course.term %></span>
<!-- <span class="font_lighter" style="float: right"><%= l(:label_create_time) %> <%= format_time(membership.created_on) %></span> -->
<span class="font-lighter" style="float: left"><%= l(:label_main_teacher) %>
: <%= link_to(@course.teacher.name, user_path(@course.teacher)) %></span>
<span style="float: right; padding-left: 8px"><%= l(:label_course_term) %>
: <%= @course.time %><%= @course.term %></span>
<% end %>
</td></tr>
</table></td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</li>
<% end %>
</ul>
</div>
<%= call_hook :view_account_left_bottom, :user => @user %>