Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @using Resources;
- @model IEnumerable<JSSailing.Models.member>
- @{
- ViewBag.Title = JSTranslations.member_list;
- int itemNumber = 0;
- string previousPageURL = Url.Action("Index", new { page = Math.Max(((int)ViewBag.page) - 1, 1) });
- string nextPageURL = Url.Action("Index", new { page = Math.Min(((int)ViewBag.page) + 1, (int)ViewBag.pageCount) });
- if (ViewBag.pageCount > 1)
- {
- ViewBag.Title += String.Format(" ({0} / {1})", ViewBag.page, ViewBag.pageCount);
- }
- string buttonClasses = "btn btn-default";
- string leftBttnClasses = "pull-left";
- string rightBttnClasses = "pull-right";
- if ((int)ViewBag.page == 1)
- {
- leftBttnClasses += " disabled";
- }
- if ((int)ViewBag.page == (int)ViewBag.pageCount)
- {
- rightBttnClasses += " disabled";
- }
- }
- <h2>@ViewBag.Title</h2>
- @if (ViewBag.pageCount > 1)
- {
- <div>
- <a href="@previousPageURL" class="@String.Format("{0} {1}", buttonClasses, leftBttnClasses)" accesskey="p">@JSTranslations.common_prevPage</a>
- <a href="@nextPageURL" class="@String.Format("{0} {1}", buttonClasses, rightBttnClasses)" accesskey="n">@JSTranslations.common_nextPage</a>
- </div>
- }
- @Html.ActionLink(JSTranslations.member_addNew, "Create", null, new { @class="pull-left", style="clear: both;" })
- <table class="table">
- <tr>
- <th>
- @Html.DisplayNameFor(model => model.fullName)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.homePhone)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.email)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.yearJoined)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.comment)
- </th>
- <th></th>
- </tr>
- @foreach (var item in Model) {
- <tr>
- <td>
- @Html.DisplayFor(modelItem => item.fullName)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.homePhone)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.email)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.yearJoined)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.comment)
- </td>
- <td>
- @Html.ActionLink(JSTranslations.common_edit, "Edit", new { id=item.memberId }) |
- @Html.ActionLink(JSTranslations.common_details, "Details", new { id=item.memberId }) |
- @Html.ActionLink(JSTranslations.common_delete, "Delete", new { id=item.memberId })
- </td>
- </tr>
- }
- </table>
Advertisement
Add Comment
Please, Sign In to add comment