@model IEnumerable<CampainTaskItem>
@{
    ViewBag.PageTitle = @Resource.TaskPage_Title;
}

<script type="text/javascript" src="@Url.Content("~/Scripts/Tasks.js")"></script>
<script type="text/javascript">
    function setRange(start, end) {
        reset();
        getData(start, end);
    }

    function getData(start, end) {
        updateData(start, end, '@Url.Action("GetTasks")');
    }
</script>
<div class="flex vertical auto" style="overflow:hidden;">
    <c1-tab-panel id="tpTasks" selected-index-changed="selectedIndexChanged">
        <div>
            <a>@Resource.AllTasks_Header</a>
            <div>
            </div>
        </div>
        <div>
            <a>@Resource.InProgress_Header</a>
            <div>
            </div>
        </div>
        <div>
            <a>@Resource.Completed_Header</a>
            <div>
            </div>
        </div>
        <div>
            <a>@Resource.Deferred_Header</a>
            <div>
            </div>
        </div>
        <div>
            <a>@Resource.Urgent_Header</a>
            <div>
            </div>
        </div>
    </c1-tab-panel>
    <div id="groupPanel"></div>
    <div class="auto" style="overflow:hidden">
        <c1-flex-grid id="gridTasks"
                      headers-visibility="Column"
                      allow-sorting="true"
                      auto-generate-columns="false"
                      show-alternating-rows="false"
                      is-read-only="true"
                      show-groups="true"
                      item-formatter="completeFormatter">
            <c1-flex-grid-column binding="AssignedTo" header="Assigned To" width="*"></c1-flex-grid-column>
            <c1-flex-grid-column binding="Subject" width="*"></c1-flex-grid-column>
            <c1-flex-grid-column binding="ItemName" header="Item Name" width="*"></c1-flex-grid-column>
            <c1-flex-grid-column binding="DueDate" header="Due Date" width="*"></c1-flex-grid-column>
            <c1-flex-grid-column binding="Complete" width="*"></c1-flex-grid-column>
            <c1-flex-grid-group-panel max-groups="4" placeholder="Please add columns for grouping here" selector="#groupPanel"></c1-flex-grid-group-panel>
        </c1-flex-grid>
    </div>
    <div>
        @Html.Partial("RangeSelector", ViewBag.RangeSelectorModel as RangeSelectorModel)
    </div>
</div>