Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2891624
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
9 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/config/controller/PhabricatorConfigIssueViewController.php b/src/applications/config/controller/PhabricatorConfigIssueViewController.php
index ddac26922c..546261ed07 100644
--- a/src/applications/config/controller/PhabricatorConfigIssueViewController.php
+++ b/src/applications/config/controller/PhabricatorConfigIssueViewController.php
@@ -1,77 +1,77 @@
<?php
final class PhabricatorConfigIssueViewController
extends PhabricatorConfigController {
private $issueKey;
public function willProcessRequest(array $data) {
$this->issueKey = $data['key'];
}
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$issues = PhabricatorSetupCheck::runAllChecks();
PhabricatorSetupCheck::setOpenSetupIssueCount(count($issues));
if (empty($issues[$this->issueKey])) {
$content = id(new AphrontErrorView())
->setSeverity(AphrontErrorView::SEVERITY_NOTICE)
->setTitle(pht('Issue Resolved'))
->appendChild(pht('This setup issue has been resolved. '))
->appendChild(
phutil_tag(
'a',
array(
'href' => $this->getApplicationURI('issue/'),
),
pht('Return to Open Issue List')));
$title = pht('Resolved Issue');
} else {
$issue = $issues[$this->issueKey];
$content = $this->renderIssue($issue);
$title = $issue->getShortName();
}
$crumbs = $this
->buildApplicationCrumbs()
->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Setup Issues'))
->setHref($this->getApplicationURI('issue/')))
->addCrumb(
id(new PhabricatorCrumbView())
->setName($title)
->setHref($request->getRequestURI()));
return $this->buildApplicationPage(
array(
$crumbs,
$content,
),
array(
'title' => $title,
'device' => true,
)
);
}
private function renderIssue(PhabricatorSetupIssue $issue) {
require_celerity_resource('setup-issue-css');
$view = new PhabricatorSetupIssueView();
$view->setIssue($issue);
- $container = phutil_render_tag(
+ $container = phutil_tag(
'div',
array(
'class' => 'setup-issue-background',
),
$view->render());
return $container;
}
}
diff --git a/src/applications/maniphest/view/ManiphestTaskProjectsView.php b/src/applications/maniphest/view/ManiphestTaskProjectsView.php
index 358d3145bc..00f4ad86f2 100644
--- a/src/applications/maniphest/view/ManiphestTaskProjectsView.php
+++ b/src/applications/maniphest/view/ManiphestTaskProjectsView.php
@@ -1,58 +1,58 @@
<?php
/**
* @group maniphest
*/
final class ManiphestTaskProjectsView extends ManiphestView {
private $handles;
public function setHandles(array $handles) {
assert_instances_of($handles, 'PhabricatorObjectHandle');
$this->handles = $handles;
return $this;
}
public function render() {
require_celerity_resource('phabricator-project-tag-css');
$show = array_slice($this->handles, 0, 2);
$tags = array();
foreach ($show as $handle) {
$tags[] = phutil_tag(
'a',
array(
'href' => $handle->getURI(),
'class' => 'phabricator-project-tag',
),
phutil_utf8_shorten($handle->getName(), 24));
}
if (count($this->handles) > 2) {
require_celerity_resource('aphront-tooltip-css');
Javelin::initBehavior('phabricator-tooltips');
$all = array();
foreach ($this->handles as $handle) {
$all[] = $handle->getName();
}
$tags[] = javelin_tag(
'span',
array(
'class' => 'phabricator-project-tag',
'sigil' => 'has-tooltip',
'meta' => array(
'tip' => implode(', ', $all),
'size' => 200,
),
),
"\xE2\x80\xA6");
}
- return implode("\n", $tags);
+ return $this->renderHTMLView($tags);
}
}
diff --git a/src/applications/maniphest/view/ManiphestTaskSummaryView.php b/src/applications/maniphest/view/ManiphestTaskSummaryView.php
index 20c03b9fe0..6e7b13c7ea 100644
--- a/src/applications/maniphest/view/ManiphestTaskSummaryView.php
+++ b/src/applications/maniphest/view/ManiphestTaskSummaryView.php
@@ -1,137 +1,174 @@
<?php
/**
* @group maniphest
*/
final class ManiphestTaskSummaryView extends ManiphestView {
private $task;
private $handles;
private $showBatchControls;
private $showSubpriorityControls;
public function setTask(ManiphestTask $task) {
$this->task = $task;
return $this;
}
public function setHandles(array $handles) {
assert_instances_of($handles, 'PhabricatorObjectHandle');
$this->handles = $handles;
return $this;
}
public function setShowBatchControls($show_batch_controls) {
$this->showBatchControls = $show_batch_controls;
return $this;
}
public function setShowSubpriorityControls($show_subpriority_controls) {
$this->showSubpriorityControls = $show_subpriority_controls;
return $this;
}
public static function getPriorityClass($priority) {
$classes = array(
ManiphestTaskPriority::PRIORITY_UNBREAK_NOW => 'pri-unbreak',
ManiphestTaskPriority::PRIORITY_TRIAGE => 'pri-triage',
ManiphestTaskPriority::PRIORITY_HIGH => 'pri-high',
ManiphestTaskPriority::PRIORITY_NORMAL => 'pri-normal',
ManiphestTaskPriority::PRIORITY_LOW => 'pri-low',
ManiphestTaskPriority::PRIORITY_WISH => 'pri-wish',
);
return idx($classes, $priority);
}
public function render() {
if (!$this->user) {
throw new Exception("Call setUser() before rendering!");
}
$task = $this->task;
$handles = $this->handles;
require_celerity_resource('maniphest-task-summary-css');
$pri_class = self::getPriorityClass($task->getPriority());
$status_map = ManiphestTaskStatus::getTaskStatusMap();
$batch = null;
if ($this->showBatchControls) {
- $batch =
- '<td class="maniphest-task-batch">'.
- javelin_tag(
- 'input',
- array(
- 'type' => 'checkbox',
- 'name' => 'batch[]',
- 'value' => $task->getID(),
- 'sigil' => 'maniphest-batch',
- )).
- '</td>';
+ $batch = phutil_tag(
+ 'td',
+ array(
+ 'class' => 'maniphest-task-batch',
+ ),
+ javelin_tag(
+ 'input',
+ array(
+ 'type' => 'checkbox',
+ 'name' => 'batch[]',
+ 'value' => $task->getID(),
+ 'sigil' => 'maniphest-batch',
+ )));
}
$projects_view = new ManiphestTaskProjectsView();
$projects_view->setHandles(
array_select_keys(
$this->handles,
$task->getProjectPHIDs()));
$control_class = null;
$control_sigil = null;
if ($this->showSubpriorityControls) {
$control_class = 'maniphest-active-handle';
$control_sigil = 'maniphest-task-handle';
}
$handle = javelin_tag(
'td',
array(
'class' => 'maniphest-task-handle '.$pri_class.' '.$control_class,
'sigil' => $control_sigil,
),
'');
- return javelin_render_tag(
+ $task_id = phutil_tag(
+ 'td',
+ array(
+ 'class' => 'maniphest-task-number',
+ ),
+ 'T'.$task->getID());
+
+ $task_status = phutil_tag(
+ 'td',
+ array(
+ 'class' => 'maniphest-task-status',
+ ),
+ idx($status_map, $task->getStatus(), 'Unknown'));
+
+ $task_owner = phutil_tag(
+ 'td',
+ array(
+ 'class' => 'maniphest-task-owner',
+ ),
+ $task->getOwnerPHID()
+ ? $handles[$task->getOwnerPHID()]->renderLink()
+ : phutil_tag('em', array(), pht('None')));
+
+ $task_name = phutil_tag(
+ 'td',
+ array(
+ 'class' => 'maniphest-task-name',
+ ),
+ phutil_tag(
+ 'a',
+ array(
+ 'href' => '/T'.$task->getID(),
+ ),
+ $task->getTitle()));
+
+ $task_projects = phutil_tag(
+ 'td',
+ array(
+ 'class' => 'maniphest-task-projects',
+ ),
+ $projects_view->render());
+
+ $task_updated = phutil_tag(
+ 'td',
+ array(
+ 'class' => 'maniphest-task-updated',
+ ),
+ phabricator_date($task->getDateModified(), $this->user));
+
+ $row = phutil_tag(
+ 'tr',
+ array(),
+ array(
+ $handle,
+ $batch,
+ $task_id,
+ $task_status,
+ $task_owner,
+ $task_name,
+ $task_projects,
+ $task_updated,
+ ));
+
+ return javelin_tag(
'table',
array(
'class' => 'maniphest-task-summary',
'sigil' => 'maniphest-task',
'meta' => array(
'taskID' => $task->getID(),
),
),
- '<tr>'.
- $handle.
- $batch.
- '<td class="maniphest-task-number">'.
- 'T'.$task->getID().
- '</td>'.
- '<td class="maniphest-task-status">'.
- idx($status_map, $task->getStatus(), 'Unknown').
- '</td>'.
- '<td class="maniphest-task-owner">'.
- ($task->getOwnerPHID()
- ? $handles[$task->getOwnerPHID()]->renderLink()
- : '<em>None</em>').
- '</td>'.
- '<td class="maniphest-task-name">'.
- phutil_tag(
- 'a',
- array(
- 'href' => '/T'.$task->getID(),
- ),
- $task->getTitle()).
- '</td>'.
- '<td class="maniphest-task-projects">'.
- $projects_view->render().
- '</td>'.
- '<td class="maniphest-task-updated">'.
- phabricator_date($task->getDateModified(), $this->user).
- '</td>'.
- '</tr>');
+ $row);
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 15:30 (3 w, 23 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126002
Default Alt Text
(9 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment