Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conpherence/view/ConpherenceDurableColumnView.php
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | protected function getTagContent() { | ||||
$policy_objects = ConpherenceThread::loadViewPolicyObjects( | $policy_objects = ConpherenceThread::loadViewPolicyObjects( | ||||
$this->getUser(), | $this->getUser(), | ||||
$this->getConpherences()); | $this->getConpherences()); | ||||
$this->setPolicyObjects($policy_objects); | $this->setPolicyObjects($policy_objects); | ||||
$classes = array(); | $classes = array(); | ||||
$classes[] = 'conpherence-durable-column-header'; | $classes[] = 'conpherence-durable-column-header'; | ||||
$classes[] = 'phabricator-main-menu-background'; | $classes[] = 'grouped'; | ||||
$loading_mask = phutil_tag( | |||||
'div', | |||||
array( | |||||
'class' => 'loading-mask', | |||||
), | |||||
''); | |||||
$header = phutil_tag( | $header = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => implode(' ', $classes), | 'class' => implode(' ', $classes), | ||||
), | ), | ||||
$this->buildHeader()); | $this->buildHeader()); | ||||
Show All 26 Lines | $content = javelin_tag( | ||||
array( | array( | ||||
'class' => 'conpherence-durable-column-transactions', | 'class' => 'conpherence-durable-column-transactions', | ||||
'sigil' => 'conpherence-durable-column-transactions', | 'sigil' => 'conpherence-durable-column-transactions', | ||||
), | ), | ||||
$transactions))); | $transactions))); | ||||
$input = $this->buildTextInput(); | $input = $this->buildTextInput(); | ||||
$footer = phutil_tag( | |||||
'div', | |||||
array( | |||||
'class' => 'conpherence-durable-column-footer', | |||||
), | |||||
array( | |||||
$this->buildSendButton(), | |||||
phutil_tag( | |||||
'div', | |||||
array( | |||||
'class' => 'conpherence-durable-column-status', | |||||
), | |||||
$this->buildStatusText()), | |||||
)); | |||||
return array( | return array( | ||||
$loading_mask, | |||||
$header, | $header, | ||||
javelin_tag( | javelin_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'conpherence-durable-column-body', | 'class' => 'conpherence-durable-column-body', | ||||
'sigil' => 'conpherence-durable-column-body', | 'sigil' => 'conpherence-durable-column-body', | ||||
), | ), | ||||
array( | array( | ||||
$icon_bar, | $icon_bar, | ||||
$content, | $content, | ||||
$input, | $input, | ||||
$footer, | |||||
)), | )), | ||||
); | ); | ||||
} | } | ||||
private function getPolicyIcon( | private function getPolicyIcon( | ||||
ConpherenceThread $conpherence, | ConpherenceThread $conpherence, | ||||
array $policy_objects) { | array $policy_objects) { | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | foreach ($conpherences as $conpherence) { | ||||
), | ), | ||||
phutil_tag( | phutil_tag( | ||||
'span', | 'span', | ||||
array( | array( | ||||
'style' => 'background-image: url('.$image.')', | 'style' => 'background-image: url('.$image.')', | ||||
), | ), | ||||
'')); | '')); | ||||
} | } | ||||
$icons[] = $this->buildSearchButton(); | |||||
return $icons; | return $icons; | ||||
} | } | ||||
private function buildSearchButton() { | |||||
return phutil_tag( | |||||
'div', | |||||
array( | |||||
'class' => 'conpherence-durable-column-search-button', | |||||
), | |||||
id(new PHUIButtonBarView()) | |||||
->addButton( | |||||
id(new PHUIButtonView()) | |||||
->setTag('a') | |||||
->setHref('/conpherence/search/') | |||||
->setColor(PHUIButtonView::GREY) | |||||
->setIcon('fa-search'))); | |||||
} | |||||
private function buildHeader() { | private function buildHeader() { | ||||
$conpherence = $this->getSelectedConpherence(); | $conpherence = $this->getSelectedConpherence(); | ||||
$bubble_id = celerity_generate_unique_node_id(); | $bubble_id = celerity_generate_unique_node_id(); | ||||
$dropdown_id = celerity_generate_unique_node_id(); | $dropdown_id = celerity_generate_unique_node_id(); | ||||
$settings_list = new PHUIListView(); | $settings_list = new PHUIListView(); | ||||
$header_actions = $this->getHeaderActionsConfig($conpherence); | $header_actions = $this->getHeaderActionsConfig($conpherence); | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | if ($conpherence) { | ||||
$data['title'], | $data['title'], | ||||
)); | )); | ||||
} | } | ||||
return | return | ||||
phutil_tag( | phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'conpherence-durable-column-header', | 'class' => 'conpherence-durable-column-header-inner', | ||||
), | ), | ||||
array( | array( | ||||
javelin_tag( | javelin_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'sigil' => 'conpherence-durable-column-header-text', | 'sigil' => 'conpherence-durable-column-header-text', | ||||
'class' => 'conpherence-durable-column-header-text', | 'class' => 'conpherence-durable-column-header-text', | ||||
), | ), | ||||
Show All 30 Lines | if ($conpherence) { | ||||
'disabled' => false, | 'disabled' => false, | ||||
'href' => '/'.$conpherence->getMonogram(), | 'href' => '/'.$conpherence->getMonogram(), | ||||
'icon' => 'fa-comments', | 'icon' => 'fa-comments', | ||||
'key' => 'go_conpherence', | 'key' => 'go_conpherence', | ||||
); | ); | ||||
} | } | ||||
$actions[] = array( | $actions[] = array( | ||||
'name' => pht('Hide Column'), | 'name' => pht('Hide Window'), | ||||
'disabled' => false, | 'disabled' => false, | ||||
'href' => '#', | 'href' => '#', | ||||
'icon' => 'fa-times', | 'icon' => 'fa-times', | ||||
'key' => 'hide_column', | 'key' => 'hide_column', | ||||
); | ); | ||||
return $actions; | return $actions; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |