超级管理员页面
This commit is contained in:
parent
f99121a353
commit
ca20c827f6
|
|
@ -43,9 +43,10 @@ class ManagementsController < ApplicationController
|
|||
|
||||
# 实训适用课程
|
||||
def applicable_course
|
||||
@majorcourse=MajorCourse.where("0=0")
|
||||
@courselist = CourseList.find_by_sql("SELECT id, name as name FROM `course_lists` where id in (SELECT id FROM `major_courses`);")
|
||||
|
||||
end
|
||||
|
||||
# 单位部门列表
|
||||
def departments
|
||||
@menu_type = 6
|
||||
|
|
|
|||
|
|
@ -1,20 +1,29 @@
|
|||
module ManagementsHelper
|
||||
|
||||
def trial_authorization_status status
|
||||
case status
|
||||
when "0", nil
|
||||
0
|
||||
when "1"
|
||||
1
|
||||
when "2"
|
||||
2
|
||||
else
|
||||
[1,2]
|
||||
end
|
||||
end
|
||||
|
||||
def query_user_status_num status
|
||||
user = (status == 0) ? user = User.all : User.where(:status => status)
|
||||
return user.count
|
||||
end
|
||||
end
|
||||
module ManagementsHelper
|
||||
|
||||
def trial_authorization_status status
|
||||
case status
|
||||
when "0", nil
|
||||
0
|
||||
when "1"
|
||||
1
|
||||
when "2"
|
||||
2
|
||||
else
|
||||
[1,2]
|
||||
end
|
||||
end
|
||||
|
||||
def query_user_status_num status
|
||||
user = (status == 0) ? user = User.all : User.where(:status => status)
|
||||
return user.count
|
||||
end
|
||||
|
||||
def course_list_major_time id
|
||||
Major.where(:id => id).first.try(:name)
|
||||
end
|
||||
|
||||
# params[:id]: course_list_id
|
||||
def get_course_list_major id
|
||||
ShixunMajorCourse.where(:course_list_id => id)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
class ShixunMajorCourse < ActiveRecord::Base
|
||||
belongs_to :shixun
|
||||
belongs_to :major
|
||||
belongs_to :course_list
|
||||
#attr_accessible :course_list
|
||||
end
|
||||
class ShixunMajorCourse < ActiveRecord::Base
|
||||
belongs_to :shixun
|
||||
belongs_to :major
|
||||
belongs_to :course_list
|
||||
#attr_accessible :course_list
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,13 +9,26 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @majorcourse.each_with_index do |majorcourse,index|%>
|
||||
<tr>
|
||||
<td><%= majorcourse.course_list_id%></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% @courselist.each_with_index do |courselist,index|%>
|
||||
<tr>
|
||||
<td><%= index + 1 %></td>
|
||||
<td class="edu-txt-left">
|
||||
<%= courselist.name %>
|
||||
</td>
|
||||
<td class="edu-txt-left">
|
||||
<% get_course_list_major(courselist.id).each do |smc| %>
|
||||
<%= course_list_major_time(smc.major_id) %>
|
||||
<%= format_time smc.created_at %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%# get_course_list_major(courselist.id).each do |smc| %>
|
||||
<%#= course_list_major_time(smc.major_id) %>
|
||||
<%#= format_time smc.created_at %>
|
||||
<%# end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
<td> <%= link_to course.teacher.show_name, user_path(course.teacher) %></td>
|
||||
<td> <%= format_time(course.updatetime) %></td>
|
||||
<td class="operate"><span class="fr shixun_webssh">
|
||||
<input type="checkbox" value="0" class="ml-3 mr5 magic-checkbox" id="join_course_role_24">
|
||||
<label style="top:-14px;padding-left: 35px;" for="join_course_role_24"></label></span>
|
||||
<input type="checkbox" value="0" class="ml-3 mr5 magic-checkbox" id="join_course_role_<%= course.id %>">
|
||||
<label style="top:-14px;padding-left: 35px;" for="join_course_role_<%= course.id %>"></label></span>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
<td><%= link_to syllabus.user.show_name, user_path(syllabus.user) %></td>
|
||||
<td><%= format_time syllabus.created_at %></td>
|
||||
<td class="operate"><span class="fr shixun_webssh">
|
||||
<input type="checkbox" value="0" class="ml-3 mr5 magic-checkbox" id="join_course_role_24">
|
||||
<label style="top:-14px;padding-left: 45px;" for="join_course_role_24"></label>
|
||||
<input type="checkbox" value="0" class="ml-3 mr5 magic-checkbox" id="join_course_role_<%= index + 1 %>">
|
||||
<label style="top:-14px;padding-left: 45px;" for="join_course_role_<%= index + 1 %>"></label>
|
||||
</span></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
<option value="cla_name">课程名称搜索</option>
|
||||
</select>
|
||||
<span class="fr shixun_webssh">
|
||||
<input type="checkbox"class="mr5 magic-checkbox" id="join_course_role_1">
|
||||
<label style="top:-30px;padding-left:23px;" for="join_course_role_1"><span class="only_view">只看模板</span></label>
|
||||
<input type="checkbox"class="mr5 magic-checkbox" id="join_course_role_0">
|
||||
<label style="top:-30px;padding-left:23px;" for="join_course_role_0"><span class="only_view">只看模板</span></label>
|
||||
</span>
|
||||
<input class="fl task-form-20 task-height-30 mt20" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;" id="Look_name">
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5 mt20" onclick="$('#classroom').submit();">搜索</a>
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5" onclick="$('#class_publish_shixuns_search').submit();">搜索</a>
|
||||
<a href="javascript:clearSearchCondition();" class="fl task-btn ml5 mt2 " id="clear_contents">清除</a>
|
||||
<span class="fr shixun_webssh">
|
||||
<input type="checkbox"class="mr5 magic-checkbox" id="join_course_role_1">
|
||||
<label style="top:2px;padding-left:23px;" for="join_course_role_1"><span class="only_view">只看首页显示</span></label>
|
||||
<input type="checkbox"class="mr5 magic-checkbox" id="join_course_role_0">
|
||||
<label style="top:2px;padding-left:23px;" for="join_course_role_0"><span class="only_view">只看首页显示</span></label>
|
||||
</span>
|
||||
</div>
|
||||
<% end%>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<div class="edu-class-container mb15">
|
||||
<!--<div class="edu-con-top clearfix">-->
|
||||
<!--<!–<p class="ml15 fl color-grey"><span><a href="">身份认证</a></span><span style="margin: 0 40px">|</span><span><a href="">职业认证</a></span></p>–>-->
|
||||
<!--<ul id="edu-tab-nav-auth">-->
|
||||
<!--<li class="edu-new-tab-hover new-tab-nav">-->
|
||||
<!--<%#= link_to "身份认证", {:controller => "managements", :action => "", :type => 0}, :class => "tab_type", :remote => true %>-->
|
||||
<!--</li>-->
|
||||
<!--<!–<li class="new-tab-nav">–>-->
|
||||
<!--<!–<%#= link_to "职业认证", {:controller => "managements", :action => "", :type => 0}, :class => "tab_type", :remote => true %>–>-->
|
||||
<!--<!–</li>–>-->
|
||||
<!--</ul>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<div class="edu-con-top clearfix">
|
||||
<!--<p class="ml15 fl color-grey"><span><a href="">身份认证</a></span><span style="margin: 0 40px">|</span><span><a href="">职业认证</a></span></p>-->
|
||||
<ul id="edu-tab-nav-auth">
|
||||
<li class="edu-new-tab-hover new-tab-nav">
|
||||
<%= link_to "身份认证", {:controller => "managements", :action => "", :type => 0}, :class => "tab_type", :remote => true %>
|
||||
</li>
|
||||
<li class="new-tab-nav">
|
||||
<%= link_to "职业认证", {:controller => "managements", :action => "", :type => 0}, :class => "tab_type", :remote => true %>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
|
||||
<!--</div>-->
|
||||
</div>
|
||||
<div>
|
||||
<!--身份认证-->
|
||||
<div class="edu-con-bg01 mt15 authentization">
|
||||
|
|
|
|||
|
|
@ -15,13 +15,13 @@ function showPreview(source) {
|
|||
<%#= text_field_tag 'school'%>
|
||||
<div>
|
||||
<input type="hidden" value="<%= @school_name%>" name="school_name" class="w150">
|
||||
<%= image_tag(@school.logo_link, id: "avatar_image", :class=>"school_avatar")%>
|
||||
<a type="button" onclick="$('#file').click();" style="margin: 86px 0 0 15px;float: left;padding: 2px 5px;border: 1px solid #eaeaea;cursor: pointer;text-decoration: none;width: 70px;">上传图片</a>
|
||||
<%= image_tag(@school.logo_link, id: "avatar_image", :class=>"school_avatar ml25")%>
|
||||
<a type="button" onclick="$('#file').click();" style="margin: 86px 0 0 0px;float: left;padding: 2px 5px;border: 1px solid #eaeaea;cursor: pointer;text-decoration: none;width: 70px;" class="task-btn task-btn-blue ">上传图片</a>
|
||||
<%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
|
||||
<div style="clear: both;"></div>
|
||||
<div class="mt15">学校名称:<input type="text" name="name" placeholder="现在对应的学校名称" value="<%= @school.name%>" class="schoolName ml10"/></div>
|
||||
<div class="mt10">学校省份:
|
||||
<select class="provinceSelect ml10 with10" name="province">
|
||||
<select class="provinceSelect ml10" name="province">
|
||||
<option value="" class="">--请选择省份--</option>
|
||||
<option value="北京市" <%= @school.province == '北京市' ? 'selected':'' %>>北京</option>
|
||||
<option value="上海市" <%= @school.province == '上海市' ? 'selected':'' %>>上海</option>
|
||||
|
|
@ -43,7 +43,7 @@ function showPreview(source) {
|
|||
<option value="江西省" <%= @school.province == '江西省' ? 'selected':'' %>>江西</option>
|
||||
<option value="吉林省" <%= @school.province == '吉林省' ? 'selected':'' %>>吉林</option>
|
||||
<option value="辽宁省" <%= @school.province == '辽宁省' ? 'selected':'' %>>辽宁</option>
|
||||
<option value=" 内蒙古自治区" <%= @school.province == ' 内蒙古自治区' ? 'selected':'' %>>内蒙古</option>
|
||||
<option value="内蒙古自治区" <%= @school.province == ' 内蒙古自治区' ? 'selected':'' %>>内蒙古</option>
|
||||
<option value="宁夏回族自治区" <%= @school.province == '宁夏回族自治区' ? 'selected':'' %>>宁夏</option>
|
||||
<option value="青海省" <%= @school.province == '青海省' ? 'selected':'' %>>青海</option>
|
||||
<option value="山东省" <%= @school.province == '山东省' ? 'selected':'' %>>山东</option>
|
||||
|
|
|
|||
Loading…
Reference in New Issue