a branch to work on simplifying the media component, removing the API-based stuff in the slots in favor of direct database relationships



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/branches/simplemedia@109 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Defined schema for media item<->slot relationship



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/branches/simplemedia@111 c89fab08-2f9b-42bf-8176-bd3ad6bee547
It works (no migration task yet). However Doctrine isn't leveraging the LEFT JOINs I added to queryWithSlots, so we're making lots of extra queries for media, which is not acceptable. Dan's going to help me track that down



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/branches/simplemedia@134 c89fab08-2f9b-42bf-8176-bd3ad6bee547
no more apostrophe:refresh for our standard slots
First attempt at migration for media slot contents
Turned off API by default 
Some documentation



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/branches/simplemedia@136 c89fab08-2f9b-42bf-8176-bd3ad6bee547
100% API free (you can enable the API for use by other projects etc. but it's off by default and our slots never use it etc.)
Migration code added to the apostrophe:migrate-data-from-pkcontextcms task to handle this change. It's safe to run on a previously migrated site
Tomorrow I'll try to turn the media plugin into an engine if I can do it swiftly. If not I'll merge with this and then look at that as a separate project



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/branches/simplemedia@138 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Branch commit before the merge:
Media is now an engine.
There's always an instance at /admin/media (it's in the fixtures and in the data migration task).
You can make more instances.
You can categorize media.
You can lock media engine pages down to particular categories.



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/branches/simplemedia@173 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Media is now an engine.
There's always an instance at /admin/media (it's in the fixtures and in the data migration task).
You can make more instances.
You can categorize media.
You can lock media engine pages down to particular categories.

YOU NEED TO RUN ./symfony apostrophe:migrate-data-from-pkcontextcms --env=appropriateenvironmentname

After updating to this latest version. You will get warnings about things that can't be done because they
were already done on previous runs of the task. That's OK.

You do NOT need to run the code migration task, only the data migration task.

Note that the media module will move to /admin/media as a result of this change.



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@175 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Geez break a little thing like navigation and people seem concerned for some reason



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@180 c89fab08-2f9b-42bf-8176-bd3ad6bee547
won't try to create /admin and /admin/media more than once



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@182 c89fab08-2f9b-42bf-8176-bd3ad6bee547
cleaned up media subnav and there are some half-finished features in development that should effect any checkouts over the weekend.

git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@185 c89fab08-2f9b-42bf-8176-bd3ad6bee547
_choose partial used by the media slots targets the /admin/media engine page specifically so we don't wind up at a public version of the media engine.
aRouteTools::pushTargetEnginePage() now accepts a page slug as an alternative to a page object, for convenience when targeting a page that is guaranteed to exist, such as /admin/media.



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@188 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Added aMediaItemTable::findByIdsInOrder() method, which is handy now that we're not using the media REST API internally anymore. It takes an array of ids (typically split on commas from aMediaIds) and returns whatever valid, still-existing images were on that list, in the same order specified. A lot of programmers don't realize that a simple whereIn call does NOT preserve order at all.

Documented the need to call select('m.*') or similar explicitly if you call aDoctrine::orderByList($q, $ids) to order your results. This is because aDoctrine::orderByList must add a select alias for use in ordering the results. That overrides the default "select everything" behavior. I see no good way around this since you might make your explicit select() call later, causing problems if I tried to do the "select everything" in orderByList. At least select() calls are cumulative.

aDoctrine::orderByList returns the query, it's still not fully chainable but it's a little less inconvenient.

Added aTools::getCurrentNonAdminPage, a convenience to return the current page only if it does not have the admin flag. Useful in layout.php, where you don't want to generate conventional navigation links for apostrophe-menu admin pages.

aArray::getIds() just got a lot smarter. It can handle Stdclass objects, and it will look for a ->id property before it resorts to calling getId on objects. 

No more warnings from the breadcrumb or layout when the page is an admin page.



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@189 c89fab08-2f9b-42bf-8176-bd3ad6bee547
* When the media engine is being accessed as an admin page (via /admin/media), it refuses access unless you have editing privileges either in the CMS or in media.
* aAdmin module for the /admin page. Currently just redirects to the home page, might do more later (there are other administrative things with URLs that begin with /admin of course and the apostrophe menu already gets you to them).
* Data migration task correctly sets the /admin page to use the aAdmin action.



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@191 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Virtual pages are now supported: you can specify a particular virtual page slug with the slug option to a_slot and a_area, as an alternative to 'global' => true, which still works and is equivalent to 'slug' => 'global'. This is the right way to handle groups of related content that are not part of the page structure. With this feature you can allow users to edit personal biographies, etc. using CMS areas and then include them at appropriate points in the site. For details see the README.

You can now pass an explicit 'edit' => true option to specific slots and areas to make them editable by the current user, regardless of whether they would otherwise have privileges to do so. This feature is also necessary to implement features such as editing user biographies as CMS areas. Use it whenever the right to edit CMS content depends on something external to the CMS.

The allowed_types option to a_area works properly again. We were caching a little too zealously.

Various outdated attributes calls that still tried to specify a namespace were removed. We should consider naming our attributes with a prefix to prevent conflicts.



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@192 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Styled Media Categories Subnav, Added IE Stylesheet, Reworked A-BTN to not longer inject extra markup, Tested new Buttons in IE7 and 8, New Styles for A-BTN using CSS3, Updated aAdmin templates to use A-SUBNAV Slot, Lots of CSS Cleaning and Streamlining, Base Form Styles for ALL a-forms

git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@195 c89fab08-2f9b-42bf-8176-bd3ad6bee547
Delete page confirmation message now suggests unpublishing, not archiving
Subnav no longer shows drag handles for users without suitable privileges



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@196 c89fab08-2f9b-42bf-8176-bd3ad6bee547
cleaned up navigation component documentation



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@197 c89fab08-2f9b-42bf-8176-bd3ad6bee547
CSS and Adjustments for Media and Button Slots

git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@198 c89fab08-2f9b-42bf-8176-bd3ad6bee547
We'll come back to this idea no doubt, but with the API changes and the availability of public media engine pages, it's not a priority anymore



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@199 c89fab08-2f9b-42bf-8176-bd3ad6bee547
CSRF protection for all forms. We'll be looking into protection for non-form-based actions as well



git-svn-id: http://svn.apostrophenow.org/plugins/apostrophePlugin/trunk@201 c89fab08-2f9b-42bf-8176-bd3ad6bee547