mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 17:52:43 +01:00
bd9bcaa8ff
Summary: Fixes T9790. This uses a simple renderer, like the inline context renderer, that emphasizes getting a quick glance at small changes and working reasonably on mobile devices. Test Plan: - Set `inline` setting to `9999`. - Created a diff. - Saw it render reasonably in HTML mail. - Also tested text mail to make sure I didn't break that. {F1310137, size=full} Reviewers: chad Reviewed By: chad Maniphest Tasks: T9790 Differential Revision: https://secure.phabricator.com/D15901
62 lines
1.2 KiB
PHP
62 lines
1.2 KiB
PHP
<?php
|
|
|
|
abstract class DifferentialMailView
|
|
extends Phobject {
|
|
|
|
protected function renderCodeBlock($block) {
|
|
$style = array(
|
|
'font: 11px/15px "Menlo", "Consolas", "Monaco", monospace;',
|
|
'white-space: pre-wrap;',
|
|
'clear: both;',
|
|
'padding: 4px 0;',
|
|
'margin: 0;',
|
|
);
|
|
|
|
return phutil_tag(
|
|
'div',
|
|
array(
|
|
'style' => implode(' ', $style),
|
|
),
|
|
$block);
|
|
}
|
|
|
|
protected function renderHeaderBlock($block) {
|
|
$style = array(
|
|
'color: #74777d;',
|
|
'background: #eff2f4;',
|
|
'padding: 6px 8px;',
|
|
'overflow: hidden;',
|
|
);
|
|
|
|
return phutil_tag(
|
|
'div',
|
|
array(
|
|
'style' => implode(' ', $style),
|
|
),
|
|
$block);
|
|
}
|
|
|
|
protected function renderHeaderBold($content) {
|
|
return phutil_tag(
|
|
'span',
|
|
array(
|
|
'style' => 'color: #4b4d51; font-weight: bold;',
|
|
),
|
|
$content);
|
|
}
|
|
|
|
protected function renderContentBox($content) {
|
|
$style = array(
|
|
'border: 1px solid #C7CCD9;',
|
|
'border-radius: 3px;',
|
|
);
|
|
|
|
return phutil_tag(
|
|
'div',
|
|
array(
|
|
'style' => implode(' ', $style),
|
|
),
|
|
$content);
|
|
}
|
|
|
|
}
|