diff --git a/app/assets/javascripts/management.js.coffee b/app/assets/javascripts/management.js.coffee new file mode 100644 index 000000000..761567942 --- /dev/null +++ b/app/assets/javascripts/management.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/stylesheets/management.css.scss b/app/assets/stylesheets/management.css.scss new file mode 100644 index 000000000..6d4f81abc --- /dev/null +++ b/app/assets/stylesheets/management.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the management controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/management_controller.rb b/app/controllers/management_controller.rb new file mode 100644 index 000000000..877e4b823 --- /dev/null +++ b/app/controllers/management_controller.rb @@ -0,0 +1,26 @@ +class ManagementController < ApplicationController + before_filter :require_admin + layout 'base_management' + + def approve + + end + + def trial_authorization + + end + + def index + + 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 + format.js + end + end +end diff --git a/app/helpers/management_helper.rb b/app/helpers/management_helper.rb new file mode 100644 index 000000000..d07e930fe --- /dev/null +++ b/app/helpers/management_helper.rb @@ -0,0 +1,2 @@ +module ManagementHelper +end diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 34dd02306..09e8ddaac 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -33,7 +33,7 @@