~ubuntu-branches/ubuntu/wily/phabricator/wily

« back to all changes in this revision

Viewing changes to phabricator/src/view/phui/PHUIDurableColumn.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2015-04-28 03:01:19 UTC
  • mfrom: (0.22.1) (0.21.1) (0.17.2) (2.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20150428030119-36t1maxz1gh3ojyg
Tags: 0~git20150428-1
* New snapshot release
* fixed nginx configuration (closes: #779705)
* start mysql before phd daemons, if available (closes: #780260, #780265)
* fixed log files permissions (closes: #781825)
* added spanish translation (closes: #783566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 
3
 
final class PHUIDurableColumn extends AphrontTagView {
4
 
 
5
 
  protected function getTagAttributes() {
6
 
    return array(
7
 
      'id' => 'durable-column',
8
 
      'class' => 'phui-durable-column',
9
 
    );
10
 
  }
11
 
 
12
 
  protected function getTagContent() {
13
 
    Javelin::initBehavior('durable-column');
14
 
 
15
 
    $classes = array();
16
 
    $classes[] = 'phui-durable-column-header';
17
 
    $classes[] = 'sprite-main-header';
18
 
    $classes[] = 'main-header-'.PhabricatorEnv::getEnvConfig('ui.header-color');
19
 
 
20
 
    $header = phutil_tag(
21
 
      'div',
22
 
      array(
23
 
        'class' => implode(' ', $classes),
24
 
      ),
25
 
      phutil_tag(
26
 
        'div',
27
 
        array(
28
 
          'class' => 'phui-durable-column-header-text',
29
 
        ),
30
 
        pht('Column Prototype')));
31
 
 
32
 
    $icon_bar = phutil_tag(
33
 
      'div',
34
 
      array(
35
 
        'class' => 'phui-durable-column-icon-bar',
36
 
      ),
37
 
      null); // <-- TODO: Icon buttons go here.
38
 
 
39
 
    $copy = pht(
40
 
      'This is a very early prototype of a persistent column. It is not '.
41
 
      'expected to work yet, and leaving it open will activate other new '.
42
 
      'features which will break things. Press "\\" (backslash) on your '.
43
 
      'keyboard to close it now.');
44
 
 
45
 
    $content = phutil_tag(
46
 
      'div',
47
 
      array(
48
 
        'class' => 'phui-durable-column-main',
49
 
      ),
50
 
      phutil_tag(
51
 
        'div',
52
 
        array(
53
 
          'id' => 'phui-durable-column-content',
54
 
          'class' => 'phui-durable-column-frame',
55
 
        ),
56
 
        phutil_tag(
57
 
          'div',
58
 
          array(
59
 
            'class' => 'phui-durable-column-content',
60
 
          ),
61
 
          $copy)));
62
 
 
63
 
    $input = phutil_tag(
64
 
      'textarea',
65
 
      array(
66
 
        'class' => 'phui-durable-column-textarea',
67
 
        'placeholder' => pht('Box for text...'),
68
 
      ));
69
 
 
70
 
    $footer = phutil_tag(
71
 
      'div',
72
 
      array(
73
 
        'class' => 'phui-durable-column-footer',
74
 
      ),
75
 
      array(
76
 
        phutil_tag(
77
 
          'button',
78
 
          array(
79
 
            'class' => 'grey',
80
 
          ),
81
 
          pht('Send')),
82
 
        phutil_tag(
83
 
          'div',
84
 
          array(
85
 
            'class' => 'phui-durable-column-status',
86
 
          ),
87
 
          pht('Status Text')),
88
 
      ));
89
 
 
90
 
    return array(
91
 
      $header,
92
 
      phutil_tag(
93
 
        'div',
94
 
        array(
95
 
          'class' => 'phui-durable-column-body',
96
 
        ),
97
 
        array(
98
 
          $icon_bar,
99
 
          $content,
100
 
          $input,
101
 
          $footer,
102
 
        )),
103
 
    );
104
 
  }
105
 
 
106
 
}