Restore highlighting when jumping to transactions using URI anchors
[phabricator/blender.git] / src / view / layout / AphrontMoreView.php
blob9fe9389ed5c062daf26361243d04082d33193f46
1 <?php
3 final class AphrontMoreView extends AphrontView {
5 private $some;
6 private $more;
7 private $expandtext;
9 public function setSome($some) {
10 $this->some = $some;
11 return $this;
14 public function setMore($more) {
15 $this->more = $more;
16 return $this;
19 public function setExpandText($text) {
20 $this->expandtext = $text;
21 return $this;
24 public function render() {
26 $content = array();
27 $content[] = $this->some;
29 if ($this->more && $this->more != $this->some) {
30 $text = "(".pht('Show More')."\xE2\x80\xA6)";
31 if ($this->expandtext !== null) {
32 $text = $this->expandtext;
35 Javelin::initBehavior('aphront-more');
36 $content[] = ' ';
37 $content[] = javelin_tag(
38 'a',
39 array(
40 'sigil' => 'aphront-more-view-show-more',
41 'mustcapture' => true,
42 'href' => '#',
43 'meta' => array(
44 'more' => $this->more,
47 $text);
50 return javelin_tag(
51 'div',
52 array(
53 'sigil' => 'aphront-more-view',
55 $content);