Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14376368
D7648.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D7648.diff
View Options
Index: src/__phutil_library_map__.php
===================================================================
--- src/__phutil_library_map__.php
+++ src/__phutil_library_map__.php
@@ -621,6 +621,7 @@
'DoorkeeperRemarkupRule' => 'applications/doorkeeper/remarkup/DoorkeeperRemarkupRule.php',
'DoorkeeperRemarkupRuleAsana' => 'applications/doorkeeper/remarkup/DoorkeeperRemarkupRuleAsana.php',
'DoorkeeperRemarkupRuleJIRA' => 'applications/doorkeeper/remarkup/DoorkeeperRemarkupRuleJIRA.php',
+ 'DoorkeeperTagView' => 'applications/doorkeeper/view/DoorkeeperTagView.php',
'DoorkeeperTagsController' => 'applications/doorkeeper/controller/DoorkeeperTagsController.php',
'DrydockAllocatorWorker' => 'applications/drydock/worker/DrydockAllocatorWorker.php',
'DrydockApacheWebrootInterface' => 'applications/drydock/interface/webroot/DrydockApacheWebrootInterface.php',
@@ -2944,6 +2945,7 @@
'DoorkeeperRemarkupRule' => 'PhutilRemarkupRule',
'DoorkeeperRemarkupRuleAsana' => 'DoorkeeperRemarkupRule',
'DoorkeeperRemarkupRuleJIRA' => 'DoorkeeperRemarkupRule',
+ 'DoorkeeperTagView' => 'AphrontView',
'DoorkeeperTagsController' => 'PhabricatorController',
'DrydockAllocatorWorker' => 'PhabricatorWorker',
'DrydockApacheWebrootInterface' => 'DrydockWebrootInterface',
Index: src/applications/differential/field/specification/DifferentialJIRAIssuesFieldSpecification.php
===================================================================
--- src/applications/differential/field/specification/DifferentialJIRAIssuesFieldSpecification.php
+++ src/applications/differential/field/specification/DifferentialJIRAIssuesFieldSpecification.php
@@ -58,16 +58,11 @@
$links = array();
foreach ($xobjs as $xobj) {
- $links[] = phutil_tag(
- 'a',
- array(
- 'href' => $xobj->getObjectURI(),
- 'target' => '_blank',
- ),
- $xobj->getObjectID());
+ $links[] = id(new DoorkeeperTagView())
+ ->setExternalObject($xobj);
}
- return phutil_implode_html(', ', $links);
+ return phutil_implode_html(phutil_tag('br'), $links);
}
public function shouldAppearOnConduitView() {
Index: src/applications/doorkeeper/view/DoorkeeperTagView.php
===================================================================
--- /dev/null
+++ src/applications/doorkeeper/view/DoorkeeperTagView.php
@@ -0,0 +1,42 @@
+<?php
+
+final class DoorkeeperTagView extends AphrontView {
+
+ private $xobj;
+
+ public function setExternalObject(DoorkeeperExternalObject $xobj) {
+ $this->xobj = $xobj;
+ return $this;
+ }
+
+ public function render() {
+ $xobj = $this->xobj;
+ if (!$xobj) {
+ throw new Exception('Call setExternalObject() before render()!');
+ }
+
+ $tag_id = celerity_generate_unique_node_id();
+
+ $href = $xobj->getObjectURI();
+
+ $spec = array(
+ 'id' => $tag_id,
+ 'ref' => array(
+ $xobj->getApplicationType(),
+ $xobj->getApplicationDomain(),
+ $xobj->getObjectType(),
+ $xobj->getObjectID(),
+ ),
+ );
+
+ Javelin::initBehavior('doorkeeper-tag', array('tags' => array($spec)));
+
+ return id(new PhabricatorTagView())
+ ->setID($tag_id)
+ ->setHref($href)
+ ->setName($href)
+ ->setType(PhabricatorTagView::TYPE_OBJECT)
+ ->setExternal(true);
+ }
+
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 11:41 PM (18 h, 45 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6916547
Default Alt Text
D7648.diff (3 KB)
Attached To
Mode
D7648: Render linked JIRA issues with a Doorkeeper tag
Attached
Detach File
Event Timeline
Log In to Comment