| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- @model IEnumerable<GreenTree.Strohrmann.ERP.Web.Models.Rights.User.UserModel>
- @{
- ViewData["Title"] = "Benutzerverwaltung";
- }
- <!-- Custom JavaScript -->
- <script>
- $(window).resize(function () {
- $(".dataTables_scrollBody").height($(window).height() - 260);
- });
- $(document).ready(function () {
- $("#usersTable").DataTable({
- scrollY: $(window).height() - 260 + "px",
- autoWidth: true,
- paging: false,
- "bInfo": false,
- columns: [
- {
- data: "ID",
- orderable: true
- },
- {
- data: "Kontoname",
- orderable: true
- },
- {
- data: "Vorname",
- orderable: true
- },
- {
- data: "Nachname",
- orderable: true
- },
- {
- data: "Geburtsdatum",
- orderable: true
- },
- {
- data: "Aktiviert",
- orderable: true
- },
- {
- data: "Rechte",
- orderable: false
- },
- {
- data: "Aktionen",
- orderable: false
- }
- ],
- language: {
- zeroRecords: "Keine Einträge gefunden",
- search: "Suchen:"
- }
- });
- });
- function showDeleteModal(id) {
- if (!id) return;
- $('#deleteModal').modal("show");
- $("[name='id'").val(id);
- }
- </script>
- <h1>Benutzerverwaltung</h1>
- <p>
- <a asp-action="Create">Neuen Benutzer anlegen</a>
- </p>
- <table id="usersTable" class="table">
- <thead>
- <tr>
- <th>
- @Html.DisplayNameFor(model => model.Id)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Accountname)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Forename)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Lastname)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Birthdate)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Activated)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Policies)
- </th>
- <th>
- Aktionen
- </th>
- </tr>
- </thead>
- <tbody>
- @foreach (var item in Model) {
- <tr>
- <td>
- @Html.DisplayFor(modelItem => item.Id)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Accountname)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Forename)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Lastname)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Birthdate)
- </td>
- <td>
- @Html.YesNoBadgeFor(modelItem => item.Activated)
- </td>
- <td>
- @Html.TokenBoxFor(modelItem => item.Policies)
- </td>
- <td>
- @Html.ActionLink("Bearbeiten", "Edit", new { id = item.Id }) |
- @Html.ActionLink("Anzeigen", "Details", new { id = item.Id }) |
- <a href="#" onclick="showDeleteModal(@item.Id)">Löschen</a>
- </td>
- </tr>
- }
- </tbody>
- </table>
- <div id="deleteModal" class="modal fade" tabindex="-1" role="dialog">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title">Benutzer löschen</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <form asp-action="Delete">
- <div class="modal-body">
- <p>Sind Sie sicher, dass Sie diesen Benutzer löschen möchten?</p>
- <input name="id" type="hidden" />
- </div>
- <div class="modal-footer">
- <button type="submit" class="btn btn-primary">Ja</button>
- <button type="button" class="btn btn-secondary" data-dismiss="modal">Nein</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- @section Scripts {
- @{
- await Html.RenderPartialAsync("_TokenBoxLibPartial");
- }
- }
|