Commit Graph

27 Commits

Author SHA1 Message Date
Tim Almdal
d7288d33e6 Remove the has_many_and_belongs_to_many relations from the item model 2008-11-24 05:55:29 +00:00
Tim Almdal
ab20406ef2 Tag module database definitions 2008-11-23 18:00:44 +00:00
Tim Almdal
992cf22c79 Revert module block approach 2008-11-21 07:06:11 +00:00
Tim Almdal
b78cee6395 A look at away to allow modules to define html head contents (links and js) and also allow modules to contribute blocks to the layout. 2008-11-20 17:32:58 +00:00
Tim Almdal
d48d71a705 Correct typo 2008-11-20 00:22:36 +00:00
Bharat Mediratta
4a4eac31ad Create url::abs_site() and url::abs_file() to allow us to generate
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-19 23:33:50 +00:00
Bharat Mediratta
1b36ce6c7e Fix broken path in url()
Fix some style issues
2008-11-19 22:47:30 +00:00
Tim Almdal
103bd8e8d2 Add the original item height and width to the item table 2008-11-19 22:45:30 +00:00
Tim Almdal
b3314fc1dc Update the media rss template to include the resize and the fullsize
added descendants by type method to the item model to allow for the selection of children by type
2008-11-19 18:23:30 +00:00
Tim Almdal
e14d5574b6 Cleanup media rss feed
added parameters to thumbnail_url and resizes_url to be passed to the url::base call to generate ful urls
2008-11-19 06:05:38 +00:00
Tim Almdal
c7b2090f0c add the mime type column on the item table 2008-11-19 03:29:53 +00:00
Bharat Mediratta
df4832bf6f Change Media_RSS_Controller so that it does not extend REST_Controller, since it
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-19 03:17:56 +00:00
Tim Almdal
ad7ace9b72 The continuing evolution of the slideshow...
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
2008-11-19 02:31:20 +00:00
Bharat Mediratta
db6061096e Item / Owner changes.
* 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-15 08:44:01 +00:00
Felix Rabinovich
6dbf5ae172 Clean user / item relationship. Upload files gets the ownership of current user; and the views don't break if user module is not installed 2008-11-15 08:19:14 +00:00
Felix Rabinovich
7423c755c0 aliasing owner to user 2008-11-12 08:30:55 +00:00
Bharat Mediratta
950c58e6d3 Add support for in-place editing of data fields. 2008-11-08 09:28:11 +00:00
Bharat Mediratta
418c0aab69 Create permanent owner_id column in the item table, and use a soft
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-08 07:48:36 +00:00
Felix Rabinovich
28b739a210 Adding user (owner) to items; info module 2008-11-08 07:18:56 +00:00
Bharat Mediratta
ae00f73944 * Add thumbnail and resize dimensions to the item table and use them
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-05 09:42:47 +00:00
Bharat Mediratta
e35c154414 Style/doc cleanups. 2008-11-05 07:57:59 +00:00
Bharat Mediratta
e44ff9bb60 ORM_MPTT::parents() should not include the node itself. 2008-11-05 07:47:19 +00:00
Bharat Mediratta
581e931c43 Change the default theme to actually render what's in the Gallery.
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-05 07:13:46 +00:00
Bharat Mediratta
605d2de336 Lots of new stuff!
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-04 21:24:42 +00:00
Bharat Mediratta
630b0f26fc Restructure the theme code to be more like WordPress / Habari. Now,
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-04 05:02:37 +00:00
Bharat Mediratta
019ea9cd35 Rename columns lft/rgt to left/right. 2008-11-03 02:05:11 +00:00
Bharat Mediratta
e173f36bcb Create some basic infrastructure:
* 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
2008-11-02 23:55:09 +00:00