summaryrefslogtreecommitdiff
path: root/core/models
AgeCommit message (Collapse)Author
2009-01-14Create Item_Model::thumb_tag() and Item_Model::resize_tag() to provideBharat Mediratta
an abstraction for when we add movie support.
2009-01-13Models should be named in adjective_noun form to make pluralizatoinBharat Mediratta
more intuitive. Renamed Translations_Incoming to Incoming_Translation to suit.
2009-01-11Fix windows-style line endings.Bharat Mediratta
2009-01-09Theme Administration v. 2. Doesn't distinguish between regular and admin ↵Felix Rabinovich
themes yet
2009-01-08First step of i18n refactoring:Andy Staudacher
- Using DB table translations_incomings as translations storage (file cache to be added) - Removed overly complex i18n code which will be unnecessary with the future compiled cache files - Added t() as a translation function (global refactoring from _() to t() to follow)
2009-01-04Allow passing a query string as an argument to Item_Model::url()Bharat Mediratta
2009-01-03Stay on the right page when we navigate up in the breadcrumb.Bharat Mediratta
Introduce a "show" parameter which contains the id of the item that we want to show when we go to the parent's page.
2008-12-31Add Item_Model::url() and use it where appropriate. Cleans up someBharat Mediratta
grotty looking stuff in themes.
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-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 the concept of "permanent" messages that we show to admins. UseBharat Mediratta
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-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-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-21Report actual log entries in the "log entries" admin block.Bharat Mediratta
2008-12-21Add a logging facility, and instrument login/logout to use it.Bharat Mediratta
2008-12-20Add "created" and "updated" timestamps to the items table.Bharat 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-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-16Remove error checking; if this fails let it fail noisily for now so that we ↵Bharat Mediratta
can find problems faster.
2008-12-16Various optimizations:Bharat Mediratta
o Add model_cache::get() which caches models avoiding duplicate lookups o Stop using ORM relationships for Item_Model::owner so that we can use caching o For Item_Model::xxx_edit fields, don't make them editable for guests o Other minor stuff. These optimizations reduce the number of queries for a 9-photos page from ~200 to ~45. Still way too many!
2008-12-12Change the resize option on creating thumbnails and resizes to Image::AUTO ↵Tim Almdal
which will preserve the aspect ratio of the original image
2008-12-12Get rid of all pseudo users and pseudo groups, while preserving allBharat Mediratta
other functionality. This makes our user/group and access code fully consistent.
2008-12-11Change the name of the implmentation of module parameters to module varsTim Almdal
2008-12-10Create a module parameter table. This will be useful if a module wants to ↵Tim Almdal
store information, but is not enough to warrant a table of its own
2008-12-07Leave all locking in ORM_MPTT::move_to, don't worry about it inBharat Mediratta
Item_Model::move_to, unless it turns out that we really need to.
2008-12-07Rename moveTo to move_to and extend the test a bit.Bharat Mediratta
2008-12-05* Add a moveTo unit testTim Almdal
* Pass the module::event(..., $data) by reference to the handlers
2008-12-04Moving albums around with a drag and drop interface seems to work and ↵Tim Almdal
preserve the left right pointers. * changed _lock and _unlock to protected methods lock and lock respectively * added a moveTo method on the Item_Model * Corrected the hole closure on delete. * added moveTo on the ORM_MTPP class * Changed the rearrange javascript to do moves with ajax
2008-12-04Add unit tests to test growing and contracting the left and right pointersTim Almdal
Added a delete method to ORM_MPTT that contracts the tree when an item is deleted
2008-12-04Before deleting an item, save the path to the image in the var directory as ↵Tim Almdal
once the item is deleted, the $item->file_path() is no longer valid.
2008-12-03Rename file::unlink() to dir::unlink(). This creates an API that isBharat Mediratta
clearer about its actions, otherwise we may accidentally blow away an entire hierarchy when we think we're deleting a single file (there's a reason why rm won't let you delete dirs that aren't empty!) Name it "dir" instead of "directory" because apparently "directory" is already reserved. Move the delete call out of Items_Controller and into the model. The model is responsible for keeping state integrity, not the controller.
2008-12-02The rearrange module will now add an album if you drag the "new album" onto ↵Tim Almdal
the album tree. I haven't had a chance to figure out why the form does get any styling or why a textarea is no included as a list item.
2008-12-01Prototype access control model. There's much left to do, but it's aBharat Mediratta
working implementation.
2008-11-29Add access model (not fully baked yet).Bharat Mediratta
Update scaffolding to allow addition of just albums (helpful for testing permissions)
2008-11-25Don't add in-place-edit CSS unless there's a logged-in user.Bharat Mediratta
2008-11-24Remove the has_many_and_belongs_to_many relations from the item modelTim Almdal
2008-11-23Tag module database definitionsTim Almdal
2008-11-21Revert module block approachTim Almdal
2008-11-20A look at away to allow modules to define html head contents (links and js) ↵Tim Almdal
and also allow modules to contribute blocks to the layout.
2008-11-20Correct typoTim Almdal
2008-11-19Create url::abs_site() and url::abs_file() to allow us to generateBharat Mediratta
full URLs with a clean API, and isolate the cruddy party where we have to hardcode the server protocol into a single file.
2008-11-19Fix broken path in url()Bharat Mediratta
Fix some style issues
2008-11-19Add the original item height and width to the item tableTim Almdal
2008-11-19Update the media rss template to include the resize and the fullsizeTim Almdal
added descendants by type method to the item model to allow for the selection of children by type
2008-11-19Cleanup media rss feedTim Almdal
added parameters to thumbnail_url and resizes_url to be passed to the url::base call to generate ful urls
2008-11-19add the mime type column on the item tableTim Almdal
2008-11-19Change Media_RSS_Controller so that it does not extend REST_Controller, since itBharat Mediratta
doesn't refer to a fixed resource or collection of resources. Fix some minor bugs in the code so that we can actually generate a feed. It looks pretty cool! Improved pagination links, but didn't actually test them.
2008-11-19The continuing evolution of the slideshow...Tim Almdal
1) added a mime_type property to the item module(no database change) 2) created a media_rss module 3) moved most of the functionality for the downloading the images to the media_rss module