summaryrefslogtreecommitdiff
path: root/core/models
AgeCommit message (Collapse)Author
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-12aliasing owner to userFelix Rabinovich
2008-11-08Add support for in-place editing of data fields.Bharat Mediratta
2008-11-08Create permanent owner_id column in the item table, and use a softBharat Mediratta
relationship to bind the two. To do this, I overrode __get in Item_Model so that $item->owner returns the appropriate User_Model.
2008-11-08Adding user (owner) to items; info moduleFelix Rabinovich
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.
2008-11-05Style/doc cleanups.Bharat Mediratta
2008-11-05ORM_MPTT::parents() should not include the node itself.Bharat Mediratta
2008-11-05Change the default theme to actually render what's in the Gallery.Bharat Mediratta
Currently only the album view works, albums have no thumbnails, and there's only 1 image in use. Improved Item_Model to have the following API methods file_path() -- returns the path to the source image or album dir thumbnail_path(), thumbnail_url() -- returns path/url to the thumbnail resize_path(), resize_url() -- returns path/url to the resize All tests updated.
2008-11-04Lots of new stuff!Bharat Mediratta
Replace theme HTML with *almost* the latest stuff from the mockups. (it doesn't include r18467 yet). Our theme format is now modelled after WordPress / Habari's style where you have one entry point per type (eg: album.php) which can load up whatever parts it needs (eg: $theme->display("header")) Created album and photo helpers which have create() functions that form the base of our new API, along with tests for them. Created our own version of the ORM_MPTT since the existing versions were too buggy and unsupported to depend upon. Only has a minimal implementation so far, and the tests are not yet committed. Added path(), thumbnail_path() and resize_path() to Item_Model Extended the scaffolding to allow you to add lots of photos/albums into your hierarchy. Deleted modules/mptt -- we're not going to use this anymore.
2008-11-04Restructure the theme code to be more like WordPress / Habari. Now,Bharat Mediratta
the controller initiates a request to a top level page (eg: album.html.php) which is then free to include whatever other page chunks it wants with calls like <?= $theme->display('header.html') ?> Variables like $item and $children are in the global space for all views. theme.php helper is now Theme.php library which lets us store the name of the theme inside the variable itself. This means that the theme does not have to know its own name because you can use $theme->url() for all urls to stuff inside the theme itself, which makes it possible to cline a theme without changing a single line. Still using the mock album UI.
2008-11-03Rename columns lft/rgt to left/right.Bharat Mediratta
2008-11-02Create some basic infrastructure:Bharat Mediratta
* item model (contains basic item info, similar to the gx version) * module model (has info about each module and which version of it is installed) * added a very basic unit test to verify that we can create an instance of item * Updated our test controller to require a unit_test db config and call core::install if it hasn't been done already. New pattern: * core/helpers/core_installer.php creates core_installer helper. When we install a new module you call xxx_installer::install(), and when you want it to go away, you do xxx_installer::uninstall() Create