Commit Graph

53 Commits

Author SHA1 Message Date
Bharat Mediratta
453e15f502 Throw an exception when we can't upload a file. This is not the best solution, but it works for now. 2008-11-12 10:11:05 +00:00
Felix Rabinovich
7423c755c0 aliasing owner to user 2008-11-12 08:30:55 +00:00
Bharat Mediratta
51c64f1d28 Create a simple benchmark that loads 500 localized messages and performs
500 localizations on them.
2008-11-12 00:05:47 +00:00
Bharat Mediratta
a15c7cb11f Change the PUT/DELETE tunneling param from __action to _method
to be like Rails.
2008-11-11 13:11:20 +00:00
Jozef Selesi
1651b3fe85 Move scaffolding code out of the comments controller to welcome.php. 2008-11-11 12:20:20 +00:00
Tim Almdal
bba5289035 Change Album and Photo controllers to set the user object as a global variable; change the header so it links to the user controllers; and add the user controllers which don't do anything. 2008-11-11 07:39:20 +00:00
Bharat Mediratta
87f1115113 Change REST API to use non-routable functions: _get(), _post(),
_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-11 07:29:48 +00:00
Bharat Mediratta
d35f337b7b Add phpdocs to explain how to use REST_Controller 2008-11-11 06:24:30 +00:00
Bharat Mediratta
dae36c2aa4 Create REST_Controller abstract base class for all REST based resource
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-11 06:18:45 +00:00
Bharat Mediratta
ffa39aabb9 Manually delete the auth table and module entry to ease transitions for devs. 2008-11-10 21:55:27 +00:00
Tim Almdal
d4415d0d3e Reset the links in the header and update the readme 2008-11-10 16:36:56 +00:00
Bharat Mediratta
ceb0782233 Add support for multi-file-upload using jquery.MultiFile and modify
Item_Controller to accept it.
2008-11-10 12:28:58 +00:00
Tim Almdal
8858b957b0 The start of the login functionality. It shows the login popup but doesn't do anything else. Just got tire of my changes being clobbered :-) 2008-11-10 03:17:56 +00:00
Bharat Mediratta
b5f2443bb5 Add the ability to create albums to the scaffolding
Revert $_POST back to $this->input->post() because that supports default values.
2008-11-10 00:25:59 +00:00
Bharat Mediratta
c054b4de04 Convert quote styles
Convert $this->input->post to $_POST
2008-11-10 00:16:03 +00:00
Bharat Mediratta
e7155c09c5 Implement Item_Controller::put() and delete()
Adjust/simplify photo::create
Add image uploading to the scaffolding
2008-11-09 23:40:28 +00:00
Bharat Mediratta
1b490c5fe6 Make Gallery3 more RESTful.
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-09 19:20:23 +00:00
Bharat Mediratta
950c58e6d3 Add support for in-place editing of data fields. 2008-11-08 09:28:11 +00:00
Bharat Mediratta
ea7cc4f46e Simplify the way that we find the user id (just look it up, and if there's a database exception use the null value) 2008-11-08 07:27:46 +00:00
Felix Rabinovich
28b739a210 Adding user (owner) to items; info module 2008-11-08 07:18:56 +00:00
Bharat Mediratta
dc90ad9739 Change add() to add photos:albums at a ratio of 10:1 2008-11-07 10:46:06 +00:00
Bharat Mediratta
76436c0029 Add automatic pagination. All you have to do is add <?= $theme->pager
?> 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-07 07:33:43 +00:00
Bharat Mediratta
6b5b5ec3a6 Use jquery.cookie to keep the same tab open when you refresh
Add a switch to turn profiling on/off
2008-11-07 05:49:45 +00:00
Bharat Mediratta
6f1c46da6e Oops, these files got left out of r18525. 2008-11-06 10:22:34 +00:00
Bharat Mediratta
6cafc61f96 album::set_thumbnail is now part of Item_Model so it can go.
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-06 05:51:20 +00:00
Bharat Mediratta
d6e942f2e3 Add quick-link to the deepest photo to test hierarchical navigation 2008-11-06 04:56:50 +00:00
Chad Kieffer
c4407f7bda spruce up the display of commands 2008-11-06 04:37:28 +00:00
Bharat Mediratta
cf27982466 When uninstalling the core, uninstall all the other modules first.
Otherwise, when you reinstall the other module's tables are still
hanging around and interfere with their install.
2008-11-06 03:58:37 +00:00
Bharat Mediratta
2738d4b6a6 Fix a typo. 2008-11-06 03:55:32 +00:00
Bharat Mediratta
91a0236f8c Guard the module loading code against database errors (in case the database isn't configured yet) 2008-11-05 22:29:42 +00:00
Bharat Mediratta
24787b5545 remove tabs 2008-11-05 17:32:59 +00:00
Bharat Mediratta
3feb0b288b Add info section with MPTT graphs 2008-11-05 09:50:20 +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
d21f3437e6 Add the photo controller, and tie it to the photo page in our theme.
Implement a real breadcrumb.
2008-11-05 07:42:52 +00:00
Bharat Mediratta
00513a71d2 Report the number of photos/albums 2008-11-05 06:17:35 +00:00
Bharat Mediratta
b82332192a The carousel block is now off into its own module. The
sidebar.html.php file loops over $theme->blocks() which in turn calls
carousel::block() which uses the Block object to create a standard
block UI.  Hooray!
2008-11-05 05:20:20 +00:00
Tim Almdal
f7560a7e8b Don't overwrite the version number of installed modules when searching for uninstalled modules. 2008-11-05 04:32:58 +00:00
Bharat Mediratta
836874ba68 Updated for new MPTT API 2008-11-05 03:24:09 +00:00
Bharat Mediratta
f011971ade Further simplify the code. 2008-11-05 01:08:16 +00:00
Bharat Mediratta
667d79c705 _readModules -> _readModules
Simplify the installer-detection code.
2008-11-05 01:05:21 +00:00
Tim Almdal
da286fbf6b Clean up camel humped names and move private function to bottom of file 2008-11-05 00:07:16 +00:00
Tim Almdal
d0629584b5 Have the scaffolding code see what what modules are available and list whether they need to be installed or uninstalled. 2008-11-04 22:18:00 +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
ade1650846 Add a test to detect tabs in our code, and convert all tabs to spaces
so that the test passes.
2008-11-04 05:22:06 +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
fa9dda4c01 Create an initial attempt at the album controller, set it up with a default route
and add a link to it from the welcome page.
2008-11-03 05:55:34 +00:00
Bharat Mediratta
7d2c828a4c Put info about installed modules directly into the scaffolding page,
and create methods to install/uninstall modules.
2008-11-03 00:27:35 +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
Bharat Mediratta
231117b4a3 Change this to be inline instead of an iframe, and fix it up so that
it walks you through creating the database also.
2008-11-02 21:12:15 +00:00
Bharat Mediratta
d742de4e11 Improve welcome scaffolding to walk you through getting the var
directory set up correctly and a database config file in place.
2008-11-02 19:56:57 +00:00