Commit Graph
410 Commits
Author SHA1 Message Date
Felix Rabinovich a26127ae9c Added title to user/group administration dialogs 2008-12-26 20:34:56 +00:00
Felix Rabinovich 6b1fa62173 Added content type to JSON output functions 2008-12-26 20:08:15 +00:00
Bharat Mediratta 7fdde469d3 Move Watermarks under Content in the Site Admin menu. 2008-12-26 18:59:41 +00:00
Felix Rabinovich 6dcc3e5c25 User/Group administration cleanup 2008-12-26 06:14:24 +00:00
Felix Rabinovich 2917af5c0d Separate GET and POST in Group Administration 2008-12-26 05:45:09 +00:00
Bharat Mediratta ecf7d46a67 Add the graphics rules for both thumbs and resizes (instead of just thumbs). 2008-12-26 05:44:02 +00:00
Bharat Mediratta dee20ed6a2 Added the concept of "permanent" messages that we show to admins. Use
this to show a "your thumbs/resizes are out of date" message whenever
we change the graphics rules.  Tweak watermark module to add graphics
rules whenever we make a change, which triggers the graphics module to
add the permanent message.
2008-12-26 05:43:06 +00:00
Felix Rabinovich 72c3a417ca Separate GET and POST in User Administration 2008-12-26 05:26:22 +00:00
Bharat Mediratta 0630dc9a8e Fix get_add_form() to use self::positions() so that we get the right key/value pairs. 2008-12-26 05:14:00 +00:00
Bharat Mediratta b5e1aa6a60 Login is 'info' not 'success' 2008-12-26 05:11:42 +00:00
Bharat Mediratta e31ca19a06 Added graphics::mark_all_dirty(). The watermark code now marks images
as dirty if the admin changes the watermark at all.
2008-12-26 04:52:18 +00:00
Bharat Mediratta df3f0c3382 Add missing '=' causing <img> height not to get set. 2008-12-26 04:35:44 +00:00
Felix Rabinovich c154f9f20a Group Administration 2008-12-26 04:35:27 +00:00
Bharat Mediratta 837a5430b8 More watermark changes:
Change admin/watermarks/upload -> admin/watermarks/add for consistency.

Internationalize position text, store it as text in the database,
display it to the admin.

Make i18n strings consistent to reduce l10n load.
2008-12-26 04:34:20 +00:00
Bharat Mediratta 2011ee13ef Remove an HTTP redirect that was breaking the Ajax interface. 2008-12-26 04:02:55 +00:00
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
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
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 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
Bharat Mediratta 36b903b234 Remove a test for code that was removed 2008-12-25 10:14:28 +00:00
Felix Rabinovich 730d74c87a fixes in user edit and delete 2008-12-25 06:29:12 +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 b0dff620e2 Minor cleanups. 2008-12-24 04:05:47 +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
Felix Rabinovich c76d730a7c Edit user - first draft 2008-12-23 21:44:35 +00:00
Bharat Mediratta 32a3071477 Can't self-close a <div>. 2008-12-23 19:07:30 +00:00