summaryrefslogtreecommitdiff
path: root/core/controllers
AgeCommit message (Collapse)Author
2008-12-31Add Item_Model::url() and use it where appropriate. Cleans up someBharat Mediratta
grotty looking stuff in themes.
2008-12-31Add sibling information on photo pages and a very simple next/previous ↵Bharat Mediratta
interface.
2008-12-31change single to double quotes.Bharat Mediratta
2008-12-31Preliminary "Edit Permissions" dialog. You can't change permissionsBharat Mediratta
yet, but it shows you which items have locked view perms.
2008-12-31Fully implement the view_full permission.Bharat Mediratta
2008-12-30Update user::create() scaffolding for changes in the user module: can't set ↵Andy Staudacher
the isAdmin bit at creation time.
2008-12-30Add a "Graphics Settings" page that lets admins choose which graphicsBharat Mediratta
toolkit we use. We only allow users to use one toolkit. The UI needs work!
2008-12-29Remove rest::JSON content type; it's causing lots of problems and it doesn't ↵Bharat Mediratta
directly help since text/html works just as well for our JSON communications
2008-12-29Return the task on success so that our UI can show it at 100%Bharat Mediratta
2008-12-29Don't set the document type to JSON when uploading photos.Bharat Mediratta
2008-12-28Expand on the maintenance code to make it more robust and give theBharat Mediratta
admin more control. You can now track running tasks, resume stalled tasks, cancel running tasks, and remove finished tasks. Added graphics::compose() as a placeholder for future watermark operations. Added CSRF protection to maintenance urls.
2008-12-28First round of a task framework. Tasks are job definitions stored inBharat Mediratta
the database. They're started with admin/maintenance/start/[task_name] which sends down some JS/HTML which regularly pings the task at admin/maintenance/start/[task_id] until its done. The UI is still very rough. It works, though!
2008-12-26Added content type to JSON output functionsFelix Rabinovich
2008-12-26Fix a typo.Bharat Mediratta
2008-12-25Rework log and message helpers to be parallel, but separate.Bharat Mediratta
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-25Make sure admin method exist before we call them, else we'll just recurse ↵Bharat Mediratta
into Admin_Controller::__call() again
2008-12-25Reload the parent before using when adding albums/photos since it may have ↵Bharat Mediratta
invalid left/right pointers.
2008-12-25Big round of normalization of the way that our controllersBharat Mediratta
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-25Rest_Controller -> REST_Controller everywhere, for consistency.Bharat Mediratta
2008-12-24Normalize our Admin controllers so that functions always print outBharat Mediratta
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-24Lots of deltas rolled up into a bigger change. Sorry for the mess.Bharat Mediratta
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-23Clean up the way that we upload via dialogs:Bharat Mediratta
1) If the create request is Ajax, then return a 201 Created response code 2) If we receive back a 201 response, then switch to the new page. 3) Display a status message when we do an upload.
2008-12-23Update to reflect change in album::create APIBharat Mediratta
2008-12-23Change photo::create() and album::create() to take ORM instancesBharat Mediratta
instead of ids.
2008-12-23Add very simple graphics toolkits.Bharat Mediratta
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-22Add messaging system for reporting actions back to the user. MakeBharat Mediratta
module install/uninstall work and tie it into the messaging system.
2008-12-22Remove module.info from infrastructure modules that are effectivelyBharat Mediratta
libraries that would ship with the core. Refactor welcome.php to use the newly refactored module::available()
2008-12-22Normalize CSRF handling into the access helper. Probably not the bestBharat Mediratta
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-22Support proper rendering of locked modules, add a submit button, point it at ↵Bharat Mediratta
admin/modules/save
2008-12-22Change the way that we track modules.Bharat Mediratta
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-21Add some more logging code. Now the site admin has some log entries to look at.Bharat Mediratta
2008-12-21create a more generic random_phrase() functionBharat Mediratta
2008-12-20Update view counts for albums alsoBharat Mediratta
2008-12-20Add view counts and show them properly.Bharat Mediratta
2008-12-20Collapse Admin_Dashboard_Controller down into a single theme call, since nowBharat Mediratta
all dashboard blocks are stored in modules.
2008-12-19Fix a bug in admin delegation.Bharat Mediratta
2008-12-19Create a new pattern for Site Admin controllers:Bharat Mediratta
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-19We always have at least 1 page in an album.Bharat Mediratta
2008-12-19Allow server-side adding of images to other albums than the rootBharat Mediratta
2008-12-17Add Item_Model::viewable() which we can use to restrict any query toBharat Mediratta
just items viewable by the active user. Ie: ORM::factory("item") ->where("name", "foo") ->find_all() Would get all items with the name "foo". ORM::factory("item") ->viewable() ->where("name", "foo") ->find_all() Restricts it to just the set of items that the user is allowed to see.
2008-12-17Switch from cookie sessions to database sessions. We can't use cookieBharat Mediratta
sessions; it encodes all the value into the cookie which means little/no security, transfer costs, and storage limits.
2008-12-17Improve performance by finding the item without walking the tree.Bharat Mediratta
Instead, use the level and the name to get a short list of candidates, and check each one of those. In most cases, this query should give us the right result the first time.
2008-12-17Change the album thumbnail/resize from _album.jpg to .album.pjgBharat Mediratta
because the leading underscore confuses the Kohana router.
2008-12-17Separate thumbnails out into var/thumbs. This clears up some ambiguity in ↵Bharat Mediratta
Item_Model and simplifies file_proxy. It also means we can stop munging file names in the var/resizes hierarchy. In the process, rename "thumbnail" to "thumb" everywhere in honor of Chad (well, ok because it's shorter)..
2008-12-16Add file_proxy. This is controller gets triggered by .htaccessBharat Mediratta
protection on var/albums and var/resizes and only displays files to the user if they have "view" permission on the base ite.
2008-12-161) Remove the load watermark from the scaffolding... use the menu optionTim Almdal
2) The set watermark dialog is now sizing properly. @todo is recenter in the window
2008-12-16Fix a bug where we were using module::set_var() instead of module::get_var() ↵Bharat Mediratta
resulting in loading all photos in an album on a single page and updating the var on every page load.
2008-12-15Update to reflect changes in Kohana ORM relationship code.Bharat Mediratta
Now you must call ORM::save() after ORM::add() and ORM::remove().
2008-12-15Rename default_admin to admin_default.Bharat Mediratta
2008-12-15Refactor admin dashboard.Bharat Mediratta
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