put add admin pages using orbit back end controller
This commit is contained in:
parent
6cd97adf21
commit
8e98cb3ec9
|
@ -1,4 +1,4 @@
|
||||||
class Admin::AppAuthsController < ApplicationController
|
class Admin::AppAuthsController < OrbitBackendController
|
||||||
layout "admin"
|
layout "admin"
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
# before_filter :is_admin? ,:only => :index
|
# before_filter :is_admin? ,:only => :index
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Admin::InfosController < ApplicationController
|
class Admin::InfosController < OrbitBackendController
|
||||||
|
|
||||||
layout "new_admin"
|
layout "new_admin"
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Admin::ItemsController < ApplicationController
|
class Admin::ItemsController < OrbitBackendController
|
||||||
|
|
||||||
layout "site_editor"
|
layout "site_editor"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Admin::MemberSelectsController < ApplicationController
|
class Admin::MemberSelectsController < OrbitBackendController
|
||||||
|
|
||||||
layout "new_admin"
|
layout "new_admin"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Admin::ModuleAppsController < ApplicationController
|
class Admin::ModuleAppsController < OrbitBackendController
|
||||||
before_filter :user_has_manager_privilege?, :only => [ :assign_manager, :remove_manager ]
|
before_filter :user_has_manager_privilege?, :only => [ :assign_manager, :remove_manager ]
|
||||||
before_filter :user_has_sub_manager_privilege?, :only => [ :assign_sub_manager, :remove_sub_manager ]
|
before_filter :user_has_sub_manager_privilege?, :only => [ :assign_sub_manager, :remove_sub_manager ]
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Admin::ObjectAuthsController < ApplicationController
|
class Admin::ObjectAuthsController < OrbitBackendController
|
||||||
include OrbitCoreLib::PermissionUtility
|
include OrbitCoreLib::PermissionUtility
|
||||||
layout "new_admin"
|
layout "new_admin"
|
||||||
before_filter :force_order
|
before_filter :force_order
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Admin::PagePartsController < ApplicationController
|
class Admin::PagePartsController < OrbitBackendController
|
||||||
|
|
||||||
layout "site_editor"
|
layout "site_editor"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Admin::PurchasesController < ApplicationController
|
class Admin::PurchasesController < OrbitBackendController
|
||||||
require "net/http"
|
require "net/http"
|
||||||
require "uri"
|
require "uri"
|
||||||
require 'zip/zip'
|
require 'zip/zip'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Admin::RolesController < ApplicationController
|
class Admin::RolesController < OrbitBackendController
|
||||||
|
|
||||||
layout "new_admin"
|
layout "new_admin"
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Admin::SitesController < ApplicationController
|
class Admin::SitesController < OrbitBackendController
|
||||||
|
|
||||||
layout "new_admin"
|
layout "new_admin"
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
|
|
|
@ -59,30 +59,6 @@ class ApplicationController < ActionController::Base
|
||||||
redirect_to root_path
|
redirect_to root_path
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check if the current_user is admin,if not redirect
|
|
||||||
def is_admin?
|
|
||||||
current_or_guest_user.admin? ? true : auth_failed_in_backend
|
|
||||||
end
|
|
||||||
|
|
||||||
# def is_manager?
|
|
||||||
# @module_app.is_manager?(current_or_guest_user) || is_admin?
|
|
||||||
# end
|
|
||||||
|
|
||||||
# # Check if the current_user is admin
|
|
||||||
# def is_member?
|
|
||||||
# if (current_user rescue false)
|
|
||||||
# return true
|
|
||||||
# end
|
|
||||||
# return false
|
|
||||||
# end
|
|
||||||
|
|
||||||
# def is_guest?
|
|
||||||
# if session[:guest_user_id]
|
|
||||||
# return true
|
|
||||||
# end
|
|
||||||
# return false
|
|
||||||
# end
|
|
||||||
|
|
||||||
def for_admin_only
|
def for_admin_only
|
||||||
if is_admin?
|
if is_admin?
|
||||||
true
|
true
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
<% content_for :side_bar do %>
|
||||||
|
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :side_bar_content => 'admin/sites/side_bar'} %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="main2">
|
<div class="main2">
|
||||||
<h1 class="list_title"><%= t('list.purchase') %></h1>
|
<h1 class="list_title"><%= t('list.purchase') %></h1>
|
||||||
<table class="table main-list">
|
<table class="table main-list">
|
||||||
|
|
Loading…
Reference in New Issue