source: KernelRecordsMVC.Web/Views/Admin/Releases.cshtml@ d89d25b

main
Last change on this file since d89d25b was d89d25b, checked in by mmilevski <markomilevski3@…>, 4 weeks ago

Added few implementaions, minor UI changes.

  • Property mode set to 100644
File size: 2.7 KB
Line 
1@model IEnumerable<KernelRecordsMVC.Models.Release>
2
3@{
4 ViewData["Title"] = "Manage Releases";
5}
6
7<div class="admin-page">
8
9 <div class="admin-header">
10
11 <div>
12
13 <a asp-action="Index"
14 class="admin-back-link">
15 ← Dashboard
16 </a>
17
18 <span class="admin-eyebrow">
19 CATALOG MANAGEMENT
20 </span>
21
22 <h1>Releases</h1>
23
24 <p>
25 Manage albums and singles in the catalog.
26 </p>
27
28 </div>
29
30
31 <a asp-action="CreateRelease"
32 class="admin-button primary">
33 + New Release
34 </a>
35
36 </div>
37
38
39 @if (TempData["Success"] != null)
40 {
41 <div class="admin-alert success">
42 ✓ @TempData["Success"]
43 </div>
44 }
45
46
47 <div class="admin-table-wrapper">
48
49 <table class="admin-table">
50
51 <thead>
52
53 <tr>
54 <th>Release</th>
55 <th>Artist</th>
56 <th>Genre</th>
57 <th>Date</th>
58 <th></th>
59 </tr>
60
61 </thead>
62
63
64 <tbody>
65
66 @foreach (var release in Model)
67 {
68 var mainArtist =
69 release.ReleaseArtists
70 .OrderBy(x => x.ReleaseOrdinal)
71 .FirstOrDefault();
72
73 <tr>
74
75 <td>
76
77 <strong>
78 @release.Title
79 </strong>
80
81 </td>
82
83
84 <td>
85
86 @(mainArtist?.Artist.ArtistName
87 ?? "Unknown")
88
89 </td>
90
91
92 <td>
93 @release.Genre
94 </td>
95
96
97 <td>
98 @release.ReleaseDate.ToString("yyyy-MM-dd")
99 </td>
100
101
102 <td class="admin-table-actions">
103
104 <a asp-action="EditRelease"
105 asp-route-id="@release.ReleaseId"
106 class="admin-button secondary">
107 Edit
108 </a>
109
110 <a asp-controller="Release"
111 asp-action="Details"
112 asp-route-id="@release.ReleaseId"
113 class="admin-button secondary">
114 View
115 </a>
116
117 </td>
118
119 </tr>
120 }
121
122 </tbody>
123
124 </table>
125
126 </div>
127
128</div>
Note: See TracBrowser for help on using the repository browser.