@model IEnumerable<MileageTraker.Web.Models.PurposeType>

@{
    ViewBag.Title = "Purposes";
    var grid = new WebGrid(Model, canSort: false, canPage: false);
}

@Html.Partial("_StatusMessage")

<h2><i class="fa fa-arrow-right"></i> @ViewBag.Title</h2>
    
<div class="btn-toolbar pull-left">
    @Html.ActionLink("Add new Purpose", "Create", null, new{@class="btn"})
</div>
    
@grid.GetHtml(columns:
    grid.Columns(
        grid.Column("Purpose"),
        grid.Column("SortOrder", "Sort Order"),
        grid.Column(format:
                    @<div class='btn-group'>
                        @Html.ActionLink("Edit", "Edit", new { id = item.PurposeTypeId }, new { @class = "btn btn-mini" })
                        @Html.ActionLink("Details", "Details", new { id = item.PurposeTypeId }, new { @class = "btn btn-mini" })
                    </div>)
        ),
        htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
    )
