source: KernelRecordsMVC.Web/Views/Wishlist/Index.cshtml

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

Various UI bugfixes.

  • Property mode set to 100644
File size: 5.7 KB
Line 
1@model KernelRecordsMVC.Models.Wishlist
2
3@{
4 ViewData["Title"] = "My Wishlist";
5}
6
7<div class="wishlist-page">
8
9 <div class="page-header">
10
11 <div>
12
13 <span class="page-eyebrow">
14 YOUR COLLECTION
15 </span>
16
17 <h1>My Wishlist</h1>
18
19 <p>
20 Save releases and physical formats you want to get later.
21 </p>
22
23 </div>
24
25 </div>
26
27
28 @if (TempData["Success"] != null)
29 {
30 <div class="alert success">
31 @TempData["Success"]
32 </div>
33 }
34
35 @if (TempData["Info"] != null)
36 {
37 <div class="alert info">
38 @TempData["Info"]
39 </div>
40 }
41
42 @if (TempData["Error"] != null)
43 {
44 <div class="alert error">
45 @TempData["Error"]
46 </div>
47 }
48
49
50 @if (Model.WishlistProducts == null ||
51 !Model.WishlistProducts.Any())
52 {
53 <div class="empty-wishlist">
54
55 <div class="empty-icon">
56 ♡
57 </div>
58
59 <h2>
60 Your wishlist is empty
61 </h2>
62
63 <p>
64 Browse our releases and save products
65 you want to purchase later.
66 </p>
67
68 <a asp-controller="Release"
69 asp-action="Index"
70 class="store-button primary">
71
72 Browse Releases
73
74 </a>
75
76 </div>
77 }
78 else
79 {
80 <div class="wishlist-grid">
81
82 @foreach (var item in Model.WishlistProducts)
83 {
84 var product = item.Product;
85 var release = product.Release;
86
87
88 <div class="wishlist-card">
89
90 <!-- COVER -->
91
92 <a asp-controller="Release"
93 asp-action="Details"
94 asp-route-id="@release.ReleaseId"
95 class="wishlist-cover">
96
97 @if (!string.IsNullOrWhiteSpace(
98 release.CoverPhoto))
99 {
100 <img src="@release.CoverPhoto"
101 alt="@release.Title" />
102 }
103 else
104 {
105 <div class="release-no-cover">
106 <span>♪</span>
107 </div>
108 }
109
110 </a>
111
112
113 <!-- CONTENT -->
114
115 <div class="wishlist-info">
116
117 <span class="wishlist-format">
118 @product.Format
119 </span>
120
121
122 <h2>
123
124 <a asp-controller="Release"
125 asp-action="Details"
126 asp-route-id="@release.ReleaseId">
127
128 @release.Title
129
130 </a>
131
132 </h2>
133
134
135 <p class="wishlist-genre">
136 @release.Genre
137 </p>
138
139
140 <!-- PRICE + BUTTONS -->
141
142 <div class="wishlist-bottom">
143
144 <div class="wishlist-price-area">
145
146 <div class="wishlist-price">
147 @product.Price.ToString("C")
148 </div>
149
150
151 @if (product.Stock > 0)
152 {
153 <span class="stock available">
154 In stock
155 </span>
156 }
157 else
158 {
159 <span class="stock unavailable">
160 Out of stock
161 </span>
162 }
163
164 </div>
165
166
167 <div class="wishlist-actions">
168
169 @if (product.Stock > 0)
170 {
171 <form asp-controller="Wishlist"
172 asp-action="AddToCart"
173 method="post">
174
175 @Html.AntiForgeryToken()
176
177 <input type="hidden"
178 name="productId"
179 value="@product.ProductId" />
180
181 <button type="submit"
182 class="store-button">
183
184 Add to Cart
185
186 </button>
187
188 </form>
189 }
190
191
192 <form asp-controller="Wishlist"
193 asp-action="Remove"
194 method="post">
195
196 @Html.AntiForgeryToken()
197
198 <input type="hidden"
199 name="productId"
200 value="@product.ProductId" />
201
202 <button type="submit"
203 class="btn-remove">
204
205 Remove
206
207 </button>
208
209 </form>
210
211 </div>
212
213 </div>
214
215 </div>
216
217 </div>
218 }
219
220 </div>
221 }
222
223</div>
Note: See TracBrowser for help on using the repository browser.