Merge branch 'various_bugs' into nccu_master
Conflicts: Gemfile.lock app/assets/javascripts/ajax_form.js.erb app/assets/stylesheets/style.css.erb app/controllers/application_controller.rb app/controllers/sessions_controller.rb app/helpers/admin/web_link_helper.rb app/views/admin/attributes/_attribute_field.html.erb app/views/admin/designs/_form.html.erb app/views/admin/pages/_form.html.erb app/views/admin/sites/_side_bar.html.erb app/views/layouts/_orbit_bar.html.erb app/views/layouts/_side_bar.html.erb config/locales/en.yml config/locales/zh_tw.yml config/mongoid.yml vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/index.html.erb vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb
This commit is contained in:
commit
65ac6980c4
2087 files changed
+80434
-3692
No files matched your search
@@ -1,8 +1,10 @@
|
||||
class Admin::AdBannersController < OrbitBackendController
|
||||
layout "new_admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :force_order_for_visitor,:only=>[:index]
|
||||
#before_filter :force_order_for_user,:except => [:index]
|
||||
before_filter :for_app_sub_manager,:except => [:index]
|
||||
before_filter :for_app_manager,:except => [:index,:show,:update,:realtime_preview]
|
||||
before_filter :for_app_sub_manager
|
||||
|
||||
|
||||
def rename
|
||||
@ad_banner = AdBanner.find(params[:id])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Admin::DashboardsController < ApplicationController
|
||||
|
||||
class Admin::DashboardsController < OrbitBackendController
|
||||
layout "new_admin"
|
||||
before_filter :authenticate_user!
|
||||
#before_filter :set_current_user
|
||||
#before_filter :authenticate_user!, :except => [:index]
|
||||
# before_filter :is_admin?
|
||||
|
||||
def index
|
||||
|
||||
@@ -34,14 +34,37 @@ class Admin::DesignsController < OrbitBackendController
|
||||
|
||||
def update
|
||||
@design = Design.find(params[:id])
|
||||
if @design.update_attributes(params[:design])
|
||||
flash[:notice] = "Successfully updated design and tasks."
|
||||
redirect_to admin_designs_url(@design)
|
||||
else
|
||||
render :action => 'edit'
|
||||
@design.update_attributes(params[:design])
|
||||
# if @design.update_attributes(params[:design])
|
||||
# flash[:notice] = "Successfully updated design and tasks."
|
||||
# redirect_to admin_designs_url(@design)
|
||||
# else
|
||||
# render :action => 'edit'
|
||||
# end
|
||||
|
||||
respond_to do |format|
|
||||
format.js {nil}
|
||||
end
|
||||
end
|
||||
|
||||
def update_file
|
||||
@design = Design.find(params[:id])
|
||||
case params[:type]
|
||||
when 'layout', 'css_default', 'css_reset'
|
||||
@object = @design.send(params[:type])
|
||||
when 'image', 'javascript', 'theme'
|
||||
@object = @design.send(params[:type]).find(params[:object_id])
|
||||
end
|
||||
|
||||
Dir.mktmpdir('f_path') { |dir|
|
||||
temp_file = File.new(dir + '/' + File.basename(@object.file.url), 'w+')
|
||||
temp_file.write(params[:file][:content].force_encoding('UTF-8'))
|
||||
@object.remove_file!
|
||||
@object.file = temp_file
|
||||
@object.save
|
||||
}
|
||||
end
|
||||
|
||||
def edit_file
|
||||
@design = Design.find(params[:id])
|
||||
filename = params[:filename]
|
||||
@@ -91,6 +114,13 @@ class Admin::DesignsController < OrbitBackendController
|
||||
end
|
||||
redirect_to admin_designs_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
|
||||
end
|
||||
|
||||
def upload_image
|
||||
@design = Design.find(params[:id])
|
||||
@image = @design.images.build(params[:image])
|
||||
@image.save
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
@@ -98,7 +128,6 @@ class Admin::DesignsController < OrbitBackendController
|
||||
Zip::ZipFile.open(file) { |zip_file|
|
||||
design = Design.new.from_json(zip_file.read("#{zip_name}/info.json"))
|
||||
Dir.mktmpdir('f_path') { |dir|
|
||||
design.build_layout
|
||||
themes_entries = []
|
||||
javascripts_entries = []
|
||||
images_entries = []
|
||||
@@ -106,25 +135,11 @@ class Admin::DesignsController < OrbitBackendController
|
||||
zip_file.entries.each do |entry|
|
||||
case (path = entry.to_s)
|
||||
when /\A(#{zip_name})\/(default\.css)\z/ #for default css
|
||||
filename = File.basename(entry.to_s)
|
||||
temp_file = File.new(dir + '/' + filename, 'w+')
|
||||
temp_file.write (zip_file.read entry ).force_encoding('UTF-8')
|
||||
default_css = design.build_default_css
|
||||
default_css.file = temp_file
|
||||
default_css.to_save = true
|
||||
design.build_css_default(:file => get_temp_file(zip_file, dir, entry))
|
||||
when /\A(#{zip_name})\/(reset\.css)\z/ #for reset css
|
||||
filename = File.basename(entry.to_s)
|
||||
temp_file = File.new(dir + '/' + filename, 'w+')
|
||||
temp_file.write (zip_file.read entry ).force_encoding('UTF-8')
|
||||
reset_css = design.build_reset_css
|
||||
reset_css.file = temp_file
|
||||
reset_css.to_save = true
|
||||
design.build_css_reset(:file => get_temp_file(zip_file, dir, entry))
|
||||
when /\A(#{zip_name})\/(layout\.html)\z/ #for layout html
|
||||
filename = File.basename(entry.to_s)
|
||||
temp_file = File.new(dir + '/' + filename, 'w+')
|
||||
temp_file.write (zip_file.read entry ).force_encoding('UTF-8')
|
||||
design.layout.file = temp_file
|
||||
design.layout.to_save=true
|
||||
design.build_layout(:file => get_temp_file(zip_file, dir, entry))
|
||||
when /\A(#{zip_name})\/(themes)\/.*(\.css)\z/ #for themes css
|
||||
themes_entries << entry
|
||||
when /\A(#{zip_name})\/(javascripts)\/.*(\.js)\z/ #for js
|
||||
@@ -136,12 +151,7 @@ class Admin::DesignsController < OrbitBackendController
|
||||
|
||||
['themes', 'javascripts', 'images'].each do |type|
|
||||
eval("#{type}_entries").each do |entry|
|
||||
filename = File.basename entry.to_s
|
||||
temp_file = File.new(dir + '/' + filename, 'w+')
|
||||
temp_file.write (zip_file.read entry).force_encoding('UTF-8')
|
||||
build_and_store = eval("design.#{type}").build
|
||||
build_and_store.file = temp_file
|
||||
build_and_store.to_save = true
|
||||
eval("design.#{type}").build(:file => get_temp_file(zip_file, dir, entry))
|
||||
end
|
||||
end
|
||||
}
|
||||
@@ -149,4 +159,11 @@ class Admin::DesignsController < OrbitBackendController
|
||||
}
|
||||
end
|
||||
|
||||
def get_temp_file(zip_file, dir, entry)
|
||||
filename = File.basename(entry.to_s)
|
||||
temp_file = File.new(dir + '/' + filename, 'w+')
|
||||
temp_file.write (zip_file.read entry ).force_encoding('UTF-8')
|
||||
temp_file
|
||||
end
|
||||
|
||||
end
|
||||
@@ -32,6 +32,7 @@ class Admin::InfosController < ApplicationController
|
||||
|
||||
def update
|
||||
@attribute = Info.find(params[:id])
|
||||
# binding.pry
|
||||
@attribute.update_attributes(params[:info])
|
||||
respond_to do |format|
|
||||
format.html { redirect_to :action => :index }
|
||||
|
||||
@@ -12,6 +12,11 @@ class Admin::ModuleAppsController < ApplicationController
|
||||
def reload_frontend_pages
|
||||
@categories =[]
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
|
||||
@frontend_path = @module_app.widgets.keys[0] if ( !@module_app.widgets.blank? && @module_app.widgets[0].blank? )
|
||||
|
||||
@frontend_style = @module_app.widgets[@frontend_path] if ( !@frontend_path.blank? )
|
||||
|
||||
case @module_app.key
|
||||
when 'announcement'
|
||||
@categories = BulletinCategory.all
|
||||
@@ -22,6 +27,9 @@ class Admin::ModuleAppsController < ApplicationController
|
||||
when 'web_resource'
|
||||
@categories = WebLinkCategory.all
|
||||
@tags = WebResourceTag.all
|
||||
when 'archive'
|
||||
@categories = ArchiveFileCategory.all
|
||||
@tags = ArchiveTag.all
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js {}
|
||||
|
||||
@@ -6,7 +6,7 @@ class Admin::ModuleAppsNewInterfaceController < OrbitBackendController
|
||||
layout "new_admin"
|
||||
|
||||
def setting
|
||||
@sys_users = User.all(conditions: {admin: false}).includes(:avatar)
|
||||
@sys_users = User.all(conditions: {admin: false}).includes(:avatar)
|
||||
@module_app = ModuleApp.find(params[:module_app_id])
|
||||
@options_from_collection_for_select_bulletin_categorys = [@module_app].collect{|ma| [ma.title,ma.id] }
|
||||
# if params.has_key? :category
|
||||
|
||||
@@ -4,6 +4,7 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
|
||||
|
||||
|
||||
def setting
|
||||
|
||||
@sys_users = User.all(conditions: {admin: false}).includes(:avatar)
|
||||
@ob_auth = ObjectAuth.find params[:object_auth_id]
|
||||
@options_from_collection_for_select_ob_auth = @ob_auth.siblings.collect{|oa| [oa.auth_obj.pp_object,oa.id] }
|
||||
|
||||
@@ -26,6 +26,13 @@ class Admin::PagePartsController < ApplicationController
|
||||
@module_app = @part.module_app ? @part.module_app : @module_apps[0]
|
||||
@r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag
|
||||
@tag_objects = @r_tag.classify.constantize.all rescue nil
|
||||
|
||||
@widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0]
|
||||
|
||||
if @module_app.widgets.any?{|b| b.class == Array}
|
||||
@widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank?
|
||||
end
|
||||
|
||||
case @module_app.key
|
||||
when 'announcement'
|
||||
@categories = BulletinCategory.all
|
||||
@@ -36,6 +43,9 @@ class Admin::PagePartsController < ApplicationController
|
||||
when 'web_resource'
|
||||
@categories = WebLinkCategory.all
|
||||
@tags = WebResourceTag.all
|
||||
when 'archive'
|
||||
@categories = ArchiveFileCategory.all
|
||||
@tags = ArchiveTag.all
|
||||
end
|
||||
end
|
||||
|
||||
@@ -45,6 +55,10 @@ class Admin::PagePartsController < ApplicationController
|
||||
|
||||
def update
|
||||
@part = PagePart.find(params[:id])
|
||||
|
||||
params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field]
|
||||
params[:page_part][:widget_field_type] = nil
|
||||
|
||||
if @part.update_attributes(params[:page_part])
|
||||
set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu')
|
||||
flash.now[:notice] = t('update.success.content')
|
||||
@@ -76,7 +90,11 @@ class Admin::PagePartsController < ApplicationController
|
||||
def reload_widgets
|
||||
@categories =[]
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
|
||||
|
||||
@widget_path = @module_app.widgets.keys[0] if ( @module_app.widgets[0].blank? )
|
||||
|
||||
@widget_style = @module_app.widgets[@widget_path] if ( !@widget_path.blank? )
|
||||
|
||||
case @module_app.key
|
||||
when 'announcement'
|
||||
@categories = BulletinCategory.all
|
||||
@@ -87,12 +105,25 @@ class Admin::PagePartsController < ApplicationController
|
||||
when 'web_resource'
|
||||
@categories = WebLinkCategory.all
|
||||
@tags = WebResourceTag.all
|
||||
when 'archive'
|
||||
@categories = ArchiveFileCategory.all
|
||||
@tags = ArchiveTag.all
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
format.js {}
|
||||
end
|
||||
end
|
||||
|
||||
def reload_widget_styles
|
||||
@module_app = ModuleApp.find(params[:module_app_id])
|
||||
|
||||
@widget_style = @module_app.widgets[params[:id]]
|
||||
|
||||
respond_to do |format|
|
||||
format.js {}
|
||||
end
|
||||
end
|
||||
|
||||
def reload_r_tag_options
|
||||
@r_tag = (ModuleApp.find(params[:id]) rescue nil) || params[:id]
|
||||
|
||||
@@ -28,10 +28,22 @@ class Admin::PagesController < ApplicationController
|
||||
def edit
|
||||
@item = Page.find(params[:id])
|
||||
@apps = ModuleApp.excludes(app_pages: nil).entries
|
||||
|
||||
@module_apps = ModuleApp.excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc)
|
||||
|
||||
@designs = Design.all.entries
|
||||
@design = @item.design ? @item.design : @designs.first
|
||||
@app_frontend_urls = @item.module_app.app_pages if @item.module_app
|
||||
|
||||
if @item.module_app
|
||||
@module_app = @item.module_app
|
||||
|
||||
@frontend_path = @item.app_frontend_url ? @item.app_frontend_url : @module_app.widgets.keys[0]
|
||||
|
||||
if @module_app.widgets.any?{|b| b.class == Array}
|
||||
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
|
||||
end
|
||||
|
||||
case @item.module_app.key
|
||||
when 'announcement'
|
||||
@categories = BulletinCategory.all
|
||||
@@ -42,9 +54,13 @@ class Admin::PagesController < ApplicationController
|
||||
when 'web_resource'
|
||||
@categories = WebLinkCategory.all
|
||||
@tags = WebResourceTag.all
|
||||
when 'archive'
|
||||
@categories = ArchiveFileCategory.all
|
||||
@tags = ArchiveTag.all
|
||||
end
|
||||
else
|
||||
@categories = nil
|
||||
@module_app = @module_apps[0]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -79,6 +95,9 @@ class Admin::PagesController < ApplicationController
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
|
||||
params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field]
|
||||
params[:page][:frontend_field_type] = nil
|
||||
|
||||
if @item.update_attributes(params[:page])
|
||||
flash[:notice] = t('update.success.page')
|
||||
respond_to do |format|
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
class Admin::PluginsController < ApplicationController
|
||||
|
||||
layout "new_admin"
|
||||
|
||||
def index
|
||||
|
||||
@plugins = OrbitApp::Module::Registration.all
|
||||
|
||||
if(!params[:show_plugin_profile].nil?)
|
||||
@right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).profile_partial_path rescue 'plugin_summary'
|
||||
else
|
||||
@right_partial = "admin/users_new_interface/plugin_summary"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -71,8 +71,8 @@ class Admin::PurchasesController < ApplicationController
|
||||
Dir.mktmpdir('f_path') { |dir|
|
||||
|
||||
build_file(orig_zip, zip_name, dir, design.layout) if design.layout
|
||||
build_file(orig_zip, zip_name, dir, design.default_css) if design.default_css
|
||||
build_file(orig_zip, zip_name, dir, design.reset_css) if design.reset_css
|
||||
build_file(orig_zip, zip_name, dir, design.css_default) if design.css_default
|
||||
build_file(orig_zip, zip_name, dir, design.css_reset) if design.css_reset
|
||||
|
||||
['themes', 'javascripts', 'images'].each do |type|
|
||||
design.send(type).each do |object|
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
class Admin::TagsController < ApplicationController
|
||||
class Admin::TagsController < OrbitBackendController
|
||||
before_filter :force_order_for_visitor,:only=>[:index]
|
||||
before_filter :force_order_for_user,:except => [:index]
|
||||
before_filter :for_app_sub_manager,:except => [:index]
|
||||
|
||||
layout 'new_admin'
|
||||
before_filter :authenticate_user!
|
||||
before_filter :is_admin?
|
||||
before_filter :set_module_app
|
||||
|
||||
# layout 'new_admin'
|
||||
# before_filter :authenticate_user!
|
||||
# before_filter :is_admin?
|
||||
# before_filter :set_module_app
|
||||
|
||||
def index
|
||||
get_tags
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
class Admin::UsersNewInterfaceController < ApplicationController
|
||||
|
||||
layout "new_admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :set_attribute, :only => [:index, :show, :new, :edit]
|
||||
|
||||
def index
|
||||
get_tags
|
||||
get_sub_roles
|
||||
|
||||
page_num = params[:page] || 1
|
||||
@users = []
|
||||
|
||||
render case params[:at]
|
||||
when 'summary'
|
||||
@users=User.page(page_num).per(12).includes('avatar')
|
||||
"index_summary"
|
||||
when 'thumbnail'
|
||||
@users=User.page(page_num).per(36).includes('avatar')
|
||||
"index_thumbnail"
|
||||
else
|
||||
@users=User.page(page_num).per(10).includes('avatar')
|
||||
"index"
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
@user = User.find(params[:id])
|
||||
@plugins = OrbitApp::Module::Registration.all
|
||||
|
||||
@profile_data = []
|
||||
@teacher_data = []
|
||||
@student_data = []
|
||||
@staff_data = []
|
||||
|
||||
|
||||
attribute_values = @user.attribute_values.reject{|att_val|
|
||||
# binding.pry if(att_val.id.to_s == '507fa1295789b52a540000e0')
|
||||
!att_val.attribute_field.locale and (att_val.attribute_field.neutral_for != I18n.locale.to_s)
|
||||
}
|
||||
|
||||
attribute_values.each{|att_val|
|
||||
@profile_data.push({:name => att_val.attribute_field.title,:value =>att_val.get_value_by_locale(I18n.locale)}) if att_val.attribute_field.attribute.key=="profile" rescue false
|
||||
}
|
||||
|
||||
|
||||
if(!params[:show_plugin_profile].nil?)
|
||||
@right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).profile_partial_path rescue 'plugin_summary'
|
||||
else
|
||||
@right_partial = "plugin_summary"
|
||||
end
|
||||
|
||||
# @user.attribute_values.each{|att_val|
|
||||
# @teacher_data.push({:name => att_val.attribute_field.title,:value =>att_val[I18n.locale]})
|
||||
# }
|
||||
|
||||
# @user.attribute_values.each{|att_val|
|
||||
# @student_data.push({:name => att_val.attribute_field.title,:value =>att_val[I18n.locale]})
|
||||
# }
|
||||
|
||||
# @user.attribute_values.each{|att_val|
|
||||
# @staff_data.push({:name => att_val.attribute_field.title,:value =>att_val[I18n.locale]})
|
||||
# }
|
||||
|
||||
# [ {:name=> "1",:value =>"Matt"},{:name=> "2",:value =>"Mark"},{:name=> "3",:value =>"Luke"},{:name=> "4",:value =>"John"} ]
|
||||
|
||||
get_info_and_roles
|
||||
end
|
||||
|
||||
def new
|
||||
@user = User.new
|
||||
# @disable_all_field = true
|
||||
@form_index = 0
|
||||
get_info_and_roles
|
||||
end
|
||||
|
||||
def create
|
||||
binding.pry
|
||||
puts params.to_yaml
|
||||
# attribute_values_key = params[:user].has_key?('new_attribute_values') ? 'new_attribute_values' : 'attribute_values'
|
||||
# attribute_values = params[:user].delete(attribute_values_key)
|
||||
@user = User.new(params["user"])
|
||||
# attribute_values.to_hash.each{|key,value|
|
||||
# @user.attribute_values.build(value)
|
||||
# }
|
||||
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
|
||||
if @user.save
|
||||
flash[:notice] = t('create.success.user')
|
||||
redirect_to :action => :index
|
||||
else
|
||||
@form_index = 0
|
||||
render :action => :new
|
||||
end
|
||||
end
|
||||
|
||||
def temp_edit
|
||||
@user = User.find(params[:id])
|
||||
@form_index = 0
|
||||
get_info_and_roles
|
||||
end
|
||||
|
||||
def edit
|
||||
# @disable_all_field = false
|
||||
@user = User.find(params[:id])
|
||||
@form_index = 0
|
||||
get_info_and_roles
|
||||
end
|
||||
|
||||
def update
|
||||
@user = User.find(params[:id])
|
||||
@user.update_attributes(params[:user])
|
||||
attribute_values_key = params[:user].has_key?('new_attribute_values') ? 'new_attribute_values' : 'attribute_values'
|
||||
attribute_values = params[:user].delete(attribute_values_key)
|
||||
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
|
||||
@user.save
|
||||
redirect_to :action => :show
|
||||
# # Update changes to the avatar
|
||||
# @user.remove_avatar! if params[:file]
|
||||
# @user.avatar = params[:file] if params[:file]
|
||||
|
||||
# if @user.id.to_s.eql?(session['warden.user.user.key'][1].to_s) && @user.admin != params[:user][:admin].to_i.to_b
|
||||
# flash.now[:error] = t(:cant_revoke_self_admin)
|
||||
# end
|
||||
# if !flash[:error] && @user.update_attributes(params[:user])
|
||||
# flash[:notice] = t('update.success.user')
|
||||
# redirect_to :action => :index
|
||||
# else
|
||||
# get_info_and_roles
|
||||
# render :action => :edit
|
||||
# end
|
||||
end
|
||||
|
||||
def destroy
|
||||
if params[:id].eql?(session['warden.user.user.key'][1].to_s)
|
||||
flash[:error] = t(:cant_delete_self)
|
||||
else
|
||||
@user = User.find(params[:id])
|
||||
@user.destroy
|
||||
end
|
||||
|
||||
redirect_to :action => :index
|
||||
end
|
||||
|
||||
protected
|
||||
def get_tags
|
||||
@sub_role_tags = SubRoleTag.all
|
||||
end
|
||||
|
||||
def get_sub_roles
|
||||
@sub_roles = SubRole.all
|
||||
end
|
||||
|
||||
def get_info_and_roles
|
||||
@infos = Info.excludes('disabled' => true)
|
||||
@roles = Role.excludes('disabled' => true)
|
||||
end
|
||||
|
||||
def set_attribute
|
||||
@class = 'users'
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user