Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892824
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
7 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/differential/view/inlinecomment/DifferentialInlineCommentView.php b/src/applications/differential/view/inlinecomment/DifferentialInlineCommentView.php
index 2ff055bc60..b293ef07f2 100644
--- a/src/applications/differential/view/inlinecomment/DifferentialInlineCommentView.php
+++ b/src/applications/differential/view/inlinecomment/DifferentialInlineCommentView.php
@@ -1,176 +1,178 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
final class DifferentialInlineCommentView extends AphrontView {
private $inlineComment;
private $onRight;
private $buildScaffolding;
private $handles;
private $markupEngine;
private $editable;
public function setInlineComment(DifferentialInlineComment $comment) {
$this->inlineComment = $comment;
return $this;
}
public function setOnRight($on_right) {
$this->onRight = $on_right;
return $this;
}
public function setBuildScaffolding($scaffold) {
$this->buildScaffolding = $scaffold;
return $this;
}
public function setHandles(array $handles) {
$this->handles = $handles;
return $this;
}
public function setMarkupEngine(PhutilMarkupEngine $engine) {
$this->markupEngine = $engine;
return $this;
}
public function setEditable($editable) {
$this->editable = $editable;
return $this;
}
public function render() {
$inline = $this->inlineComment;
$start = $inline->getLineNumber();
$length = $inline->getLineLength();
if ($length) {
$end = $start + $length;
$line = 'Lines '.number_format($start).'-'.number_format($end);
} else {
$line = 'Line '.number_format($start);
}
$metadata = array(
'id' => $inline->getID(),
'number' => $inline->getLineNumber(),
'length' => $inline->getLineLength(),
'on_right' => $this->onRight,
);
$sigil = 'differential-inline-comment';
$content = $inline->getContent();
$handles = $this->handles;
$links = array();
if ($this->editable) {
$links[] = javelin_render_tag(
'a',
array(
'href' => '#',
'mustcapture' => true,
'sigil' => 'differential-inline-edit',
),
'Edit');
$links[] = javelin_render_tag(
'a',
array(
'href' => '#',
'mustcapture' => true,
'sigil' => 'differential-inline-delete',
),
'Delete');
}
if ($links) {
$links =
'<span class="differential-inline-comment-links">'.
implode(' · ', $links).
'</span>';
} else {
$links = null;
}
$cache = $inline->getCache();
if (strlen($cache)) {
$content = $cache;
} else {
$content = $this->markupEngine->markupText($content);
if ($inline->getID()) {
$inline->setCache($content);
$inline->save();
}
}
$anchor = phutil_render_tag(
'a',
array(
'name' => 'inline-'.$inline->getID(),
),
'');
$markup = javelin_render_tag(
'div',
array(
'class' => 'differential-inline-comment',
'sigil' => $sigil,
'meta' => $metadata,
),
'<div class="differential-inline-comment-head">'.
$anchor.
$links.
'<span class="differential-inline-comment-line">'.$line.'</span>'.
phutil_escape_html($handles[$inline->getAuthorPHID()]->getName()).
'</div>'.
- $content);
+ '<div class="phabricator-remarkup">'.
+ $content.
+ '</div>');
return $this->scaffoldMarkup($markup);
}
private function scaffoldMarkup($markup) {
if (!$this->buildScaffolding) {
return $markup;
}
if ($this->onRight) {
return
'<table>'.
'<tr>'.
'<th></th>'.
'<td></td>'.
'<th></th>'.
'<td>'.$markup.'</td>'.
'</tr>'.
'</table>';
} else {
return
'<table>'.
'<tr>'.
'<th></th>'.
'<td>'.$markup.'</td>'.
'<th></th>'.
'<td></td>'.
'</tr>'.
'</table>';
}
}
}
diff --git a/webroot/rsrc/css/application/maniphest/transaction-detail.css b/webroot/rsrc/css/application/maniphest/transaction-detail.css
index 58e8112165..94661578d0 100644
--- a/webroot/rsrc/css/application/maniphest/transaction-detail.css
+++ b/webroot/rsrc/css/application/maniphest/transaction-detail.css
@@ -1,79 +1,73 @@
/**
* @provides maniphest-transaction-detail-css
*/
.maniphest-transaction-detail-container {
margin: 2px 1em 3px;
background: 0px 0px no-repeat;
min-height: 50px;
}
.maniphest-transaction-detail-container .upforgrab {
border-color: #cc9966;
}
.maniphest-transaction-detail-container .reassigned {
border-color: #0099aa;
}
.maniphest-transaction-detail-container .assigned {
border-color: #0099aa;
}
.maniphest-transaction-detail-container .claimed {
border-color: #0099aa;
}
.maniphest-transaction-detail-container .created {
border-color: #660099;
}
.maniphest-transaction-detail-container .closed {
border-color: #006699;
}
.maniphest-transaction-detail-container .spited {
border-color: #006699;
}
.maniphest-transaction-detail-container .reopened {
border-color: #660099;
}
.maniphest-transaction-detail-container .unbreaknow {
border-color: #aa0000;
}
.maniphest-transaction-header {
background: #e6e6e6;
padding: 4px 1em;
}
.maniphest-transaction-header a {
font-weight: bold;
}
.maniphest-transaction-detail-view {
margin-left: 54px;
border-color: #bbbbbb;
border-width: 1px 10px;
border-style: solid;
min-height: 40px;
}
.maniphest-transaction-timestamp {
float: right;
font-size: 11px;
color: #666666;
}
.maniphest-transaction-comments {
padding: 4px 1em;
background: #f3f3f3;
}
-
-
-.maniphest-task-description p,
-.maniphest-transaction-comments p {
- margin: .25em 0 .5em;
-}
diff --git a/webroot/rsrc/css/core/remarkup.css b/webroot/rsrc/css/core/remarkup.css
index f686e6c75f..98ef494542 100644
--- a/webroot/rsrc/css/core/remarkup.css
+++ b/webroot/rsrc/css/core/remarkup.css
@@ -1,30 +1,38 @@
/**
* @provides phabricator-remarkup-css
*/
+.phabricator-remarkup {
+ line-height: 1.45em;
+}
+
.phabricator-remarkup p {
- margin: 1em 0;
+ margin: 0 0 .75em;
}
.phabricator-remarkup code {
background: #fdfae7;
border: 1px solid #f5e178;
display: block;
white-space: pre;
font-family: "Monaco", monospace;
font-size: 10px;
color: #000000;
margin: 1em 2em;
padding: .5em 1.5em;
}
.phabricator-remarkup code.remarkup-counterexample {
border: 1px solid #aa0000;
background-color: #ffaaaa;
}
.phabricator-remarkup ul {
list-style: disc;
margin: 1em 0 1em 3em;
}
+.phabricator-remarkup h1,
+.phabricator-remarkup h2 {
+ margin: .75em 0 .5em;
+}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 17:25 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126933
Default Alt Text
(7 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment