summaryrefslogtreecommitdiff
path: root/core/controllers
AgeCommit message (Collapse)Author
2008-11-19* Renamed the album, item and photo controllers to albums, items and photos ↵Jozef Selesi
in order to follow the convention that controllers that refer to a collection of resources have plural names. * Added a bug workaround to routes.php
2008-11-18* Changed REST API. Now there are two separate methods for forms:Jozef Selesi
GET /form/edit/{controller}/{resource_id} -> controller::_form_edit($resource) GET /form/add/{controller}/{parameters} -> controller::_form_add($parameters) * Updated comment, user and core modules to reflect the API changes * Cleaned up routing and handling of requests to /{controller}
2008-11-18- All comments of an item can now be seen /comments?item_id=Jozef Selesi
- Return proper Content-Type header for GET /comments requests - Got rid of the query processing for index() in REST_Controller() - Small misc fixes
2008-11-18Fix a typo user_id -> owner_idBharat Mediratta
2008-11-18First iteration of REST controller refactoring. RESTful controllers that ↵Jozef Selesi
refer to collections should now have plural names and there should be only one controller per resource. Updated existing classes that implement REST_Controller. The routing now works like this: GET /controller -> controller::_index() POST /controller -> controller::_create() GET /controller/id -> controller::_show() PUT /controller/id -> controller::_update() DELETE /controller/id -> controller::_delete() GET /form/edit/controller/resource_id -> controller::_form() GET /form/add/controller/data -> controller::_form()
2008-11-17Add output formats to our REST controllers. Add support for JSON andBharat Mediratta
XML to the comment controllers as a proof of concept. It's not fully baked; we should examine ways to create helpers to make this process easier.
2008-11-16Handle _method in either GET or POSTBharat Mediratta
2008-11-16Drop the call to render() and just use the View's __toString method toBharat Mediratta
print it out.
2008-11-16Remove a @todoBharat Mediratta
2008-11-16Several large changes:Bharat Mediratta
1) Changed the way that we get forms. Now, if you want to get a form for a REST resource you prefix /form to the resource id. So: /form/photo/1 : returns a form for editing photo id 1 /form/comments/1 : returns a form for adding a comment to photo id 1 /form/comment/1 : returns a form for editing comment id 1 2) Changed the comment module to have two controllers: comment: deals with a single comment resource comments: deal with collections of comments attached to an item Related stuff: - Moved the comments js into the theme - Reworked Comment_Helper for clarity - Moved form generation code down into Comment_Helper - Cleaned up routes (eliminating new comment ones added in recent rev) - Added form() function to all REST controllers - Changed comment module to use a block instead of an arbitrary helper call from the theme - Comment controller only returns HTML currently, but returns a 201 Created status code when a new comment is added, which the Ajax code can catch and act upon. - Got rid of a lot of extra views in comment module
2008-11-16create a regular user and make scaffolding assign owner to logged in userFelix Rabinovich
2008-11-15Item / Owner changes.Bharat Mediratta
* Hardcode the item has_one owner relationship again * Overload User_Model::__get to handle missing owners gracefully * Fix Item_Controller to take the owner_id from the session or from the parent album when adding new albums and photos.
2008-11-15Clean user / item relationship. Upload files gets the ownership of current ↵Felix Rabinovich
user; and the views don't break if user module is not installed
2008-11-15Revise the user login code.Bharat Mediratta
* Remove user registration link and popup from the theme; this shouldn't be done in a popup. Use ajaxform to simplify the way that we load the login popup. * Create form.html.php, this is a template for Forge based forms. * Move user validation rules into User_Model and let forms populate the rules into their forms as useful. * Undo r18688's changes regarding the REST code. We should never accept a null resource, this breaks the REST abstraction. * Change login and user controllers to use Forge which lets us delete login.html.php and user.html.php since those now are generated by the theme-owned form template
2008-11-14Allow the HTTP get method to be called without an id to create any empty ↵Tim Almdal
template.
2008-11-14Use the shortform to load the resource.Tim Almdal
2008-11-12Code cleanup, add test for time formatting function.Jozef Selesi
2008-11-12Throw an exception when we can't upload a file. This is not the best ↵Bharat Mediratta
solution, but it works for now.
2008-11-12aliasing owner to userFelix Rabinovich
2008-11-12Create a simple benchmark that loads 500 localized messages and performsBharat Mediratta
500 localizations on them.
2008-11-11Change the PUT/DELETE tunneling param from __action to _methodBharat Mediratta
to be like Rails.
2008-11-11Move scaffolding code out of the comments controller to welcome.php.Jozef Selesi
2008-11-11Change Album and Photo controllers to set the user object as a global ↵Tim Almdal
variable; change the header so it links to the user controllers; and add the user controllers which don't do anything.
2008-11-11Change REST API to use non-routable functions: _get(), _post(),Bharat Mediratta
_put(), _delete(). This should make it more obvious that these are not your typical routes, simplifies overall routing by removing a rule and removes the possibility of accidentally leaking information if we route to one of them by accident.
2008-11-11Add phpdocs to explain how to use REST_ControllerBharat Mediratta
2008-11-11Create REST_Controller abstract base class for all REST based resourceBharat Mediratta
controllers. Any controller that wants to act RESTful can extend this class and implement get/post/put/delete. Tweak default routes to disallow direct access to the REST controller and direct access to any REST methods.
2008-11-10Manually delete the auth table and module entry to ease transitions for devs.Bharat Mediratta
2008-11-10Reset the links in the header and update the readmeTim Almdal
2008-11-10Add support for multi-file-upload using jquery.MultiFile and modifyBharat Mediratta
Item_Controller to accept it.
2008-11-10The start of the login functionality. It shows the login popup but doesn't ↵Tim Almdal
do anything else. Just got tire of my changes being clobbered :-)
2008-11-10Add the ability to create albums to the scaffoldingBharat Mediratta
Revert $_POST back to $this->input->post() because that supports default values.
2008-11-10Convert quote stylesBharat Mediratta
Convert $this->input->post to $_POST
2008-11-09Implement Item_Controller::put() and delete()Bharat Mediratta
Adjust/simplify photo::create Add image uploading to the scaffolding
2008-11-09Make Gallery3 more RESTful.Bharat Mediratta
Create Item_Controller as a common superclass for Album_Controller and Photo_Controller. Change routes to route requests to Item_Controller for dispatching, which in turn will generate get/post/put/delete requests to the controlller so that each controller has a RESTful surface. Change in_place editing to take advantage of this.
2008-11-08Add support for in-place editing of data fields.Bharat Mediratta
2008-11-08Simplify the way that we find the user id (just look it up, and if there's a ↵Bharat Mediratta
database exception use the null value)
2008-11-08Adding user (owner) to items; info moduleFelix Rabinovich
2008-11-07Change add() to add photos:albums at a ratio of 10:1Bharat Mediratta
2008-11-07Add automatic pagination. All you have to do is add <?= $theme->pagerBharat Mediratta
?> to your theme file and you get a well formed pager. Themes can customize this any way they want. A version that matches the mockup is provided in the default theme.
2008-11-07Use jquery.cookie to keep the same tab open when you refreshBharat Mediratta
Add a switch to turn profiling on/off
2008-11-06Oops, these files got left out of r18525.Bharat Mediratta
2008-11-06album::set_thumbnail is now part of Item_Model so it can go.Bharat Mediratta
Fix a bug in the scaffolding where we weren't saving the album after adding its thumbnail (so its dimensions weren't getting set).
2008-11-06Add quick-link to the deepest photo to test hierarchical navigationBharat Mediratta
2008-11-06spruce up the display of commandsChad Kieffer
2008-11-06When uninstalling the core, uninstall all the other modules first.Bharat Mediratta
Otherwise, when you reinstall the other module's tables are still hanging around and interfere with their install.
2008-11-06Fix a typo.Bharat Mediratta
2008-11-05Guard the module loading code against database errors (in case the database ↵Bharat Mediratta
isn't configured yet)
2008-11-05remove tabsBharat Mediratta
2008-11-05Add info section with MPTT graphsBharat Mediratta
2008-11-05* Add thumbnail and resize dimensions to the item table and use themBharat Mediratta
properly in the theme. * Move thumbnail and resize generation down into the model for consistency. * Add a sample thumbnail for albums * Fix a bug in the ORM to clear the cache when we reload an object. * Add Kohana docs to the scaffold.