1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

Add ObjectBox around Diffusion Binary Files

Summary: Add in more ObjectBoxes

Test Plan: Test aphlict.swf, see new menu and button to download.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D8305
This commit is contained in:
Chad Little 2014-02-22 14:08:04 -08:00
parent 8662b27f89
commit a4d4bf8196

View file

@ -871,15 +871,23 @@ final class DiffusionBrowseFileController extends DiffusionBrowseController {
} }
private function buildBinaryCorpus($file_uri, $data) { private function buildBinaryCorpus($file_uri, $data) {
$properties = new PHUIPropertyListView();
$size = strlen($data); $size = new PhutilNumber(strlen($data));
$properties->addTextContent( $text = pht('This is a binary file. It is %s byte(s) in length.', $size);
pht( $text = id(new PHUIBoxView())
'This is a binary file. It is %s byte(s) in length.', ->addPadding(PHUI::PADDING_LARGE)
new PhutilNumber($size))); ->appendChild($text);
return $properties; $file = $this->renderFileButton($file_uri);
$header = id(new PHUIHeaderView())
->setHeader(pht('Details'))
->addActionLink($file);
$box = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($text);
return $box;
} }
private function buildBeforeResponse($before) { private function buildBeforeResponse($before) {