Changeset View
Changeset View
Standalone View
Standalone View
src/view/control/AphrontTokenizerTemplateView.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | $input = javelin_tag( | ||||
'disabled' => 'disabled', | 'disabled' => 'disabled', | ||||
'type' => 'text', | 'type' => 'text', | ||||
)); | )); | ||||
$content = $tokens; | $content = $tokens; | ||||
$content[] = $input; | $content[] = $input; | ||||
$content[] = phutil_tag('div', array('style' => 'clear: both;'), ''); | $content[] = phutil_tag('div', array('style' => 'clear: both;'), ''); | ||||
$container = phutil_tag( | $container = javelin_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'id' => $id, | 'id' => $id, | ||||
'class' => 'jx-tokenizer-container', | 'class' => 'jx-tokenizer-container', | ||||
'sigil' => 'tokenizer-container', | |||||
), | ), | ||||
$content); | $content); | ||||
$browse = null; | |||||
if ($this->browseURI) { | |||||
$icon = id(new PHUIIconView()) | $icon = id(new PHUIIconView()) | ||||
->setIconFont('fa-list-ul'); | ->setIconFont('fa-list-ul'); | ||||
// TODO: This thing is ugly and the ugliness is not intentional. | // TODO: This thing is ugly and the ugliness is not intentional. | ||||
// We have to give it text or PHUIButtonView collapses. It should likely | // We have to give it text or PHUIButtonView collapses. It should likely | ||||
// just be an icon and look more integrated into the input. | // just be an icon and look more integrated into the input. | ||||
$browse = id(new PHUIButtonView()) | $browse = id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setIcon($icon) | ->setIcon($icon) | ||||
->addSigil('tokenizer-browse') | ->addSigil('tokenizer-browse') | ||||
->setColor(PHUIButtonView::GREY) | ->setColor(PHUIButtonView::GREY) | ||||
->setSize(PHUIButtonView::SMALL) | ->setSize(PHUIButtonView::SMALL) | ||||
->setText(pht('Browse...')); | ->setText(pht('Browse...')); | ||||
$classes = array(); | |||||
$classes[] = 'jx-tokenizer-frame'; | |||||
if ($this->browseURI) { | |||||
$classes[] = 'has-browse'; | |||||
} | } | ||||
$frame = javelin_tag( | $frame = javelin_tag( | ||||
'table', | 'table', | ||||
array( | array( | ||||
'class' => 'jx-tokenizer-frame', | 'class' => implode(' ', $classes), | ||||
'sigil' => 'tokenizer-frame', | 'sigil' => 'tokenizer-frame', | ||||
), | ), | ||||
phutil_tag( | phutil_tag( | ||||
'tr', | 'tr', | ||||
array( | array( | ||||
), | ), | ||||
array( | array( | ||||
phutil_tag( | phutil_tag( | ||||
Show All 25 Lines |