课程成员提交“修改角色”

This commit is contained in:
huang 2015-12-04 16:33:56 +08:00
parent 7daaa59010
commit 9716e99533
3 changed files with 7 additions and 3 deletions

View File

@ -374,7 +374,7 @@ class CoursesController < ApplicationController
def settings
if User.current.allowed_to?(:as_teacher,@course)
@select_tab = params[:tab]
@issue_custom_fields = IssueCustomField.sorted.all
@issue_category ||= IssueCategory.new
@member ||= @course.members.new

View File

@ -1,6 +1,10 @@
<div class="project_r_h">
<h2 class="project_h2 fl"><%= @subPage_title%></h2>
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">修改角色</span>
<% if User.current.allowed_to?(:as_teacher,@course) %>
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
<%=link_to "修改角色", :controller => 'courses', :action => 'settings', :id => @course.id, :tab=>'member' %>
</span>
<% end %>
</div>
<% if @subPage_title == l(:label_student_list)%>
<%= render :partial => 'course_student', :locals => {:members => @members} %>

View File

@ -3,7 +3,7 @@
</div>
<script>
$(function(){
<% if @edit_user == 'Y'%>
<% if @select_tab == 'member'%>
$("#tb_2").click();
<% end %>
})