Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/view/ManiphestTaskResultListView.php
| Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | final class ManiphestTaskResultListView extends ManiphestView { | ||||
| private function renderBatchEditor(PhabricatorSavedQuery $saved_query) { | private function renderBatchEditor(PhabricatorSavedQuery $saved_query) { | ||||
| $user = $this->getUser(); | $user = $this->getUser(); | ||||
| if (!$this->canBatchEdit) { | if (!$this->canBatchEdit) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| if (!$user->isLoggedIn()) { | if (!$user->isLoggedIn()) { | ||||
| // Don't show the batch editor or excel export for logged-out users. | // Don't show the batch editor for logged-out users. | ||||
| // Technically we //could// let them export, but ehh. | |||||
| return null; | return null; | ||||
| } | } | ||||
| Javelin::initBehavior( | Javelin::initBehavior( | ||||
| 'maniphest-batch-selector', | 'maniphest-batch-selector', | ||||
| array( | array( | ||||
| 'selectAll' => 'batch-select-all', | 'selectAll' => 'batch-select-all', | ||||
| 'selectNone' => 'batch-select-none', | 'selectNone' => 'batch-select-none', | ||||
| Show All 27 Lines | $submit = phutil_tag( | ||||
| 'button', | 'button', | ||||
| array( | array( | ||||
| 'id' => 'batch-select-submit', | 'id' => 'batch-select-submit', | ||||
| 'disabled' => 'disabled', | 'disabled' => 'disabled', | ||||
| 'class' => 'disabled', | 'class' => 'disabled', | ||||
| ), | ), | ||||
| pht("Bulk Edit Selected \xC2\xBB")); | pht("Bulk Edit Selected \xC2\xBB")); | ||||
| $export = javelin_tag( | |||||
| 'a', | |||||
| array( | |||||
| 'href' => '/maniphest/export/'.$saved_query->getQueryKey().'/', | |||||
| 'class' => 'button button-grey', | |||||
| ), | |||||
| pht('Export to Excel')); | |||||
| $hidden = phutil_tag( | $hidden = phutil_tag( | ||||
| 'div', | 'div', | ||||
| array( | array( | ||||
| 'id' => 'batch-select-id-container', | 'id' => 'batch-select-id-container', | ||||
| ), | ), | ||||
| ''); | ''); | ||||
| $editor = hsprintf( | $editor = hsprintf( | ||||
| '<table class="maniphest-batch-editor-layout">'. | '<table class="maniphest-batch-editor-layout">'. | ||||
| '<tr>'. | '<tr>'. | ||||
| '<td>%s%s</td>'. | '<td>%s%s</td>'. | ||||
| '<td>%s</td>'. | |||||
| '<td id="batch-select-status-cell">%s</td>'. | '<td id="batch-select-status-cell">%s</td>'. | ||||
| '<td class="batch-select-submit-cell">%s%s</td>'. | '<td class="batch-select-submit-cell">%s%s</td>'. | ||||
| '</tr>'. | '</tr>'. | ||||
| '</table>', | '</table>', | ||||
| $select_all, | $select_all, | ||||
| $select_none, | $select_none, | ||||
| $export, | |||||
| '', | '', | ||||
| $submit, | $submit, | ||||
| $hidden); | $hidden); | ||||
| $editor = phabricator_form( | $editor = phabricator_form( | ||||
| $user, | $user, | ||||
| array( | array( | ||||
| 'method' => 'POST', | 'method' => 'POST', | ||||
| Show All 14 Lines | |||||