main
|
Last change
on this file since 08aefc6 was 08aefc6, checked in by mmilevski <markomilevski3@…>, 4 weeks ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
2.9 KB
|
| Line | |
|---|
| 1 | @model IEnumerable<KernelRecordsMVC.Models.Release>
|
|---|
| 2 |
|
|---|
| 3 | <div class="d-flex justify-content-between align-items-center mb-4">
|
|---|
| 4 |
|
|---|
| 5 | <div>
|
|---|
| 6 | <h1>Music Store</h1>
|
|---|
| 7 | <p class="text-muted">
|
|---|
| 8 | Browse CDs, vinyl records and cassettes.
|
|---|
| 9 | </p>
|
|---|
| 10 | </div>
|
|---|
| 11 |
|
|---|
| 12 | </div>
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 | <!-- SEARCH -->
|
|---|
| 16 |
|
|---|
| 17 | <form asp-action="Index"
|
|---|
| 18 | method="get"
|
|---|
| 19 | class="row g-2 mb-4">
|
|---|
| 20 |
|
|---|
| 21 | <div class="col-md-6">
|
|---|
| 22 |
|
|---|
| 23 | <input type="text"
|
|---|
| 24 | name="search"
|
|---|
| 25 | value="@ViewBag.Search"
|
|---|
| 26 | class="form-control"
|
|---|
| 27 | placeholder="Search releases..." />
|
|---|
| 28 |
|
|---|
| 29 | </div>
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 | <div class="col-md-3">
|
|---|
| 33 |
|
|---|
| 34 | <select name="genre"
|
|---|
| 35 | class="form-select">
|
|---|
| 36 |
|
|---|
| 37 | <option value="">
|
|---|
| 38 | All genres
|
|---|
| 39 | </option>
|
|---|
| 40 |
|
|---|
| 41 | @foreach (var genre in ViewBag.Genres)
|
|---|
| 42 | {
|
|---|
| 43 | <option value="@genre"
|
|---|
| 44 | selected="@(ViewBag.Genre == genre)">
|
|---|
| 45 |
|
|---|
| 46 | @genre
|
|---|
| 47 |
|
|---|
| 48 | </option>
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | </select>
|
|---|
| 52 |
|
|---|
| 53 | </div>
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 | <div class="col-md-3">
|
|---|
| 57 |
|
|---|
| 58 | <button type="submit"
|
|---|
| 59 | class="btn btn-primary w-100">
|
|---|
| 60 |
|
|---|
| 61 | Search
|
|---|
| 62 |
|
|---|
| 63 | </button>
|
|---|
| 64 |
|
|---|
| 65 | </div>
|
|---|
| 66 |
|
|---|
| 67 | </form>
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 | <!-- RELEASES -->
|
|---|
| 71 |
|
|---|
| 72 | <div class="row">
|
|---|
| 73 |
|
|---|
| 74 | @foreach (var release in Model)
|
|---|
| 75 | {
|
|---|
| 76 | <div class="col-md-4 mb-4">
|
|---|
| 77 |
|
|---|
| 78 | <div class="card h-100 shadow-sm">
|
|---|
| 79 |
|
|---|
| 80 | @if (!string.IsNullOrEmpty(release.CoverPhoto))
|
|---|
| 81 | {
|
|---|
| 82 | <img src="@release.CoverPhoto"
|
|---|
| 83 | class="card-img-top"
|
|---|
| 84 | style="height:300px; object-fit:cover;"
|
|---|
| 85 | alt="@release.Title" />
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|
| 88 | <div class="card-body">
|
|---|
| 89 |
|
|---|
| 90 | <h4 class="card-title">
|
|---|
| 91 | @release.Title
|
|---|
| 92 | </h4>
|
|---|
| 93 |
|
|---|
| 94 | <p class="text-muted mb-1">
|
|---|
| 95 | @release.Genre
|
|---|
| 96 | </p>
|
|---|
| 97 |
|
|---|
| 98 | <p class="small">
|
|---|
| 99 | @release.ReleaseDate.ToString("yyyy")
|
|---|
| 100 | </p>
|
|---|
| 101 |
|
|---|
| 102 |
|
|---|
| 103 | <!-- ARTISTS -->
|
|---|
| 104 |
|
|---|
| 105 | <p>
|
|---|
| 106 |
|
|---|
| 107 | @string.Join(
|
|---|
| 108 | ", ",
|
|---|
| 109 | release.ReleaseArtists
|
|---|
| 110 | .OrderBy(x => x.ReleaseOrdinal)
|
|---|
| 111 | .Select(x => x.Artist.ArtistName)
|
|---|
| 112 | )
|
|---|
| 113 |
|
|---|
| 114 | </p>
|
|---|
| 115 |
|
|---|
| 116 |
|
|---|
| 117 | <!-- AVAILABLE FORMATS -->
|
|---|
| 118 |
|
|---|
| 119 | <div class="mb-3">
|
|---|
| 120 |
|
|---|
| 121 | @foreach (var product in release.Products)
|
|---|
| 122 | {
|
|---|
| 123 | <span class="badge bg-secondary me-1">
|
|---|
| 124 |
|
|---|
| 125 | @product.Format
|
|---|
| 126 |
|
|---|
| 127 | </span>
|
|---|
| 128 | }
|
|---|
| 129 |
|
|---|
| 130 | </div>
|
|---|
| 131 |
|
|---|
| 132 |
|
|---|
| 133 | <a asp-action="Details"
|
|---|
| 134 | asp-route-id="@release.ReleaseId"
|
|---|
| 135 | class="btn btn-primary">
|
|---|
| 136 |
|
|---|
| 137 | View Release
|
|---|
| 138 |
|
|---|
| 139 | </a>
|
|---|
| 140 |
|
|---|
| 141 | </div>
|
|---|
| 142 |
|
|---|
| 143 | </div>
|
|---|
| 144 |
|
|---|
| 145 | </div>
|
|---|
| 146 | }
|
|---|
| 147 |
|
|---|
| 148 | </div> |
|---|
Note:
See
TracBrowser
for help on using the repository browser.