mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-08 22:01:03 +01:00
bdc517485c
Summary: Ref T8980. Move away from events to EngineExtensions. This also simplifies hovercards a bit: - Removes tasks from revision cards. - Removes blockers/blocked from task cards. - Removes "Send Message" from user cards. These mostly felt cluttery to me. Open to arguments to retain them. I think we can make better use of the space, though (e.g., flags, projects + board columns). Test Plan: - Viewed people, task, revision, commit and project hovercards. {F1043256} {F1043257} Reviewers: chad Reviewed By: chad Maniphest Tasks: T8980 Differential Revision: https://secure.phabricator.com/D14878
55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
|
|
final class PhabricatorHovercardEngineExtensionModule
|
|
extends PhabricatorConfigModule {
|
|
|
|
public function getModuleKey() {
|
|
return 'hovercardengine';
|
|
}
|
|
|
|
public function getModuleName() {
|
|
return pht('Engine: Hovercards');
|
|
}
|
|
|
|
public function renderModuleStatus(AphrontRequest $request) {
|
|
$viewer = $request->getViewer();
|
|
|
|
$extensions = PhabricatorHovercardEngineExtension::getAllExtensions();
|
|
|
|
$rows = array();
|
|
foreach ($extensions as $extension) {
|
|
$rows[] = array(
|
|
$extension->getExtensionOrder(),
|
|
$extension->getExtensionKey(),
|
|
get_class($extension),
|
|
$extension->getExtensionName(),
|
|
$extension->isExtensionEnabled()
|
|
? pht('Yes')
|
|
: pht('No'),
|
|
);
|
|
}
|
|
|
|
$table = id(new AphrontTableView($rows))
|
|
->setHeaders(
|
|
array(
|
|
pht('Order'),
|
|
pht('Key'),
|
|
pht('Class'),
|
|
pht('Name'),
|
|
pht('Enabled'),
|
|
))
|
|
->setColumnClasses(
|
|
array(
|
|
null,
|
|
null,
|
|
null,
|
|
'wide pri',
|
|
null,
|
|
));
|
|
|
|
return id(new PHUIObjectBoxView())
|
|
->setHeaderText(pht('HovercardEngine Extensions'))
|
|
->setTable($table);
|
|
}
|
|
|
|
}
|