%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2010 %>
context_title, :name=>context_name) %>"
helpUrl="<%=help_link(HELP_URL_CONFIG['scheduling_objects']['forecast_models']['available_forecasts'])%>"
region="center"
lazyRender="true"
dojoType="helpsys.ext.LiveGrid"
authenticity_token="<%= form_authenticity_token %>"
autoExpandColumn="forecastsGridGenerationTime"
<% if (params[:parent_id] && params[:parent_type]) %>
baseParameters="{
results: 300,
parent_id: <%= params[:parent_id] %>,
parent_type: '<%= params[:parent_type] %>'
}"
<% end %>
dataColumns="[{name: 'id'}, {name: 'creation_start_timestamp'}, {name: 'window_start_timestamp'}, {name: 'window_end_timestamp'}, {name: 'status'}]"
deletePath="<%= forecast_path(-1) %>"
editInPopup="false"
gridColumns="[{dataIndex: 'creation_start_timestamp', header: '<%=t "forecast.generation_time" %>', id: 'forecastsGridGenerationTime', locked: false, sortable: true, width: 200, filter: true, filterType: 'date'},
{dataIndex: 'window_start_timestamp', header: '<%=t "forecast.start_time" %>', id: 'forecastsGridStartTime', locked: false, sortable: true, width: 200, filter: true, filterType: 'date'},
{dataIndex: 'window_end_timestamp', header: '<%=t "forecast.end_time" %>', id: 'forecastsGridEndTime', locked: false, sortable: true, width: 200, filter: true, filterType: 'date'},
{dataIndex: 'status', header: '<%=t "forecast.status" %>', id: 'forecastsGridStatus', locked: false, sortable: false, width: 200, filter: false}]"
includeDelete="true"
includeEdit="false"
includeShow="true"
includeTagFilter="false"
menuCfg="{items: [{
iconCls: 'icon_edit',
text: '<%= t('.view_forecast') %>',
actsOn: 'one',
actionUrl: '<%= forecast_path(-1) %>'
},{
iconCls: 'icon_control',
text: '<%=t ('.create_report') %>',
menu: {
items: [{
iconCls: 'icon_forecast_schedule',
text: '<%=t ('.pdf') %>',
actsOn: 'one',
actionUrl: '<%= pdf_report_forecast_model_forecast_path(:parent_id,-1) %>',
usePopup: true
},{
iconCls: 'icon_special_instance',
text: '<%=t ('.csv') %>',
actsOn: 'one',
actionUrl: '<%= csv_report_forecast_model_forecast_path(:parent_id,-1) %>',
usePopup: true
}]
}
},'-',{
iconCls: 'icon_delete',
text: '<%= t('.delete_forecast') %>',
actsOn: 'one',
method: 'DELETE',
actionUrl: '<%= forecast_path(-1) %>',
ajaxRequest: true,
confirmText: '<%=t ".delete_confirmation" %>'
}
]}"
showInPopup=false
showPath="<%= forecast_path(-1) %>"
sortField="{field: 'creation_start_timestamp', direction: 'DESC'}"
tbar="{items: [{
text: '<%=t "forecast_definitions.index.run_forecast" %>',
actsOn: 'none',
actionUrl: '<%= run_forecast_forecast_model_path(context_id) %>',
method: 'POST',
ajaxRequest: true
}]}"
url="<%= forecasts_path(:format => 'json') %>">