@using ScaffoldingExample.Helpers
@using QuickForm
@model QuickFormModel

@{
    bool isWithOrder = OrderCheckHelper.WithOrder(Model.ControllerName);
}

<h2 class="dataform_header">@Model.DataTypeName_ForIndex</h2>

<div class="btn-group">
    <button type="button" class="btn btn-default" title="Добавить" onclick="ActionCreateWithDtid(uriCreate, [], [])">
        <img src="~/Images/add.png"/>
    </button>
    <button type="button" class="btn btn-default" title="Редактировать выделенную запись" onclick="ActionWithId(uriEdit)">
        <img src="~/Images/edit.png" />
    </button>
    <button type="button" class="btn btn-default" title="Удалить выделенную запись" onclick="ActionWithId(uriDelete)">
        <img src="~/Images/delete.png" />
    </button>
    
    @if(isWithOrder)
    { 
    <button type="button" class="btn btn-default" title="Переместить выше" onclick="ActionChangeOrder(uriChangeOrder, '1')">
        <img src="~/Images/arrow_up.png" />
    </button>
    <button type="button" class="btn btn-default" title="Переместить ниже" onclick="ActionChangeOrder(uriChangeOrder, '2')">
        <img src="~/Images/arrow_down.png" />
    </button>
    }
</div>

<div class="dt_div">
    <table cellpadding="0" cellspacing="0" border="0" class="display" id="dt">
        
        @if(isWithOrder)
        { 
        <thead>
        <th width="0%"></th>
        <th width="20%">Порядковый №</th>
        <th width="80%">Наименование</th>
        </thead>
        }
        else
        { 
        <thead>
        <th width="0%"></th>
        <th width="100%">Наименование</th>
        </thead>
        }
    </table>
</div>
