put add admin pages using orbit back end controller

This commit is contained in:
Fu Matthew authored and chris committed 2013-03-21 18:45:27 +08:00
1 parent f3e40c1405
commit 8609c8dec0
12 files changed
+14 -34

No files matched your search

@@ -1,4 +1,4 @@
class Admin::AppAuthsController < ApplicationController
class Admin::AppAuthsController < OrbitBackendController
layout "admin"
before_filter :authenticate_user!
# before_filter :is_admin? ,:only => :index
+1 -1
View File
@@ -1,4 +1,4 @@
class Admin::InfosController < ApplicationController
class Admin::InfosController < OrbitBackendController
layout "new_admin"
before_filter :authenticate_user!
+1 -1
View File
@@ -1,4 +1,4 @@
class Admin::ItemsController < ApplicationController
class Admin::ItemsController < OrbitBackendController
layout "site_editor"
@@ -1,4 +1,4 @@
class Admin::MemberSelectsController < ApplicationController
class Admin::MemberSelectsController < OrbitBackendController
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_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
layout "new_admin"
before_filter :force_order
@@ -1,4 +1,4 @@
class Admin::PagePartsController < ApplicationController
class Admin::PagePartsController < OrbitBackendController
layout "site_editor"
@@ -1,4 +1,4 @@
class Admin::PurchasesController < ApplicationController
class Admin::PurchasesController < OrbitBackendController
require "net/http"
require "uri"
require 'zip/zip'
+1 -1
View File
@@ -1,4 +1,4 @@
class Admin::RolesController < ApplicationController
class Admin::RolesController < OrbitBackendController
layout "new_admin"
before_filter :authenticate_user!
+1 -1
View File
@@ -1,4 +1,4 @@
class Admin::SitesController < ApplicationController
class Admin::SitesController < OrbitBackendController
layout "new_admin"
before_filter :authenticate_user!
-24
View File
@@ -59,30 +59,6 @@ class ApplicationController < ActionController::Base
redirect_to root_path
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
if is_admin?
true
+4
View File
@@ -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">
<h1 class="list_title"><%= t('list.purchase') %></h1>
<table class="table main-list">