Summary: images attached to maniphest tasks and mentioned in remarkup anywhere now invoke a lightbox control that lets the user page through all the images. lightbox includes a download button, next / prev buttons, and if we're not at the tippy toppy of hte page an "X" or close button. we also respond to left, right, and esc for navigating. next time we should get non-images working in here...! Test Plan: played with maniphest - looks good made comments with images. looks good. made sure multiple image comments worked. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin, chad Maniphest Tasks: T1896 Differential Revision: https://secure.phabricator.com/D3705
65 lines
1.9 KiB
PHP
65 lines
1.9 KiB
PHP
<?php
|
|
|
|
/*
|
|
* Copyright 2012 Facebook, Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
final class PhabricatorApplicationFiles extends PhabricatorApplication {
|
|
|
|
public function getBaseURI() {
|
|
return '/file/';
|
|
}
|
|
|
|
public function getShortDescription() {
|
|
return 'Store and Share Files';
|
|
}
|
|
|
|
public function getAutospriteName() {
|
|
return 'files';
|
|
}
|
|
|
|
public function getTitleGlyph() {
|
|
return "\xE2\x87\xAA";
|
|
}
|
|
|
|
public function getFlavorText() {
|
|
return pht('Blob store for Pokemon pictures.');
|
|
}
|
|
|
|
public function getApplicationGroup() {
|
|
return self::GROUP_UTILITIES;
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/F(?P<id>[1-9]\d*)' => 'PhabricatorFileShortcutController',
|
|
'/file/' => array(
|
|
'' => 'PhabricatorFileListController',
|
|
'filter/(?P<filter>\w+)/' => 'PhabricatorFileListController',
|
|
'upload/' => 'PhabricatorFileUploadController',
|
|
'dropupload/' => 'PhabricatorFileDropUploadController',
|
|
'delete/(?P<id>[1-9]\d*)/' => 'PhabricatorFileDeleteController',
|
|
'info/(?P<phid>[^/]+)/' => 'PhabricatorFileInfoController',
|
|
'data/(?P<key>[^/]+)/(?P<phid>[^/]+)/.*'
|
|
=> 'PhabricatorFileDataController',
|
|
'proxy/' => 'PhabricatorFileProxyController',
|
|
'xform/(?P<transform>[^/]+)/(?P<phid>[^/]+)/(?P<key>[^/]+)/'
|
|
=> 'PhabricatorFileTransformController',
|
|
),
|
|
);
|
|
}
|
|
|
|
}
|