diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 9bb0dc75c..c6298555e 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -939,6 +939,39 @@ class AdminController < ApplicationController
end
+ # 身份认证
+ def identity_authentication
+ type = params[:type] || 0 # 存在type 就用type 没有就为 0
+
+ user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{params[:name]}%'")
+ @unapproved_user = ApplyUserAuthentication.where(:status => type, :user_id => user_id).order("updated_at desc")
+
+
+ respond_to do |format|
+ format.html{ render :layout => 'base_edu' }
+ format.js
+ end
+ end
+
+ # 拒绝身份认证
+ def reject_authentication
+ apply_user = ApplyUserAuthentication.find(params[:apply_id])
+ reason = apply_user.update_attributes(:status => 2, :remarks => params[:reject_reason])
+ render :json => {success: reason}
+ end
+
+ # 统一身份认证
+ def agree_authentication
+ apply_user = ApplyUserAuthentication.find(params[:apply_id])
+ user = User.find(apply_user.user_id)
+ apply_user.update_attribute(:status, 1)
+ user.update_attribute(:authentication, true)
+ @unapproved_user = ApplyUserAuthentication.where(:status => 0).order("updated_at desc")
+ respond_to do |format|
+ format.js
+ end
+ end
+
def create_version
@versions = PhoneAppVersion.reorder('created_at desc')
@new_version = PhoneAppVersion.new
diff --git a/app/views/admin/_audit_authentication_list.html.erb b/app/views/admin/_audit_authentication_list.html.erb
new file mode 100644
index 000000000..4616aa88f
--- /dev/null
+++ b/app/views/admin/_audit_authentication_list.html.erb
@@ -0,0 +1,32 @@
+<% @unapproved_user.each_with_index do |apply_user, index| %>
+ <% user = User.find(apply_user.user_id) %>
+
+
+ <%= image_tag(url_to_avatar(@user), :class => "fl with10 edu-ad-user", :alt => "头像", :width => "50", :height => "50" ) %>
+
+
+
+
+ <%= user.show_name %>
+ <%= time_from_now(apply_user.updated_at) %>
+ <%= apply_user.status == 1 ? "已同意" : "已拒绝" %>
+
+
+ <% if !user.user_extensions.school_id.blank? && user.user_extensions.school %>
+ <%= user.user_extensions.school.name %>
+ <% end %>
+ <% if user.user_extensions && user.user_extensions.identity %>
+ <%= get_user_roll user %>
+ <% end %>
+
+
+ <%= image_tag(url_to_auth_img(user.id, 'PRO'), :width => 200, :height => 150, :class => 'edu-renzheng-img fl mr20') %>
+ <%= image_tag(url_to_auth_img(user.id, 'ID'), :width => 200, :height => 150, :class => 'edu-renzheng-img fl mr20') %>
+
+ <% if apply_user.status == 2 %>
+ 原因:<%= apply_user.remarks %>
+ <% end %>
+
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/admin/_authentication_list.html.erb b/app/views/admin/_authentication_list.html.erb
new file mode 100644
index 000000000..ad5f19f57
--- /dev/null
+++ b/app/views/admin/_authentication_list.html.erb
@@ -0,0 +1,40 @@
+<% @unapproved_user.each do |apply_user| %>
+ <% user = User.find(apply_user.user_id) %>
+
+
+ <%= image_tag(url_to_avatar(@user), :class => "fl with10 edu-ad-user", :alt => "头像", :width => "50", :height => "50" ) %>
+
+
+
+
+ <%= user.show_name %>
+ <%= time_from_now(apply_user.updated_at) %>
+ 拒绝
+ 同意
+
+
+ <% if !user.user_extensions.school_id.blank? && user.user_extensions.school %>
+ <%= user.user_extensions.school.name %>
+ <% end %>
+ <% if user.user_extensions && user.user_extensions.identity %>
+ <%= get_user_roll user %>
+ <% end %>
+
+
+ <%= image_tag(url_to_auth_img(user.id, 'PRO'), :width => 200, :height => 150, :class => 'edu-renzheng-img fl mr20') %>
+ <%= image_tag(url_to_auth_img(user.id, 'ID'), :width => 200, :height => 150, :class => 'edu-renzheng-img fl mr20') %>
+
+
+
+ 原因:
+
+
+
+ 确定
+ 取消
+
+
+
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/admin/agree_authentication.js.erb b/app/views/admin/agree_authentication.js.erb
new file mode 100644
index 000000000..53bfcb733
--- /dev/null
+++ b/app/views/admin/agree_authentication.js.erb
@@ -0,0 +1 @@
+$("#authentication_list").html("<%= j( render :partial => "admin/authentication_list" ) %>");
\ No newline at end of file
diff --git a/app/views/admin/identity_authentication.html.erb b/app/views/admin/identity_authentication.html.erb
new file mode 100644
index 000000000..7888e7e06
--- /dev/null
+++ b/app/views/admin/identity_authentication.html.erb
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+ <%= render :partial => "admin/authentication_list" %>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/admin/identity_authentication.js.erb b/app/views/admin/identity_authentication.js.erb
new file mode 100644
index 000000000..82b62fd42
--- /dev/null
+++ b/app/views/admin/identity_authentication.js.erb
@@ -0,0 +1,30 @@
+var nTabIcon_1 = $("#edu-tab-con-1");
+var nTabIcon_2 = $("#edu-tab-con-2");
+var nTabNav_1 = $("#edu-tab-nav-1");
+var nTabNav_2 = $("#edu-tab-nav-2");
+var nAudit = $("#audit_all_authentication").parent();
+
+<% if params[:type] == "0" %>
+ $("#authentication_list").html("<%= j( render :partial => "admin/authentication_list" ) %>");
+ nTabNav_1.addClass("edu-tab-hover");
+ nTabNav_2.removeClass("edu-tab-hover");
+ nTabIcon_1.show();
+ nTabIcon_2.hide();
+<% else %>
+ $("#audit_authentication_list").html("<%= j( render :partial => "admin/audit_authentication_list" ) %>");
+ nTabNav_1.removeClass("edu-tab-hover");
+ nTabNav_2.addClass("edu-tab-hover");
+ nTabIcon_1.hide();
+ nTabIcon_2.show();
+ /* -------------------------- 未审批(全部、同意、拒绝点击时动态样式) ------------------------------ */
+ if(<%= params[:type] == "1" %>){
+ nAudit.find(".active").removeClass("active");
+ $("#audit_agree_authentication").addClass("active");
+ }else if(<%= params[:type] == "2" %>){
+ nAudit.find(".active").removeClass("active");
+ $("#audit_reject_authentication").addClass("active");
+ }else{
+ nAudit.find(".active").removeClass("active");
+ $("#audit_all_authentication").addClass("active");
+ }
+<% end %>
\ No newline at end of file
diff --git a/app/views/layouts/base_edu.html.erb b/app/views/layouts/base_edu.html.erb
index 640354926..eb2b03765 100644
--- a/app/views/layouts/base_edu.html.erb
+++ b/app/views/layouts/base_edu.html.erb
@@ -9,7 +9,7 @@
<%= favicon %>
<%= javascript_heads %>
<%= heads_for_theme %>
- <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/edu-common', 'css/edu-public','css/taskstyle', 'css/font-awesome', 'css/edu-class', 'css/edu-popup', 'css/ketang' %>
+ <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/edu-common', 'css/edu-public','css/taskstyle', 'css/font-awesome', 'css/edu-class', 'css/edu-popup', 'css/ketang', "css/edu-admin" %>
<%= javascript_include_tag "edu/application",'edu/base_edu' %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 90a0d68ee..68da15c43 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -911,7 +911,7 @@ zh:
label_principal_search: "搜索用户或组:"
label_user_search: "搜索用户:"
label_mobile_version: "移动端版本管理"
-
+ label_identity_authentication: "身份认证"
button_create_and_continue: 创建并继续
diff --git a/config/routes.rb b/config/routes.rb
index 8b5a15169..cdb923e0c 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1443,6 +1443,9 @@ RedmineApp::Application.routes.draw do
get 'admin/code_work_tests'
post 'admin/select_course_syllabus'
post 'admin/create_syllabus'
+ get 'admin/identity_authentication'
+ get 'admin/reject_authentication'
+ get 'admin/agree_authentication'
resources :auth_sources do
member do
diff --git a/lib/redmine.rb b/lib/redmine.rb
index 90b06dec0..d08eb8628 100644
--- a/lib/redmine.rb
+++ b/lib/redmine.rb
@@ -385,6 +385,7 @@ Redmine::MenuManager.map :admin_menu do |menu|
menu.push :schools, {:controller => 'admin', :action => 'schools'}, :caption => :label_school_plural
menu.push :applied_schools, {:controller => 'admin', :action => 'applied_schools'}, :caption => :label_applied_shcools
menu.push :applied_departments, {:controller => 'admin', :action => 'applied_departments'}, :caption => :label_applied_departments
+ menu.push :identity_authentication, { :controller => 'admin', :action => 'identity_authentication' }, :caption => :label_identity_authentication
menu.push :first_page_made, {:controller => 'admin',:action => 'first_page_made'},:caption => :label_first_page_made
menu.push :mobile_version, {:controller => 'admin',:action => 'mobile_version'},:caption => :label_mobile_version
menu.push :groups, {:controller => 'groups'}, :caption => :label_group_plural
diff --git a/public/stylesheets/css/edu-admin.css b/public/stylesheets/css/edu-admin.css
new file mode 100644
index 000000000..84c62d8fe
--- /dev/null
+++ b/public/stylesheets/css/edu-admin.css
@@ -0,0 +1,94 @@
+/* 共用 后期再添加至公共样式 bylinda*/
+a:link,a:visited{text-decoration:none;color:#666; }
+a:hover {color:#5faee3;}
+a:hover.fa{color:#5faee3;}
+a.link-color-grey{color:#aaa!important;}
+a:hover.link-color-grey{color:#5faee3!important;}
+a.link-name-dark{ color:#333; max-width:140px; display: block; }
+a:hover.link-name-dark{ color:#5faee3;}
+.mb50{ margin-bottom: 50px;}
+.mr50{ margin-right: 50px;}
+.ml35{ margin-left:35px;}
+input,textarea,select{ border:1px solid #eee; background: #fff; color:#666;}
+.edu-name-dark{ max-width:100px; display: block; }
+.edu-info-dark{ max-width:345px; display: block; }
+.edu-color-grey{ color:#666;}
+.edu-color-grey:hover{color:#5faee3;}
+.edu-btn-search{ position: absolute; top:0; right:15px;}
+.edu-bg-light-blue{ background:#f7f9fd; padding:5px;}
+.edu-max-h200{ height:200px; overflow: auto;}
+.edu-position{ position: relative;}
+.edu-h200-auto{ max-height:200px; overflow:auto;}
+.edu-h300-auto{ max-height:300px; overflow:auto;}
+.edu-h350-auto{ max-height:350px; overflow:auto;}
+.edu-txt-w240{ width:240px; display: block;}
+.edu-txt-w280{ width:280px; display: block;}
+.edu-txt-w200{ width:200px; display: block;}
+a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;}
+a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;}
+.edu-txt-w50{ width:50px;}
+.edu-con-top{ padding:10px 0; background:#fff; border-bottom:1px solid #eee;font-size:16px; }
+.edu-con-top h2{ font-size:16px;}
+.edu-form-label{display: inline-block; width:60px;text-align: right; line-height: 40px; font-weight: normal;}
+.edu-form-border{ border:1px solid #ddd;}
+.edu-form-noborder,input.edu-form-noborder{ border:none; outline:none;}
+.edu-w245{ width: 245px; }
+a.edu-btn{display: inline-block;border:none; padding:0 12px;color: #666!important;border:1px solid #ccc; text-align:center;font-size: 14px; height: 29px;line-height: 29px; border-radius:3px; font-weight: bold;letter-spacing:1px;}
+a:hover.edu-btn{ border:1px solid #5faee3; color: #5faee3!important;}
+.edu-cir-grey{ display: inline-block; padding:0px 5px; color:#666; background:#eaeaea; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
+a.edu-filter-cir-grey{display: inline-block; padding:0px 15px; color:#666; border:1px solid #ddd; text-align: center; border-radius:3px; font-size:12px; height:25px; line-height:25px;}
+a:hover.edu-filter-cir-grey,a.edu-filter-cir-grey.active{ border:1px solid #3498db; color:#3498db; }
+.edu-filter-btn{display: inline-block; padding:0px 10px; color:#666; background:#eee; text-align: center; border-radius:3px; font-size:12px; height:25px; line-height:25px;}
+.edu-filter-btn-blue{background:#ebf6fe; color:#3498db;}
+.edu-filter-btn-orange{background:#ffeee8; color:#ff5055;}
+.edu-filter-btn-red{background:#fee4e5; color:#d72e36;}
+.edu-filter-btn-green{background:#e4f3ec; color:#6fbb9d;}
+.edu-filter-btn-yellow{background:#fdefde; color:#ef9324;}
+.edu-filter-btn-danger{background:#d72e36; color:#fff;}
+.edu-pop-table{ width: 100%; border:1px solid #eee; border-bottom:none; background:#fff; color:#888;}
+.edu-pop-table tr{ height:40px; line-height: 40px; }
+.edu-pop-table tr.edu-bg-grey{ background:#f5f5f5;}
+.edu-txt-center{ text-align: center;}
+.edu-pop-table tr th{ color:#333;border-bottom:1px solid #eee; }
+.edu-pop-table tr td{border-bottom:1px solid #eee;}
+.edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;}
+.edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;}
+.edu-line{ border-bottom:1px solid #eee;}
+table.table-th-grey th{ background:#f5f5f5;}
+table.table-pa5 th,table.table-pa5 td{ padding:0 5px;}
+.panel-comment_item .orig_cont-red{ border:solid 2px #cc0000; border-radius:10px; padding:4px;color:#999;margin-top:-1px; }
+
+.alert-red{ background-color: #f2dede;border-color: #eed3d7; color: #d14f4d; text-align: left!important;}
+.eud-pointer{ cursor:pointer;}
+.edu-bg-grey{ background:#f6f6f6; width:90%; min-width:700px; color:#666;}
+
+/* 与课程通用框架和tab 17/05/11 bylinda*/
+.edu-class-con{ width:50%; margin:0px auto; font-size:14px; padding:50px 0;}
+.edu-con-bg01{ width: 100%; background:#fff;}
+.edu-class-box{ width:100%;}
+.edu-class-container{ width: 1200px; margin:10px auto 20px;}
+.edu-class-top{ background:#fff; padding:20px;}
+.edu-class-top-info{ }
+.edu-class-top-img{ width:260px; height: 140px;}
+/* tab */
+.edu-tab{ width: 100%; background:#fff; }
+#edu-tab-nav{height:47px;background: #fff; }
+#edu-tab-nav li {float:left; width: 170px; text-align:center;height: 47px;line-height: 47px; position: relative; }
+.edu-tab-fa{ position: absolute; top:45px; left:85px; color: #fff;}
+#edu-tab-nav li a{font-size:14px; }
+.edu-tab-hover {border-bottom:3px solid #5faee3; background: #fff; }
+.edu-tab-hover .edu-tab-fa{ color: #5faee3;}
+.edu-tab-hover a{ color:#5faee3; font-weight:bold;}
+.undis {display:none;}
+.dis {display:block;}
+.edu-tab-con-box{ padding:15px; max-height:1200px; overflow: auto; color:#666; line-height: 2.0; background:#fff;}
+
+/* 审核 17/05/11 bylinda*/
+.admin-con-box { padding:15px;}
+a.edu-ad-user{ }
+.edu-ad-user img{width:80px; height: 80px; border-radius:100px;}
+.edu-renzheng-img{ width:200px;}
+.admin-bg-grey{ background:#fafbfb; }
+
+
+