%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %>
"
helpUrl="<%=help_link(HELP_URL_CONFIG['scheduling_objects']['forecast_models']['forecast_model_manager'])%>"
region="center"
lazyRender="true"
dojoType="helpsys.ext.LiveGrid"
authenticity_token="<%= form_authenticity_token %>"
autoExpandColumn="forecast_definitionsGridDescription"
dataColumns="[{name: 'id'}, {name: 'name'}, {name: 'description'}, {name: 'last_run'}, {name: 'forecast_period'}, {name: 'status'}]"
deletePath="<%= forecast_model_path(-1) %>"
editPath="<%= edit_forecast_model_path(-1) %>"
editInPopup="false"
gridColumns="[{dataIndex: 'name', header: '<%=t "common.name" %>', id: 'forecast_definitionsGridName', locked: false, sortable: true, width: 200, filter: true, filterType: 'string'},
{dataIndex: 'description', header: '<%=t "common.description" %>', id: 'forecast_definitionsGridDescription', locked: false, sortable: true, width: 200, filter: true, filterType: 'string'},
{dataIndex: 'last_run', header: '<%=t "common.last_run" %>', id: 'forecast_definitionsGridLastRun', locked: false, sortable: true, width: 200, filter: true, filterType: 'date'},
{dataIndex: 'forecast_period', header: '<%=t "common.forecast_period" %>', id: 'forecast_definitionsGridForecastPeriod', locked: false, sortable: false, width: 200, filter: false},
{dataIndex: 'status', header: '<%=t "common.status" %>', id: 'forecast_definitionsGridStatus', locked: false, sortable: false, width: 100, filter: false}]"
includeDelete="true"
includeEdit="true"
includeShow="true"
includeTagFilter="true"
tagMatchAnyDefault="<%= match_any_default %>"
itemType='<%= t('common.forecast_definition') %>'
menuCfg="{items: [{
iconCls: 'icon_edit',
text: '<%= t('.edit_forecast_definition') %>',
actsOn: 'one',
actionUrl: '<%= edit_forecast_model_path(-1) %>'
},{
iconCls: 'icon_copy',
text: '<%= t('.copy_forecast_definition') %>',
actsOn: 'one',
actionUrl: '<%= copy_forecast_model_path(-1) %>'
},{
iconCls: 'icon_delete',
text: '<%= t('.delete_forecast_definition') %>',
actsOn: 'one',
method: 'DELETE',
actionUrl: '<%= forecast_model_path(-1) %>',
ajaxRequest: true,
confirmText: '<%=t ".delete_confirmation" %>'
}, '-',{
iconCls: 'icon_audit',
text: '<%=t "common.show_audit_changes" %>',
actsOn: 'one',
actionUrl: '<%= audits_path(:auditable_id => -1, :auditable_type => 'ForecastDefinition') %>'
}, '-',{
iconCls: 'icon_view_last',
text: '<%=t ".view_last_forecast" %>',
actsOn: 'one',
actionUrl: '<%= last_forecast_forecast_model_forecasts_path(:forecast_model_id => -1) %>'
}, {
iconCls: 'icon_view',
text: '<%=t ".view_all_forecasts" %>',
actsOn: 'one',
actionUrl: '<%= forecast_model_forecasts_path(:forecast_model_id => -1) %>'
}, '-',{
iconCls: 'icon_run_forecast',
text: '<%=t ".run_forecast" %>',
actsOn: 'one',
actionUrl: '<%= run_forecast_forecast_model_path(-1) %>',
method: 'POST',
ajaxRequest: true
}]}"
sortField="{field: 'name', direction: 'ASC'}"
tbar="{items: [{
iconCls: 'icon_create',
text: '<%= t('.create_forecast_definition') %>',
actsOn: 'none',
actionUrl: '<%= new_forecast_model_path %>'
}]}"
url="<%= forecast_models_path(:format => 'json') %>" style="height:100%;">