1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

Make View Revision in Mail a little more resilient

Summary: Converts to table so text wraps on long strings well, button always stays top right, better spacing underneath.

Test Plan: Mail, Gmail, mobile

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15955
This commit is contained in:
Chad Little 2016-05-20 11:52:14 -07:00
parent 45718268a9
commit 58aa3fdc9d

View file

@ -2730,13 +2730,14 @@ abstract class PhabricatorApplicationTransactionEditor
$button_style = array( $button_style = array(
'text-decoration: none;', 'text-decoration: none;',
'padding: 4px 8px;', 'padding: 4px 8px;',
'margin: 0 8px;', 'margin: 0 8px 8px;',
'float: right;', 'float: right;',
'color: #464C5C;', 'color: #464C5C;',
'font-weight: bold;', 'font-weight: bold;',
'border-radius: 3px;', 'border-radius: 3px;',
'background-color: #F7F7F9;', 'background-color: #F7F7F9;',
'background-image: linear-gradient(to bottom,#fff,#f1f0f1);', 'background-image: linear-gradient(to bottom,#fff,#f1f0f1);',
'display: inline-block;',
'border: 1px solid rgba(71,87,120,.2);', 'border: 1px solid rgba(71,87,120,.2);',
); );
@ -2750,29 +2751,24 @@ abstract class PhabricatorApplicationTransactionEditor
} }
$xactions_style = array( $xactions_style = array(
'padding: 0 0 8px 0;',
); );
$headers_html = phutil_tag( $header_action = phutil_tag(
'div', 'td',
array(),
$header_button);
$header_action = phutil_tag(
'td',
array( array(
'style' => implode(' ', $xactions_style), 'style' => implode(' ', $xactions_style),
), ),
$headers_html); $headers_html);
$header_style = array(
'overflow: hidden;',
);
$headers_html = phutil_tag( $headers_html = phutil_tag(
'div', 'table',
array( array(),
'style' => implode(' ', $header_style), phutil_tag('tr', array(), array($header_action, $header_button)));
),
array(
$header_button,
$headers_html,
));
$body->addRawHTMLSection($headers_html); $body->addRawHTMLSection($headers_html);