public $ID;
public $buttonID;
public $windowTitle;
- public $view;
+ public $pools = array();
+ public $old_pool;
public function setID($id) {
$this->ID = $id;
}
public function prepareData($sender, $param) {
+ $this->setPoolList();
$params = $this->getUrlParams(array('volumes'), $this->getPage()->VolumeWindow->ID);
$volumes = $this->Application->getModule('api')->get($params);
$isDetailView = $_SESSION['view' . $this->getPage()->VolumeWindow->ID] == 'details';
}
}
+ private function setPoolList() {
+ $pools = $this->Application->getModule('api')->get(array('pools'));
+ for ($i = 0; $i < count($pools->output); $i++) {
+ $this->pools[$pools->output[$i]->poolid] = $pools->output[$i]->name;
+ }
+ }
+
protected function sortData($data, $key, $id) {
if($this->getSortOrder($id) == parent::SORT_DESC) {
if($key == 'pool') {
<com:TActivePanel ID="RepeaterShow">
<com:TActiveRepeater ID="Repeater">
<prop:ItemTemplate>
+ <%#$this->SourceTemplateControl->old_pool != $this->SourceTemplateControl->pools[$this->DataItem->poolid] ? '<div class="window-section"><span>' . Prado::localize('Pool:') . ' ' . $this->SourceTemplateControl->pools[$this->DataItem->poolid] . '<span></div>': ''%>
+
<div data-type="item_value" rel="<%#$this->DataItem->mediaid%>" class="slide-window-element" title="<%#($this->DataItem->recycle == 1 && !empty($this->DataItem->lastwritten) && in_array($this->DataItem->volstatus, array('Full', 'Used'))) ? Prado::localize('When expire:') . date( ' Y-m-d H:i:s', (strtotime($this->DataItem->lastwritten) + $this->DataItem->volretention)) : ''%> <%=Prado::localize('Last written:')%> <%=!empty($this->DataItem->lastwritten) ? $this->DataItem->lastwritten : Prado::localize('never written')%>">
<img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/media-icon.png" alt="" /><%#$this->DataItem->volumename%>
<div id="<%#$this->DataItem->volumename%>_sizebar" class="status-bar-<%#strtolower($this->DataItem->volstatus)%>"><%#$this->DataItem->volstatus%></div>
</div>
+ <%#!($this->SourceTemplateControl->old_pool = $this->SourceTemplateControl->pools[$this->DataItem->poolid])%>
</prop:ItemTemplate>
</com:TActiveRepeater>
</com:TActivePanel>
/>
<com:TActiveTemplateColumn HeaderText="<%[ Pool ]%>" SortExpression="pool">
<prop:ItemTemplate>
- <div title="<%=$this->getParent()->Data['pool']['name']%>"><%=$this->getPage()->VolumeWindow->formatVolumeField($this->getParent()->Data['pool']['name'])%></div>
+ <div title="<%#$this->SourceTemplateControl->pools[$this->getParent()->Data['poolid']]%>"><%#$this->getPage()->VolumeWindow->formatVolumeField($this->SourceTemplateControl->pools[$this->getParent()->Data['poolid']])%></div>
</prop:ItemTemplate>
</com:TActiveTemplateColumn>
<com:TActiveTemplateColumn HeaderText="<%[ Status ]%>" SortExpression="volstatus">