增加课程配置界面、成员的基本信息以及相关js
This commit is contained in:
parent
e7da022564
commit
046536230c
|
@ -2,59 +2,120 @@
|
|||
<h2 class="project_h2"><%= l(:label_course_modify_settings)%></h2>
|
||||
</div>
|
||||
<div class="hwork_new">
|
||||
<ul>
|
||||
<%= labelled_form_for @course do |f| %>
|
||||
<li class="ml45 mb10">
|
||||
<%= render :partial => "avatar/new_avatar_form", :locals => {source: @course} %>
|
||||
<div id="tb_" class="hwork_tb_">
|
||||
<ul>
|
||||
<li id="tb_1" class="hwork_hovertab" onclick="course_setting(1);" >
|
||||
基本信息
|
||||
</li>
|
||||
<li id="tb_2" class="hwork_normaltab" onclick="course_setting(2);">
|
||||
成员
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="hwork_dis" id="tbc_01" style="padding-top: 10px;">
|
||||
<ul>
|
||||
<%= labelled_form_for @course do |f| %>
|
||||
<li class="ml45 mb10">
|
||||
<%= render :partial => "avatar/new_avatar_form", :locals => {source: @course} %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
||||
<input type="text" name="course[name]" id="course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name();" value="<%= @course.name%>">
|
||||
<span class="c_red" id="course_name_notice" style="display: none;">课程名称不能为空</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
||||
<input type="text" name="class_period" id="class_period" class="hwork_input02" onkeyup="regex_course_class_period();" maxlength="6" value="<%= @course.class_period%>">
|
||||
<span class="c_red" id="course_class_period_notice" style="display: none;"></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_course_term)%> :</label>
|
||||
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {} %>
|
||||
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{} %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_new_course_password)%> :</label>
|
||||
<input type="text" name="course[password]" id="course_course_password" class="hwork_input02" value="<%= @course.password%>">
|
||||
<div class="cl"></div>
|
||||
<span class=" ml80 c_orange">学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。</span>
|
||||
</li>
|
||||
<li class="ml45">
|
||||
<label class="fl" > <%= l(:label_new_course_description)%> :</label>
|
||||
<textarea name="course[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl" maxlength="6000"><%= @course.description%></textarea>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" mb5 ml80">
|
||||
<label >公开 :</label>
|
||||
<input <%= @course.is_public == 1 ? 'checked' : ''%> id="course_is_public" name="course[is_public]" type="checkbox">
|
||||
<span class="c_grey">(打钩为公开,不打钩则不公开,若不公开,仅课程成员可见该课程。)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" mb5 ml30">
|
||||
<label >学生列表公开 :</label>
|
||||
<input <%= @course.open_student == 1 ? 'checked' : ''%> id="course_open_student" name="course[open_student]" type="checkbox" style="margin-left: 1px;"/>
|
||||
<span class="c_grey">(打钩为"学生列表公开",不打钩为不公开,若不公开,则课程外部人员看不到学生列表)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" ml90" >
|
||||
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_edit_course(<%= @course.id%>);" >提交</a>
|
||||
<%= link_to l(:button_cancel), course_path(@course), :class => "blue_btn grey_btn fl c_white" %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="hwork_undis" id="tbc_02">
|
||||
<div class="members_left">
|
||||
<ul style=" border-bottom:none;">
|
||||
<li><span class="w150 f_b" >用户</span><span class="w150 f_b">角色</span><span></span></li>
|
||||
<li ><a href="#" class="w150 c_orange fl">gugu01</a><span class="w150 fl">发布人员</span><a href="#" class="c_dblue w90 fl">删除</a></li>
|
||||
<li ><a href="#" class="w150 c_orange fl">gugu01</a><span class="w150 fl">发布人员</span><a href="#" class="c_dblue w90 fl">删除</a></li>
|
||||
<li ><a href="#" class="w150 c_orange fl">gugu01</a><span class="w150 fl">发布人员</span><a href="#" class="c_dblue w90 fl">删除</a></li>
|
||||
<li ><a href="#" class="w150 c_orange fl">gugu01</a><span class="w150 fl">发布人员</span><a href="#" class="c_dblue w90 fl">删除</a></li>
|
||||
<li ><a href="#" class="w150 c_orange fl">gugu01</a><span class="w150 fl">发布人员</span><a href="#" class="c_dblue w90 fl">删除</a></li>
|
||||
</ul>
|
||||
</div><!-- 左边-->
|
||||
<div class="members_right">
|
||||
<p class="c_blue fb mt10 mb5">添加成员</p>
|
||||
<div class="member_search">
|
||||
<input class="member_search_input fl" type="text" name="" value="输入用户名称搜索好友"><a class="invi_search_btn fl c_white" >搜索</a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
||||
<input type="text" name="course[name]" id="course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name();" value="<%= @course.name%>">
|
||||
<span class="c_red" id="course_name_notice" style="display: none;">课程名称不能为空</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
||||
<input type="text" name="class_period" id="class_period" class="hwork_input02" onkeyup="regex_course_class_period();" maxlength="6" value="<%= @course.class_period%>">
|
||||
<span class="c_red" id="course_class_period_notice" style="display: none;"></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_course_term)%> :</label>
|
||||
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {} %>
|
||||
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{} %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_new_course_password)%> :</label>
|
||||
<input type="text" name="course[password]" id="course_course_password" class="hwork_input02" value="<%= @course.password%>">
|
||||
<ul class="mb5">
|
||||
<li><input type="checkbox" name="" checked=""> <label >suntao</label> </li>
|
||||
<li><input type="checkbox" name="" > <label >suntaoalibb</label> </li>
|
||||
<li><input type="checkbox" name="" > <label >用户名称</label> </li>
|
||||
<li><input type="checkbox" name="" > <label >suntao</label> </li>
|
||||
<li><input type="checkbox" name="" checked=""> <label >suntao</label> </li>
|
||||
<li><input type="checkbox" name="" > <label >suntaoalibb</label> </li>
|
||||
<li><input type="checkbox" name="" > <label >用户名称</label> </li>
|
||||
<li><input type="checkbox" name="" > <label >suntao</label> </li>
|
||||
<li><input type="checkbox" name="" > <label >用户名称</label> </li>
|
||||
<li><input type="checkbox" name="" > <label >suntao</label> </li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<span class=" ml80 c_orange">学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。</span>
|
||||
</li>
|
||||
<li class="ml45">
|
||||
<label class="fl" > <%= l(:label_new_course_description)%> :</label>
|
||||
<textarea name="course[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl" maxlength="6000"><%= @course.description%></textarea>
|
||||
<ul class="wlist mr40" >
|
||||
<li><a href="#">下一页</a></li>
|
||||
<li><a href="#">...</a></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li class="wlist_select" ><a href="#">1</a></li>
|
||||
<li><a href="#">上一页</a></li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" mb5 ml80">
|
||||
<label >公开 :</label>
|
||||
<input <%= @course.is_public == 1 ? 'checked' : ''%> id="course_is_public" name="course[is_public]" type="checkbox">
|
||||
<span class="c_grey">(打钩为公开,不打钩则不公开,若不公开,仅课程成员可见该课程。)</span>
|
||||
<ul class="rolebox mb10 mt10">
|
||||
<li class="fb">角色: </li>
|
||||
<li ><input class="fl" type="checkbox" name="" checked=""> <label >Manager</label> </li>
|
||||
<li ><input type="checkbox" name="" > <label >Developer</label> </li>
|
||||
<li ><input type="checkbox" name="" > <label >Reporter</label> </li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" mb5 ml30">
|
||||
<label >学生列表公开 :</label>
|
||||
<input <%= @course.open_student == 1 ? 'checked' : ''%> id="course_open_student" name="course[open_student]" type="checkbox" style="margin-left: 1px;"/>
|
||||
<span class="c_grey">(打钩为"学生列表公开",不打钩为不公开,若不公开,则课程外部人员看不到学生列表)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class=" ml90" >
|
||||
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_edit_course(<%= @course.id%>);" >提交</a>
|
||||
<%= link_to l(:button_cancel), course_path(@course), :class => "blue_btn grey_btn fl c_white" %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<a href="#" class="member_btn">新增成员</a>
|
||||
</div>
|
||||
</div><!-- 右边 end-->
|
||||
</div><!---成员结束-->
|
||||
</div><!--talknew end-->
|
||||
<div class="cl"></div>
|
|
@ -1,3 +1,13 @@
|
|||
//配置课程信息
|
||||
function course_setting(id)
|
||||
{
|
||||
//alert(id);
|
||||
$('#tb_'+id).removeClass().addClass("hwork_hovertab");
|
||||
$('#tbc_0'+id).removeClass().addClass("dis");
|
||||
$('#tb_'+(3-id)).removeClass().addClass("hwork_normaltab");
|
||||
$('#tbc_0'+(3-id)).removeClass().addClass("undis");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
//添加分班
|
||||
function add_group(url,course_id) {
|
||||
|
|
Loading…
Reference in New Issue