@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

render_tag -> tag: Maniphest summary view, setup issue view

Summary: One trivial, one not-so-trivial.

Test Plan: Viewed maniphest list; saw expected output.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4725

+80 -43
+1 -1
src/applications/config/controller/PhabricatorConfigIssueViewController.php
··· 64 64 $view = new PhabricatorSetupIssueView(); 65 65 $view->setIssue($issue); 66 66 67 - $container = phutil_render_tag( 67 + $container = phutil_tag( 68 68 'div', 69 69 array( 70 70 'class' => 'setup-issue-background',
+1 -1
src/applications/maniphest/view/ManiphestTaskProjectsView.php
··· 52 52 "\xE2\x80\xA6"); 53 53 } 54 54 55 - return implode("\n", $tags); 55 + return $this->renderHTMLView($tags); 56 56 } 57 57 58 58 }
+78 -41
src/applications/maniphest/view/ManiphestTaskSummaryView.php
··· 60 60 61 61 $batch = null; 62 62 if ($this->showBatchControls) { 63 - $batch = 64 - '<td class="maniphest-task-batch">'. 65 - javelin_tag( 66 - 'input', 67 - array( 68 - 'type' => 'checkbox', 69 - 'name' => 'batch[]', 70 - 'value' => $task->getID(), 71 - 'sigil' => 'maniphest-batch', 72 - )). 73 - '</td>'; 63 + $batch = phutil_tag( 64 + 'td', 65 + array( 66 + 'class' => 'maniphest-task-batch', 67 + ), 68 + javelin_tag( 69 + 'input', 70 + array( 71 + 'type' => 'checkbox', 72 + 'name' => 'batch[]', 73 + 'value' => $task->getID(), 74 + 'sigil' => 'maniphest-batch', 75 + ))); 74 76 } 75 77 76 78 $projects_view = new ManiphestTaskProjectsView(); ··· 94 96 ), 95 97 ''); 96 98 97 - return javelin_render_tag( 99 + $task_id = phutil_tag( 100 + 'td', 101 + array( 102 + 'class' => 'maniphest-task-number', 103 + ), 104 + 'T'.$task->getID()); 105 + 106 + $task_status = phutil_tag( 107 + 'td', 108 + array( 109 + 'class' => 'maniphest-task-status', 110 + ), 111 + idx($status_map, $task->getStatus(), 'Unknown')); 112 + 113 + $task_owner = phutil_tag( 114 + 'td', 115 + array( 116 + 'class' => 'maniphest-task-owner', 117 + ), 118 + $task->getOwnerPHID() 119 + ? $handles[$task->getOwnerPHID()]->renderLink() 120 + : phutil_tag('em', array(), pht('None'))); 121 + 122 + $task_name = phutil_tag( 123 + 'td', 124 + array( 125 + 'class' => 'maniphest-task-name', 126 + ), 127 + phutil_tag( 128 + 'a', 129 + array( 130 + 'href' => '/T'.$task->getID(), 131 + ), 132 + $task->getTitle())); 133 + 134 + $task_projects = phutil_tag( 135 + 'td', 136 + array( 137 + 'class' => 'maniphest-task-projects', 138 + ), 139 + $projects_view->render()); 140 + 141 + $task_updated = phutil_tag( 142 + 'td', 143 + array( 144 + 'class' => 'maniphest-task-updated', 145 + ), 146 + phabricator_date($task->getDateModified(), $this->user)); 147 + 148 + $row = phutil_tag( 149 + 'tr', 150 + array(), 151 + array( 152 + $handle, 153 + $batch, 154 + $task_id, 155 + $task_status, 156 + $task_owner, 157 + $task_name, 158 + $task_projects, 159 + $task_updated, 160 + )); 161 + 162 + return javelin_tag( 98 163 'table', 99 164 array( 100 165 'class' => 'maniphest-task-summary', ··· 103 168 'taskID' => $task->getID(), 104 169 ), 105 170 ), 106 - '<tr>'. 107 - $handle. 108 - $batch. 109 - '<td class="maniphest-task-number">'. 110 - 'T'.$task->getID(). 111 - '</td>'. 112 - '<td class="maniphest-task-status">'. 113 - idx($status_map, $task->getStatus(), 'Unknown'). 114 - '</td>'. 115 - '<td class="maniphest-task-owner">'. 116 - ($task->getOwnerPHID() 117 - ? $handles[$task->getOwnerPHID()]->renderLink() 118 - : '<em>None</em>'). 119 - '</td>'. 120 - '<td class="maniphest-task-name">'. 121 - phutil_tag( 122 - 'a', 123 - array( 124 - 'href' => '/T'.$task->getID(), 125 - ), 126 - $task->getTitle()). 127 - '</td>'. 128 - '<td class="maniphest-task-projects">'. 129 - $projects_view->render(). 130 - '</td>'. 131 - '<td class="maniphest-task-updated">'. 132 - phabricator_date($task->getDateModified(), $this->user). 133 - '</td>'. 134 - '</tr>'); 171 + $row); 135 172 } 136 173 137 174 }