Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIPinboardItemView.php
| Show All 40 Lines | public function setDisabled($disabled) { | ||||
| $this->disabled = $disabled; | $this->disabled = $disabled; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function render() { | public function render() { | ||||
| require_celerity_resource('phui-pinboard-view-css'); | require_celerity_resource('phui-pinboard-view-css'); | ||||
| $header = null; | $header = null; | ||||
| if ($this->header) { | if ($this->header) { | ||||
| $header_color = null; | |||||
| if ($this->disabled) { | if ($this->disabled) { | ||||
| $header_color = 'gradient-lightgrey-header'; | $header_color = 'phui-pinboard-disabled'; | ||||
| } else { | |||||
| $header_color = 'gradient-lightblue-header'; | |||||
| } | } | ||||
| $header = phutil_tag( | $header = phutil_tag( | ||||
| 'div', | 'div', | ||||
| array( | array( | ||||
| 'class' => 'phui-pinboard-item-header '. | 'class' => 'phui-pinboard-item-header '.$header_color, | ||||
| 'sprite-gradient '.$header_color, | |||||
| ), | ), | ||||
| phutil_tag('a', array('href' => $this->uri), $this->header)); | phutil_tag('a', array('href' => $this->uri), $this->header)); | ||||
| } | } | ||||
| $image = null; | $image = null; | ||||
| if ($this->imageWidth) { | if ($this->imageWidth) { | ||||
| $image = phutil_tag( | $image = phutil_tag( | ||||
| 'a', | 'a', | ||||
| ▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines | |||||