Commit Graph
377 Commits
Author SHA1 Message Date
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
Chad Kieffer 69daaffb05 Fixed indents 2008-12-23 06:33:28 +00:00
Bharat Mediratta 5713e3c66e Change photo::create() and album::create() to take ORM instances
instead of ids.
2008-12-23 04:36:09 +00:00
Bharat Mediratta 2502240ce4 Add very simple graphics toolkits.
Track a set of rules in Graphics_Rule_Model which specify how we turn
original images into thumbnails and resizes.  There's one set of rules
that applies to every image in the Gallery.

Track the state of thumbs and resizes with a "dirty" bit.  The new
graphics helper manages the rules and can rebuild the thumbs and
resizes for any images that are considered "dirty".

Introduce the concept of an "album cover" which is an item that an
album points to.  We'll use that item as the source for the album's
thumbnail/resize.

Conflated with this change (sorry!) I also changed the Var table to
use module_name instead of module_id.  This may be marginally less
efficient, but it's much easier to follow in the database.
2008-12-23 04:14:07 +00:00
Bharat Mediratta ddcf10dfce Allow the site admin to upload watermark images. Can't do much with them yet. 2008-12-23 01:29:17 +00:00
Bharat Mediratta d330e4203a Step 1 of converting watermarks over to be an admin page. 2008-12-23 00:13:22 +00:00
Bharat Mediratta 34daf50695 Add attribute to <script> element. 2008-12-23 00:06:20 +00:00
Bharat Mediratta c5173c5370 Remove stray comma. 2008-12-23 00:05:36 +00:00
Bharat Mediratta 47d068e4a8 Remove extraneous view, not necessary 2008-12-22 10:39:13 +00:00
Bharat Mediratta 17f77b8de4 Remove module.info from infrastructure modules that are effectively
libraries that would ship with the core.

Refactor welcome.php to use the newly refactored module::available()
2008-12-22 04:49:30 +00:00
Bharat Mediratta fe27bd1eb3 Change the way that we track modules.
Each module now has a "module.info" file that has information about
the module, including the core.  We can display the installed version,
and the version in the code.

Also take a first shot at a modules admin page.
2008-12-22 03:41:33 +00:00
Bharat Mediratta f7b4222e3f Fix capitalization. 2008-12-22 03:23:30 +00:00
Bharat Mediratta 849b271a8c Add info/warning/error classes to log messages. 2008-12-21 10:35:30 +00:00
Bharat Mediratta b3c05b1579 Move logging up to the controllers so that our logging can operate at a more meta level 2008-12-21 04:18:42 +00:00
Bharat Mediratta f0b6333344 Add a logging facility, and instrument login/logout to use it. 2008-12-21 03:50:11 +00:00
Bharat Mediratta 78ce8615f3 Implement the "recent comments" block with real data. 2008-12-21 02:02:41 +00:00
Bharat Mediratta 81e87dfecd Change "datetime" to "created" to give some semantics to this field. 2008-12-21 01:29:25 +00:00
Bharat Mediratta 05f26fa2d4 Fix a problem with magenta 2008-12-20 22:37:14 +00:00
Bharat Mediratta 50b0613243 Add view counts and show them properly. 2008-12-20 20:04:57 +00:00
Bharat Mediratta ad0ddc236c Fix preamble 2008-12-20 07:30:27 +00:00
Bharat Mediratta b933d1a170 Move Recent Comments into its own block. 2008-12-20 01:25:03 +00:00
Bharat Mediratta 6564007a9d Implement admin user editing. It's still very rough. Trying to
figure out how to share forms between user and admin editing.

Incremental improvement
2008-12-19 22:16:10 +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 5d2b1ae056 Don't try to validate the form unless it's a POST request. 2008-12-19 03:05:11 +00:00
Bharat Mediratta 0cf07fbeec Fix indentation. 2008-12-19 03:02:58 +00:00
Bharat Mediratta 77c97daa37 Don't restrict image overlays 2008-12-19 00:47:37 +00:00
Bharat Mediratta f5bc55e72d Add labels to the form groups. 2008-12-18 22:35:16 +00:00
Bharat Mediratta 052bb79d68 Add <fh:complete/> 2008-12-18 18:50:27 +00:00
Bharat Mediratta c67234974d Refactor site admin menu into a theme function and build the menus in
the various modules.  In the process, rename xxx_menu::site_navigation() to just
xxx_menu::site().  And add xxx_menu::admin().

The menus are the same as before, but I changed the HTML to be
consistent with the way that we do it in the regular site, and this
broke the superfish styles.  I don't know how to fix this.. help me
Chad!
2008-12-18 07:32:34 +00:00
Chad Kieffer c2598fe4d8 Dialog polishing. They now resize their height. Updated form styles in the context of dialog display (don't show legends, fieldset border, or submit button).
Let's make sure that all forms generated are complete and well formed and then use JS and CSS to control their display and behavior in different contexts.
2008-12-18 02:50:40 +00:00
Bharat Mediratta c92fbfd3c3 Add <generator> element to try to make Polar Rose happy (it doesn't work, though) 2008-12-18 00:29:22 +00:00
Bharat Mediratta db110df5ba Absoluteify some urls to make feedvalidator.org happy 2008-12-18 00:28:30 +00:00
Bharat Mediratta d4f1f6400f Polar Rose facial recognition module. Currently in a non-working
state because their server is not RFC2109 compliant.  Filing a bug.
2008-12-18 00:16:03 +00:00
Bharat Mediratta 55f63f6c9f Add item view permission checks.
Switch from absolute urls to relative ones.

Relative urls break the flash based slideshow, but the Cooliris
extension works.  I'll file a bug.
2008-12-18 00:02:59 +00:00