1
0
Fork 0
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:
Afaque Hussain 2013-02-22 10:08:25 -08:00 committed by epriestley
parent be7677f211
commit 0cdce03b52
2 changed files with 50 additions and 4 deletions

View file

@ -20,21 +20,47 @@ final class PhabricatorChatLogChannelListController
'href' =>
'/chatlog/channel/'.$channel->getID().'/',
),
$channel->getChannelName()));
$channel->getChannelName()),
$channel->getServiceName(),
$channel->getServiceType());
}
$table = new AphrontTableView($rows);
$table->setHeaders(
array(
'Channel',
'Service Name',
'Service Type',
));
$table->setColumnClasses(
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(
$panel,

View file

@ -4,9 +4,11 @@ final class PhabricatorChatLogChannelLogController
extends PhabricatorChatLogController {
private $channelID;
private $channelName;
public function willProcessRequest(array $data) {
$this->channelID = $data['channelID'];
$this->channelName = $data['channelName'];
}
public function processRequest() {
@ -24,6 +26,16 @@ final class PhabricatorChatLogChannelLogController
->setViewer($user)
->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);
@ -122,10 +134,18 @@ final class PhabricatorChatLogChannelLogController
array($author, $message, $timestamp));
}
$crumbs = $this
->buildApplicationCrumbs()
->addCrumb(
id(new PhabricatorCrumbView())
->setName($this->channelName)
->setHref($uri));
$form = id(new AphrontFormView())
->setUser($user)
->setMethod('GET')
->setAction($uri)
->appendChild($crumbs)
->appendChild(
id(new AphrontFormTextControl())
->setLabel('Date')