]> git.sur5r.net Git - bacula/bacula/blob - gui/baculum/protected/Web/Portlets/VolumeList.tpl
baculum: Stop using hidden fields to store item identifiers
[bacula/bacula] / gui / baculum / protected / Web / Portlets / VolumeList.tpl
1 <%@ MasterClass="Application.Web.Portlets.SlideWindow" %>
2 <com:TContent ID="SlideWindowContent">
3         <com:TActivePanel ID="RepeaterShow">
4         <com:TActiveRepeater ID="Repeater">
5                 <prop:ItemTemplate>
6                         <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')%>">
7                                 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/media-icon.png" alt="" /><%#$this->DataItem->volumename%>
8                                 <div id="<%#$this->DataItem->volumename%>_sizebar" class="status-bar-<%#strtolower($this->DataItem->volstatus)%>"><%#$this->DataItem->volstatus%></div>
9                         </div>
10                 </prop:ItemTemplate>
11         </com:TActiveRepeater>
12         </com:TActivePanel>
13         <com:TActivePanel ID="DataGridShow">
14         <com:TActiveDataGrid
15                 ID="DataGrid"
16                 AutoGenerateColumns="false"
17                 AllowSorting="false"
18                 OnSortCommand="sortDataGrid"
19                 CellPadding="5px"
20                 CssClass="window-section-detail"
21                 ItemStyle.CssClass="slide-window-element"
22                 AlternatingItemStyle.CssClass="slide-window-element-alternating"
23         >
24                 <com:TTemplateColumn HeaderText="<input type='checkbox' name='actions_checkbox' onclick=SlideWindow.getObj('VolumeWindow').markAllChecked(this.checked)>" ItemStyle.HorizontalAlign="Center">
25                         <prop:ItemTemplate>
26                                 <input type="checkbox" name="actions_checkbox" value="<%=$this->getParent()->Data['volumename']%>" id="<%=$this->getPage()->VolumeWindow->CheckedValues->ClientID%><%=$this->getParent()->Data['volumename']%>" rel="<%=$this->getPage()->VolumeWindow->CheckedValues->ClientID%>" onclick="SlideWindow.getObj('VolumeWindow').markChecked(this.getAttribute('rel'), this.checked, this.value, true);" />
27                         </prop:ItemTemplate>
28                 </com:TTemplateColumn>
29                 <com:TActiveTemplateColumn HeaderText="<%[ Volume name ]%>" SortExpression="volumename">
30                         <prop:ItemTemplate>
31                                 <div data-type="item_value" rel="<%=$this->getParent()->Data['mediaid']%>" title="<%=$this->getParent()->Data['volumename']%>"><%=$this->getPage()->VolumeWindow->formatVolumeField($this->getParent()->Data['volumename'])%></div>
32                         </prop:ItemTemplate>
33                 </com:TActiveTemplateColumn>
34                 <com:TActiveBoundColumn
35                         SortExpression="slot"
36                         HeaderText="<%[ Slot ]%>"
37                         DataField="slot"
38                         ItemStyle.HorizontalAlign="Center"
39                 />
40                 <com:TActiveTemplateColumn HeaderText="<%[ Pool ]%>" SortExpression="pool">
41                         <prop:ItemTemplate>
42                                 <div title="<%=$this->getParent()->Data['pool']['name']%>"><%=$this->getPage()->VolumeWindow->formatVolumeField($this->getParent()->Data['pool']['name'])%></div>
43                         </prop:ItemTemplate>
44                 </com:TActiveTemplateColumn>
45                 <com:TActiveTemplateColumn HeaderText="<%[ Status ]%>" SortExpression="volstatus">
46                         <prop:ItemTemplate>
47                                 <div id="<%=$this->getParent()->Data['volumename']%>_sizebar" class="status-bar-detail-<%=strtolower($this->getParent()->Data['volstatus'])%>"><%=$this->getParent()->Data['volstatus']%></div>
48                         </prop:ItemTemplate>
49                 </com:TActiveTemplateColumn>
50                 <com:TActiveTemplateColumn HeaderText="<%[ Size ]%>" SortExpression="volbytes">
51                         <prop:ItemTemplate>
52                                 <div class="size" rel="<%=$this->getParent()->Data['volbytes']%>"><%=$this->getParent()->Data['volbytes']%></div>
53                         </prop:ItemTemplate>
54                 </com:TActiveTemplateColumn>
55                 <com:TActiveTemplateColumn HeaderText="<%[ Media Type ]%>" SortExpression="mediatype">
56                         <prop:ItemTemplate>
57                                 <div title="<%=$this->getParent()->Data['mediatype']%>"><%=$this->getPage()->VolumeWindow->formatVolumeField($this->getParent()->Data['mediatype'])%></div>
58                         </prop:ItemTemplate>
59                 </com:TActiveTemplateColumn>
60                 <com:TActiveBoundColumn
61                         SortExpression="whenexpire"
62                         HeaderText="<%[ When expire ]%>"
63                         DataField="whenexpire"
64                 />
65         </com:TActiveDataGrid>
66         <com:TActiveHiddenField ID="CheckedValues" />
67         </com:TActivePanel>
68         <com:TCallback ID="DataElementCall" OnCallback="Page.VolumeWindow.configure">
69                 <prop:ClientSide.OnComplete>
70                         ConfigurationWindow.getObj('VolumeWindow').show();
71                         Formatters.set_formatters();
72                         bind_jobs_on_volume_action();
73                         ConfigurationWindow.getObj('VolumeWindow').progress(false);
74                 </prop:ClientSide.OnComplete>
75         </com:TCallback>
76 </com:TContent>