summaryrefslogtreecommitdiff
path: root/CoreWiki/Pages/OldIndex.cshtml
blob: c1342e4493b5a63177ef594cc499fc8d85802bce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@page
@model CoreWiki.Pages.IndexModel

@{
    ViewData["Title"] = "Index";
}

<h1>Index</h1>

<p>
    <a asp-page="Create">Create New</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Article[0].Published)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Article[0].Content)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model.Article) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Published)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Content)
            </td>
            <td>
                <a asp-page="./Edit" asp-route-id="@item.Topic">Edit</a> |
                <a asp-page="./Details" asp-route-id="@item.Topic">Details</a> |
                <a asp-page="./Delete" asp-route-id="@item.Topic">Delete</a>
            </td>
        </tr>
}
    </tbody>
</table>