1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Show shorter time in Conpherence, revisit spacing/colors

Summary: This adds a parameter for time only on Conpherence Transactions, although grepping around, Conpherence might be the only user of this View at this point. Since we have the date markers separately, we can use just the timestamp for a cleaner feel. Also updated a bit of the spacing and colors to match Conpherence Full. Ref T7531

Test Plan:
A lot of Photoshop, and different types of chats.

{F336204}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7531

Differential Revision: https://secure.phabricator.com/D12049
This commit is contained in:
Chad Little 2015-03-12 11:21:12 -07:00
parent bcc6d90e7b
commit f77c5c514b
5 changed files with 44 additions and 19 deletions

View file

@ -44,7 +44,7 @@ return array(
'rsrc/css/application/config/config-welcome.css' => '6abd79be',
'rsrc/css/application/config/setup-issue.css' => '22270af2',
'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2',
'rsrc/css/application/conpherence/durable-column.css' => '587fc261',
'rsrc/css/application/conpherence/durable-column.css' => 'e3433ca7',
'rsrc/css/application/conpherence/menu.css' => 'c6ac5299',
'rsrc/css/application/conpherence/message-pane.css' => '5930260a',
'rsrc/css/application/conpherence/notification.css' => '04a6e10a',
@ -514,7 +514,7 @@ return array(
'changeset-view-manager' => '88be0133',
'config-options-css' => '7fedf08b',
'config-welcome-css' => '6abd79be',
'conpherence-durable-column-view' => '587fc261',
'conpherence-durable-column-view' => 'e3433ca7',
'conpherence-menu-css' => 'c6ac5299',
'conpherence-message-pane-css' => '5930260a',
'conpherence-notification-css' => '04a6e10a',

View file

@ -55,18 +55,18 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
case ConpherenceTransactionType::TYPE_TITLE:
if ($old && $new) {
$title = pht(
'%s renamed this conpherence from "%s" to "%s".',
'%s renamed this Thread from "%s" to "%s".',
$this->renderHandleLink($author_phid),
$old,
$new);
} else if ($old) {
$title = pht(
'%s deleted the conpherence name "%s".',
'%s deleted the Thread name "%s".',
$this->renderHandleLink($author_phid),
$old);
} else {
$title = pht(
'%s named this conpherence "%s".',
'%s named this Thread "%s".',
$this->renderHandleLink($author_phid),
$new);
}

View file

@ -79,7 +79,8 @@ final class ConpherenceTransactionView extends AphrontView {
$author = $handles[$transaction->getAuthorPHID()];
$transaction_view = id(new PhabricatorTransactionView())
->setUser($user)
->setEpoch($transaction->getDateCreated());
->setEpoch($transaction->getDateCreated())
->setTimeOnly(true);
if ($this->getShowContentSource()) {
$transaction_view->setContentSource($transaction->getContentSource());
}

View file

@ -10,6 +10,7 @@ final class PhabricatorTransactionView extends AphrontView {
private $anchorText;
private $isPreview;
private $classes = array();
private $timeOnly;
public function setImageURI($uri) {
$this->imageURI = $uri;
@ -47,6 +48,11 @@ final class PhabricatorTransactionView extends AphrontView {
return $this;
}
public function setTimeOnly($time) {
$this->timeOnly = $time;
return $this;
}
public function render() {
if (!$this->user) {
throw new Exception(pht('Call setUser() before render()!'));
@ -64,7 +70,7 @@ final class PhabricatorTransactionView extends AphrontView {
$header = phutil_tag_div(
'phabricator-transaction-header grouped',
array($info, $actions));
array($actions, $info));
return phutil_tag(
'div',
@ -93,9 +99,13 @@ final class PhabricatorTransactionView extends AphrontView {
}
if ($this->isPreview) {
$info[] = 'PREVIEW';
$info[] = pht('PREVIEW');
} else if ($this->epoch) {
$info[] = phabricator_datetime($this->epoch, $this->user);
if ($this->timeOnly) {
$info[] = phabricator_time($this->epoch, $this->user);
} else {
$info[] = phabricator_datetime($this->epoch, $this->user);
}
}
if ($this->anchorName) {
@ -118,7 +128,8 @@ final class PhabricatorTransactionView extends AphrontView {
return phutil_tag(
'span',
array('class' => 'phabricator-transaction-info'),
array(
'class' => 'phabricator-transaction-info',),
$info);
}

View file

@ -103,7 +103,6 @@
left: 0;
right: 0;
overflow-x: hidden;
overflow-y: auto;
border-top: 1px solid {$thinblueborder};
}
@ -132,33 +131,46 @@
.conpherence-durable-column-transactions .phabricator-transaction-detail
.phabricator-transaction-header {
background: none;
padding: 0;
padding: 0 0 4px 0;
}
.conpherence-durable-column-transactions .date-marker {
border-top: 1px solid {$thinblueborder};
margin: 20px 0px 4px;
margin: 20px 0px 8px;
}
.conpherence-durable-column-transactions .date-marker .date {
position: relative;
top: -11px;
left: 8px;
left: 0;
background-color: #fff;
color: {$lightgreytext};
color: {$lightbluetext};
font-size: 12px;
padding: 0 4px;
padding: 0 6px 0 0;
}
.conpherence-durable-column-transactions .phabricator-transaction-detail
.phabricator-transaction-header .phabricator-transaction-info {
margin: 3px 0px 0px 0px;
color: {$lightgreytext};
color: {$lightbluetext};
float: none;
font-size: 12px;
}
.conpherence-durable-column-transactions .phabricator-transaction-detail
.phabricator-transaction-header .phui-link-person {
color: {$darkbluetext};
padding: 0 8px 0 0;
}
.conpherence-durable-column-transactions .phabricator-transaction-detail
.phabricator-transaction-content .phui-link-person {
font-weight: bold;
color: {$darkbluetext};
}
.conpherence-durable-column-transactions .phabricator-transaction-detail
.phabricator-transaction-content {
padding: 0;
padding: 0 0 8px 0;
}
.conpherence-durable-column-textarea {
@ -182,6 +194,7 @@
border-top-color: {$sky};
border-bottom-color: {$sky};
box-shadow: none;
opacity: 0.6;
}
.conpherence-durable-column-footer {