mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-02 02:40:58 +01:00
UI Improvements to Chatlog Application
Summary: Made improvements to the Chatlog application UI. Added Header & crumbs. Added service name and service type to the channel list table. Test Plan: By checking out the chatlog application. Reviewers: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5079
This commit is contained in:
parent
be7677f211
commit
0cdce03b52
2 changed files with 50 additions and 4 deletions
|
@ -20,21 +20,47 @@ final class PhabricatorChatLogChannelListController
|
||||||
'href' =>
|
'href' =>
|
||||||
'/chatlog/channel/'.$channel->getID().'/',
|
'/chatlog/channel/'.$channel->getID().'/',
|
||||||
),
|
),
|
||||||
$channel->getChannelName()));
|
$channel->getChannelName()),
|
||||||
|
$channel->getServiceName(),
|
||||||
|
$channel->getServiceType());
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = new AphrontTableView($rows);
|
$table = new AphrontTableView($rows);
|
||||||
$table->setHeaders(
|
$table->setHeaders(
|
||||||
array(
|
array(
|
||||||
'Channel',
|
'Channel',
|
||||||
|
'Service Name',
|
||||||
|
'Service Type',
|
||||||
));
|
));
|
||||||
$table->setColumnClasses(
|
$table->setColumnClasses(
|
||||||
array(
|
array(
|
||||||
'pri wide',
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
));
|
||||||
|
|
||||||
|
$title = pht('Channel List.');
|
||||||
|
|
||||||
|
$header = id(new PhabricatorHeaderView())
|
||||||
|
->setHeader($title);
|
||||||
|
|
||||||
|
$panel = id(new AphrontPanelView())
|
||||||
|
->setNoBackground(true);
|
||||||
|
|
||||||
|
$crumbs = $this
|
||||||
|
->buildApplicationCrumbs()
|
||||||
|
->addCrumb(
|
||||||
|
id(new PhabricatorCrumbView())
|
||||||
|
->setName(pht('Channel List'))
|
||||||
|
->setHref($this->getApplicationURI()));
|
||||||
|
|
||||||
|
$panel->appendChild(
|
||||||
|
array(
|
||||||
|
$crumbs,
|
||||||
|
$header,
|
||||||
|
$table
|
||||||
));
|
));
|
||||||
|
|
||||||
$panel = new AphrontPanelView();
|
|
||||||
$panel->appendChild($table);
|
|
||||||
|
|
||||||
return $this->buildStandardPageResponse(
|
return $this->buildStandardPageResponse(
|
||||||
$panel,
|
$panel,
|
||||||
|
|
|
@ -4,9 +4,11 @@ final class PhabricatorChatLogChannelLogController
|
||||||
extends PhabricatorChatLogController {
|
extends PhabricatorChatLogController {
|
||||||
|
|
||||||
private $channelID;
|
private $channelID;
|
||||||
|
private $channelName;
|
||||||
|
|
||||||
public function willProcessRequest(array $data) {
|
public function willProcessRequest(array $data) {
|
||||||
$this->channelID = $data['channelID'];
|
$this->channelID = $data['channelID'];
|
||||||
|
$this->channelName = $data['channelName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function processRequest() {
|
public function processRequest() {
|
||||||
|
@ -24,6 +26,16 @@ final class PhabricatorChatLogChannelLogController
|
||||||
->setViewer($user)
|
->setViewer($user)
|
||||||
->withChannelIDs(array($this->channelID));
|
->withChannelIDs(array($this->channelID));
|
||||||
|
|
||||||
|
$channels = id(new PhabricatorChatLogChannelQuery())
|
||||||
|
->setViewer($user)
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
foreach ($channels as $channel) {
|
||||||
|
if ($channel->getID() == $this->channelID) {
|
||||||
|
$this->channelName = $channel->getChannelName();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
list($after, $before, $map) = $this->getPagingParameters($request, $query);
|
list($after, $before, $map) = $this->getPagingParameters($request, $query);
|
||||||
|
|
||||||
|
@ -122,10 +134,18 @@ final class PhabricatorChatLogChannelLogController
|
||||||
array($author, $message, $timestamp));
|
array($author, $message, $timestamp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$crumbs = $this
|
||||||
|
->buildApplicationCrumbs()
|
||||||
|
->addCrumb(
|
||||||
|
id(new PhabricatorCrumbView())
|
||||||
|
->setName($this->channelName)
|
||||||
|
->setHref($uri));
|
||||||
|
|
||||||
$form = id(new AphrontFormView())
|
$form = id(new AphrontFormView())
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
->setMethod('GET')
|
->setMethod('GET')
|
||||||
->setAction($uri)
|
->setAction($uri)
|
||||||
|
->appendChild($crumbs)
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextControl())
|
id(new AphrontFormTextControl())
|
||||||
->setLabel('Date')
|
->setLabel('Date')
|
||||||
|
|
Loading…
Reference in a new issue