mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 04:42:40 +01:00
Add some descriptive properties when viewing a Calendar import
Summary: Ref T10747. When viewing an import detail page, show a little more information about what you're looking at. Test Plan: {F1876957} Reviewers: chad Reviewed By: chad Maniphest Tasks: T10747 Differential Revision: https://secure.phabricator.com/D16726
This commit is contained in:
parent
89f0015ae6
commit
5039b9ca28
3 changed files with 37 additions and 0 deletions
|
@ -151,6 +151,17 @@ final class PhabricatorCalendarImportViewController
|
|||
$properties = id(new PHUIPropertyListView())
|
||||
->setViewer($viewer);
|
||||
|
||||
$engine = $import->getEngine();
|
||||
|
||||
$properties->addProperty(
|
||||
pht('Source Type'),
|
||||
$engine->getImportEngineTypeName());
|
||||
|
||||
$engine->appendImportProperties(
|
||||
$viewer,
|
||||
$import,
|
||||
$properties);
|
||||
|
||||
return $properties;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,28 @@ final class PhabricatorCalendarICSImportEngine
|
|||
return pht('Import .ics File');
|
||||
}
|
||||
|
||||
public function getImportEngineTypeName() {
|
||||
return pht('.ics File');
|
||||
}
|
||||
|
||||
public function getImportEngineHint() {
|
||||
return pht('Import an event in ".ics" (iCalendar) format.');
|
||||
}
|
||||
|
||||
|
||||
public function appendImportProperties(
|
||||
PhabricatorUser $viewer,
|
||||
PhabricatorCalendarImport $import,
|
||||
PHUIPropertyListView $properties) {
|
||||
|
||||
$phid_key = PhabricatorCalendarImportICSFileTransaction::PARAMKEY_FILE;
|
||||
$file_phid = $import->getParameter($phid_key);
|
||||
|
||||
$properties->addProperty(
|
||||
pht('Source File'),
|
||||
$viewer->renderHandle($file_phid));
|
||||
}
|
||||
|
||||
public function newEditEngineFields(
|
||||
PhabricatorEditEngine $engine,
|
||||
PhabricatorCalendarImport $import) {
|
||||
|
|
|
@ -9,8 +9,16 @@ abstract class PhabricatorCalendarImportEngine
|
|||
|
||||
|
||||
abstract public function getImportEngineName();
|
||||
abstract public function getImportEngineTypeName();
|
||||
abstract public function getImportEngineHint();
|
||||
|
||||
public function appendImportProperties(
|
||||
PhabricatorUser $viewer,
|
||||
PhabricatorCalendarImport $import,
|
||||
PHUIPropertyListView $properties) {
|
||||
return;
|
||||
}
|
||||
|
||||
abstract public function newEditEngineFields(
|
||||
PhabricatorEditEngine $engine,
|
||||
PhabricatorCalendarImport $import);
|
||||
|
|
Loading…
Reference in a new issue