Commit Graph

16 Commits

Author SHA1 Message Date
Bharat Mediratta
b6f44334d9 Make sure admin method exist before we call them, else we'll just recurse into Admin_Controller::__call() again 2008-12-25 22:29:05 +00:00
Bharat Mediratta
c7193f9b2e Normalize our Admin controllers so that functions always print out
their results, as opposed to having them return their view back
upstream.  This is a little more code in every controller, but it's
much less magical and more consistent.

Look up the active_theme and active_admin_theme inside the view
itself, no need to do that in the controllers.  This makes view
initialization easier in the controllers.
2008-12-24 04:22:22 +00:00
Bharat Mediratta
9cf2c57921 Normalize CSRF handling into the access helper. Probably not the best
place for it, but it'll do for now.

Do CSRF checking in the Admin controller so that we're safe across the
board on the admin side.
2008-12-22 04:33:18 +00:00
Bharat Mediratta
e4bace4c74 Collapse Admin_Dashboard_Controller down into a single theme call, since now
all dashboard blocks are stored in modules.
2008-12-20 01:42:18 +00:00
Bharat Mediratta
9d2d824336 Fix a bug in admin delegation. 2008-12-19 22:14:14 +00:00
Bharat Mediratta
855a5928ce Create a new pattern for Site Admin controllers:
1) They must all start with "admin_".  This pattern is not directly
   routable.

2) Their urls must be /admin/xxx.

3) The Admin_Controller will take the xxx and look for Admin_Xxx_Controller
   and will delegate to that admin controller, after doing security checks.

Moved the users and dashboard views into individual modules for now.
2008-12-19 09:47:13 +00:00
Bharat Mediratta
1127257f63 Rename default_admin to admin_default. 2008-12-15 01:50:52 +00:00
Bharat Mediratta
c02d2554cf Refactor admin dashboard.
o Copy all the assets from default to default_admin so that they're
  totally separate
o Get rid of $item_theme
o Rename list_users.html.php to users.html.php
o use __call in admin controller to allow us to load any admin page
2008-12-15 01:48:34 +00:00
Bharat Mediratta
19e75b1e2e mark unauthorized exception w/ a @todo 2008-12-15 00:37:31 +00:00
Felix Rabinovich
c46bd97407 load admin subpages AJAXy way 2008-12-14 21:50:10 +00:00
Bharat Mediratta
b7487e384d convert single quotes to double quotes for consistency. 2008-12-14 21:39:56 +00:00
Felix Rabinovich
7fa014ae61 refactored admin views and added 'List User' 2008-12-14 07:59:24 +00:00
Felix Rabinovich
8b81731846 clean the links and require authorization before showing admin pages 2008-12-14 04:39:22 +00:00
Felix Rabinovich
cb92d1a70d 1. fix up the <link> and <script> elements in the dashboard <head>.
2. made the images work properly
2008-12-14 04:16:38 +00:00
Felix Rabinovich
34c9aa52b8 Fixed tabs and line endings 2008-12-14 02:45:07 +00:00
Felix Rabinovich
13ad40ab5c Created admin controller and made admin obey admin theme settings 2008-12-14 02:23:37 +00:00