Modularize file transforms and provide a "transforms" UI

Summary:
Ref T7707. Available transforms are currently relatively hard-coded and don't really have any support UI.

Modularize them so we can build some support UI.

This doesn't actually //use// any of the new stuff yet: I want to make a clean cutover once I fix the aspect ratio stuff so I can pick up a cachekey/URI change as a side effect.

Test Plan: {F400524}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: chad, epriestley

Maniphest Tasks: T7707

Differential Revision: https://secure.phabricator.com/D12808
This commit is contained in:
epriestley
2015-05-12 06:16:18 -07:00
parent ae32d1afb8
commit c998e44b5a
9 changed files with 319 additions and 16 deletions

View File

@@ -170,6 +170,12 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
->setWorkflow(true)
->setDisabled(!$can_edit));
$view->addAction(
id(new PhabricatorActionView())
->setName(pht('View Transforms'))
->setIcon('fa-crop')
->setHref($this->getApplicationURI("/transforms/{$id}/")));
return $view;
}
@@ -267,7 +273,6 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
$user->renderHandleList($phids));
}
if ($file->isViewableImage()) {
$image = phutil_tag(
'img',