2015-01-27 15:30:52 +01:00
|
|
|
<?php
|
|
|
|
|
2015-02-27 20:38:33 +01:00
|
|
|
final class ConpherenceDurableColumnView extends AphrontTagView {
|
2015-01-27 15:30:52 +01:00
|
|
|
|
|
|
|
protected function getTagAttributes() {
|
|
|
|
return array(
|
|
|
|
'id' => 'durable-column',
|
2015-02-27 20:38:33 +01:00
|
|
|
'class' => 'conpherence-durable-column',
|
2015-01-27 15:30:52 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function getTagContent() {
|
|
|
|
Javelin::initBehavior('durable-column');
|
|
|
|
|
|
|
|
$classes = array();
|
2015-02-27 20:38:33 +01:00
|
|
|
$classes[] = 'conpherence-durable-column-header';
|
2015-01-27 15:30:52 +01:00
|
|
|
$classes[] = 'sprite-main-header';
|
|
|
|
$classes[] = 'main-header-'.PhabricatorEnv::getEnvConfig('ui.header-color');
|
|
|
|
|
|
|
|
$header = phutil_tag(
|
|
|
|
'div',
|
|
|
|
array(
|
|
|
|
'class' => implode(' ', $classes),
|
|
|
|
),
|
|
|
|
phutil_tag(
|
|
|
|
'div',
|
|
|
|
array(
|
2015-02-27 20:38:33 +01:00
|
|
|
'class' => 'conpherence-durable-column-header-text',
|
2015-01-27 15:30:52 +01:00
|
|
|
),
|
|
|
|
pht('Column Prototype')));
|
|
|
|
|
|
|
|
$icon_bar = phutil_tag(
|
|
|
|
'div',
|
|
|
|
array(
|
2015-02-27 20:38:33 +01:00
|
|
|
'class' => 'conpherence-durable-column-icon-bar',
|
2015-01-27 15:30:52 +01:00
|
|
|
),
|
|
|
|
null); // <-- TODO: Icon buttons go here.
|
|
|
|
|
|
|
|
$copy = pht(
|
|
|
|
'This is a very early prototype of a persistent column. It is not '.
|
|
|
|
'expected to work yet, and leaving it open will activate other new '.
|
|
|
|
'features which will break things. Press "\\" (backslash) on your '.
|
|
|
|
'keyboard to close it now.');
|
|
|
|
|
|
|
|
$content = phutil_tag(
|
|
|
|
'div',
|
|
|
|
array(
|
2015-02-27 20:38:33 +01:00
|
|
|
'class' => 'conpherence-durable-column-main',
|
2015-01-27 15:30:52 +01:00
|
|
|
),
|
|
|
|
phutil_tag(
|
|
|
|
'div',
|
|
|
|
array(
|
2015-02-27 20:38:33 +01:00
|
|
|
'id' => 'conpherence-durable-column-content',
|
|
|
|
'class' => 'conpherence-durable-column-frame',
|
2015-01-27 15:30:52 +01:00
|
|
|
),
|
|
|
|
phutil_tag(
|
|
|
|
'div',
|
|
|
|
array(
|
2015-02-27 20:38:33 +01:00
|
|
|
'class' => 'conpherence-durable-column-content',
|
2015-01-27 15:30:52 +01:00
|
|
|
),
|
|
|
|
$copy)));
|
|
|
|
|
|
|
|
$input = phutil_tag(
|
|
|
|
'textarea',
|
|
|
|
array(
|
2015-02-27 20:38:33 +01:00
|
|
|
'class' => 'conpherence-durable-column-textarea',
|
2015-01-27 15:30:52 +01:00
|
|
|
'placeholder' => pht('Box for text...'),
|
|
|
|
));
|
|
|
|
|
|
|
|
$footer = phutil_tag(
|
|
|
|
'div',
|
|
|
|
array(
|
2015-02-27 20:38:33 +01:00
|
|
|
'class' => 'conpherence-durable-column-footer',
|
2015-01-27 15:30:52 +01:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
phutil_tag(
|
|
|
|
'button',
|
|
|
|
array(
|
|
|
|
'class' => 'grey',
|
|
|
|
),
|
|
|
|
pht('Send')),
|
|
|
|
phutil_tag(
|
|
|
|
'div',
|
|
|
|
array(
|
2015-02-27 20:38:33 +01:00
|
|
|
'class' => 'conpherence-durable-column-status',
|
2015-01-27 15:30:52 +01:00
|
|
|
),
|
|
|
|
pht('Status Text')),
|
|
|
|
));
|
|
|
|
|
|
|
|
return array(
|
|
|
|
$header,
|
|
|
|
phutil_tag(
|
|
|
|
'div',
|
|
|
|
array(
|
2015-02-27 20:38:33 +01:00
|
|
|
'class' => 'conpherence-durable-column-body',
|
2015-01-27 15:30:52 +01:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
$icon_bar,
|
|
|
|
$content,
|
|
|
|
$input,
|
|
|
|
$footer,
|
|
|
|
)),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|