Commit Graph
2082 Commits
Author SHA1 Message Date
Felix Rabinovich 314d55d858 User Administration. Add users. Take 3 2008-12-26 03:47:04 +00:00
Felix Rabinovich 9a71309844 User Administration. Delete users. Take 3 2008-12-26 03:22:52 +00:00
Bharat Mediratta 0fc14c1bfc Simplify the watermark module. We can now upload, edit and delete one
watermark.  The UI is rough and we don't yet apply the watermark to
images.. that's next.
2008-12-26 01:32:12 +00:00
Bharat Mediratta eb35afc987 Add module::clear_var() 2008-12-26 01:29:33 +00:00
Felix Rabinovich 7f95c80e88 User Administration. Edit users. Take 3 2008-12-26 00:58:15 +00:00
Bharat Mediratta 2c91a7e9ce Rework log and message helpers to be parallel, but separate.
1) they now have their own matching severity constants
2) they both have convenience functions success(), info(), warning() and error()
3) they both have severity_class()
2008-12-25 23:43:44 +00:00
Chad Kieffer 847d42682d Switch gFailure back to gError. Makes more sense semantically. 2008-12-25 23:31:41 +00:00
Chad Kieffer caaa521927 Update message CSS: gFailure, gInfo, gSuccess, gWarning. Removed gHelp, it's not a message type. 2008-12-25 23:22:38 +00:00
Bharat Mediratta 94e3ae2e0f Add edit/delete links (they're just stubs now, but they open a dialog).
Add active/position to Watermark_Model
2008-12-25 22:31:20 +00:00
Bharat Mediratta 3d42234d57 Clone dialog support over from themes/default (for now) 2008-12-25 22:29:26 +00:00
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 75b9a7872c Remove extra uniquifying text that Forge adds to uploaded files. 2008-12-25 21:54:09 +00:00
Bharat Mediratta 71d0373838 Return the form on success so that we clear out any prior error forms 2008-12-25 21:41:18 +00:00
Bharat Mediratta 324b612003 Oops, and also re-ajaxify the form if we replace it. 2008-12-25 21:40:05 +00:00
Bharat Mediratta ead45ffbc2 Reload the form if it's available so that we show form errors and we reset the form on success. 2008-12-25 21:39:22 +00:00
Felix Rabinovich 82ed38d78e Ajaxify 'add users' 2008-12-25 20:59:33 +00:00
Chad Kieffer 9ebced112b Restore inline gLoginMenu items, remove extra ; from footer. 2008-12-25 20:12:00 +00:00
Chad Kieffer 2c978cb37a Message box style update. A few font-style updates. 2008-12-25 19:59:15 +00:00
Bharat Mediratta b91992187d Updated Kohana to r3845 2008-12-25 10:24:29 +00:00
Bharat Mediratta 3185915264 Split Items_Controller_Test into Photos and Albums tests 2008-12-25 10:14:59 +00:00
Bharat Mediratta 36b903b234 Remove a test for code that was removed 2008-12-25 10:14:28 +00:00
Bharat Mediratta 74bfa24b8f Move jquery.listen.js out to lib 2008-12-25 08:27:57 +00:00
Bharat Mediratta 0338205efe We no longer need these, they've been rolled into jquery-ui.js 2008-12-25 08:15:45 +00:00
Bharat Mediratta da7fe5154a Merge in updated jquery-ui which contains the accordion widget, delete
explicit references to accordion widget from admin ui.
2008-12-25 08:14:41 +00:00
Bharat Mediratta 5ca952fe61 jquery-ui.packed.js --> jquery-ui.js 2008-12-25 08:11:46 +00:00
Bharat Mediratta de1af052fc Removed 'packed' from the name, it's not relevant 2008-12-25 08:09:36 +00:00
Felix Rabinovich 730d74c87a fixes in user edit and delete 2008-12-25 06:29:12 +00:00
Bharat Mediratta d5a1433f2d Reload the parent before using when adding albums/photos since it may have invalid left/right pointers. 2008-12-25 06:12:16 +00:00
Felix Rabinovich 3a22e0a2df fixed minor log:add typo 2008-12-25 06:11:07 +00:00
Bharat Mediratta d4a5264925 get_add_form() -> add_add_form_admin() 2008-12-25 05:57:45 +00:00
Bharat Mediratta fdc0f83024 Big round of normalization of the way that our controllers
communicate.  Almost all controllers now use JSON to speak to the
theme when we're dealing with form processing.  This means tht we only
send the form back and forth, but we use a JSON protocol to tell the
browser success/error status as well as the location of any newly
created resources, or where the browser should redirect the user.

Lots of small changes:
1) Admin -> Edit Profile is gone.  Instead I fixed the "Modify Profile" link
   in the top right corner to be a modal dialog

2) We use json_encode everywhere.  No more Atom/XML for now.  We can bring those
   back later, though.  For now there's a lot of code duplication but that'll be
   easy to clean up.

3) REST_Controller is no longer abstract.   All methods its subclasses should create
   throw exceptions, which means that subclasses don't have to implement stubs for
   those methods.

4) New pattern: helper method get_add_form calls take an Item_Model,
   not an id since we have to load the Item_Model in the controller
   anyway to check permissions.

5) User/Groups REST resources are separate from User/Group in the site
   admin.  They do different things, we should avoid confusing overlap.
2008-12-25 05:12:46 +00:00
Felix Rabinovich 6e68c5ca28 added sprintf to strings for tranlation support 2008-12-25 02:59:45 +00:00
Bharat Mediratta 2c6a80fb76 Don't let the admin delete themselves, either. That would be bad. 2008-12-25 02:48:07 +00:00
Bharat Mediratta 95ec6a8f57 Only admins can delete users. 2008-12-25 02:47:17 +00:00
Bharat Mediratta 216ecf3079 Fix rules for editing users. 2008-12-25 02:42:48 +00:00
Bharat Mediratta f6ebb436e4 Rest_Controller -> REST_Controller everywhere, for consistency. 2008-12-25 02:38:53 +00:00
Felix Rabinovich 481352c382 User administration: 1. Add users; 2. Group administration; 3. General cleanup 2008-12-25 02:16:41 +00:00
Bharat Mediratta fd49c74607 Convert tag module over to returning JSON. 2008-12-25 01:34:17 +00:00
Bharat Mediratta 7a9d4a2224 Fix the way we dump out comment in _show(). 2008-12-25 01:06:37 +00:00
Bharat Mediratta cdcd8bf377 Update the form first, then clear it on success (else it doesn't get cleared on success) 2008-12-25 00:56:10 +00:00
Bharat Mediratta d62acf041f Be consistent: resource is a url, data is the actual JSON encoded result. 2008-12-25 00:53:45 +00:00
Bharat Mediratta 0bb82b7621 Gut the comment module and simplify it. Stop trying to support Atom
and XML for now, we have no driver for those technologies so anything
we implement is not going to be sufficiently tested and therefore
it'll be broken.

Change all comment functions to return JSON and update the JS to deal
purely with JSON.  This is our new protocol for talking to the browser
and it should be flexible and portable.

Create comments.html.php.  This duplicates comment.html.php, but will
be more efficient for rendering comments since we won't be creating a
new View for every comment we render.
2008-12-25 00:47:40 +00:00
Felix Rabinovich 7a82beb752 Adding user 2008-12-24 19:59:12 +00:00
Bharat Mediratta 526ac39697 Remove stray response:: (not yet time for this.. it's coming!) 2008-12-24 04:25:11 +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 b2c9a59d1b Tersify a log message 2008-12-24 04:10:00 +00:00
Bharat Mediratta 1ed83e5569 Fix bad <input/> 2008-12-24 04:09:41 +00:00
Bharat Mediratta b0dff620e2 Minor cleanups. 2008-12-24 04:05:47 +00:00
Bharat Mediratta 863e3712c7 Add atom to the implicit module list. 2008-12-24 04:04:08 +00:00
Bharat Mediratta 672eca5337 Lots of deltas rolled up into a bigger change. Sorry for the mess.
1) Deleted in-place-editing.  We'll be replacing this with a real edit
   system that groups settings together and is more coherent.

2) Tweaked the way that dialog boxes work to get the ajax stuff working
   again.  It's imperfect and does not work properly for uploading images.
   This is going to get redone also, but this is a good resting point.

3) Created edit forms for albums and photos.  Moved _update and _create out
   of Items_Controller and into the individual subclasses.

4) Created access::required which is a shorthand for:
    if (!access::can(...)) {
      access::forbidden();
    }

5) Added validation rules to Items_Model

6) Converted login to use the regular modal dialog approach in the theme.
2008-12-24 00:20:26 +00:00