Ignore:
Timestamp:
09/01/26 07:17:16 (4 weeks ago)
Author:
mmilevski <markomilevski3@…>
Branches:
main
Children:
595d2e5
Parents:
d2eccb3
Message:

Added few implementaions, minor UI changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • KernelRecordsMVC.Web/Views/Release/Details.cshtml

    rd2eccb3 rd89d25b  
    6868                </div>
    6969
     70
    7071                <div>
    7172
    … …  
    7879                </div>
    7980
     81
    8082                <div>
    8183
    … …  
    8385
    8486                    <strong>
    85                         @Model.RecordLabel
     87                        @(string.IsNullOrWhiteSpace(Model.RecordLabel)
     88                            ? "Independent"
     89                            : Model.RecordLabel)
    8690                    </strong>
    8791
    … …  
    102106                        .OrderBy(x => x.ReleaseOrdinal))
    103107                    {
    104                         <span class="artist-tag">
     108                        <a asp-controller="Artist"
     109                           asp-action="Details"
     110                           asp-route-id="@artist.ArtistId"
     111                           class="artist-tag">
    105112
    106113                            @artist.Artist.ArtistName
    … …  
    113120                            }
    114121
    115                         </span>
     122                        </a>
    116123                    }
    117124
    … …  
    172179                                @product.Format
    173180                            </span>
     181
    174182
    175183                            @if (product.Stock > 0)
    … …  
    203211                            <div class="product-actions">
    204212
     213                                <!-- ADD TO CART -->
     214
    205215                                <a asp-controller="Order"
    206216                                   asp-action="AddProduct"
    … …  
    212222                                </a>
    213223
    214                                 <a asp-controller="Wishlist"
    215                                    asp-action="Add"
    216                                    asp-route-productId="@product.ProductId"
    217                                    class="store-button secondary">
    218 
    219                                     ♡ Wishlist
    220 
    221                                 </a>
     224
     225                                <!-- ADD TO WISHLIST -->
     226
     227                                <form asp-controller="Wishlist"
     228                                      asp-action="Add"
     229                                      method="post">
     230
     231                                    @Html.AntiForgeryToken()
     232
     233                                    <input type="hidden"
     234                                           name="productId"
     235                                           value="@product.ProductId" />
     236
     237                                    <button type="submit"
     238                                            class="store-button secondary">
     239
     240                                        ♡ Wishlist
     241
     242                                    </button>
     243
     244                                </form>
    222245
    223246                            </div>
    … …  
    227250                            <div class="product-actions">
    228251
    229                                 <a asp-controller="Wishlist"
    230                                    asp-action="Add"
    231                                    asp-route-productId="@product.ProductId"
    232                                    class="store-button secondary full">
    233 
    234                                     ♡ Add to Wishlist
    235 
    236                                 </a>
     252                                <!-- OUT OF STOCK: WISHLIST ONLY -->
     253
     254                                <form asp-controller="Wishlist"
     255                                      asp-action="Add"
     256                                      method="post">
     257
     258                                    @Html.AntiForgeryToken()
     259
     260                                    <input type="hidden"
     261                                           name="productId"
     262                                           value="@product.ProductId" />
     263
     264                                    <button type="submit"
     265                                            class="store-button secondary full">
     266
     267                                        ♡ Add to Wishlist
     268
     269                                    </button>
     270
     271                                </form>
    237272
    238273                            </div>
    … …  
    277312
    278313
    279             <ol class="track-list">
    280 
    281                 @{
    282                     var trackNumber = 1;
    283                 }
    284 
    285                 @foreach (var albumSong in Model.Album.AlbumSongs
    286                     .OrderBy(x => x.SongId))
    287                 {
    288                     <li class="track-row">
    289 
    290                         <span class="track-number">
    291                             @trackNumber.ToString("00")
    292                         </span>
    293 
    294                         <div class="track-main">
    295 
    296                             <strong>
    297                                 @albumSong.Song.SongName
    298                             </strong>
    299 
    300                             @if (albumSong.Song.SongArtists.Any())
    301                             {
    302                                 <div class="song-artists">
    303 
    304                                     @string.Join(
    305                                         ", ",
    306                                         albumSong.Song.SongArtists
    307                                             .OrderBy(x => x.SongOrdinal)
    308                                             .Select(x => x.Artist.ArtistName)
    309                                     )
    310 
    311                                 </div>
    312                             }
    313 
    314                         </div>
    315 
    316                         <span class="track-duration">
    317                             @albumSong.Song.SongDuration
    318                         </span>
    319 
    320                     </li>
    321 
    322                     trackNumber++;
    323                 }
    324 
    325             </ol>
     314            @if (!Model.Album.AlbumSongs.Any())
     315            {
     316                <div class="no-products">
     317                    No tracks have been added to this album.
     318                </div>
     319            }
     320            else
     321            {
     322                <ol class="track-list">
     323
     324                    @{
     325                        var trackNumber = 1;
     326                    }
     327
     328
     329                    @foreach (var albumSong in Model.Album.AlbumSongs
     330                        .OrderBy(x => x.SongId))
     331                    {
     332                        <li class="track-row">
     333
     334                            <span class="track-number">
     335                                @trackNumber.ToString("00")
     336                            </span>
     337
     338
     339                            <div class="track-main">
     340
     341                                <strong>
     342                                    @albumSong.Song.SongName
     343                                </strong>
     344
     345
     346                                @if (albumSong.Song.SongArtists != null &&
     347                                     albumSong.Song.SongArtists.Any())
     348                                {
     349                                    <div class="song-artists">
     350
     351                                        @string.Join(
     352                                            ", ",
     353                                            albumSong.Song.SongArtists
     354                                                .OrderBy(x => x.SongOrdinal)
     355                                                .Select(x =>
     356                                                    x.Artist.ArtistName)
     357                                        )
     358
     359                                    </div>
     360                                }
     361
     362                            </div>
     363
     364
     365                            <span class="track-duration">
     366                                @albumSong.Song.SongDuration
     367                            </span>
     368
     369                        </li>
     370
     371                        trackNumber++;
     372                    }
     373
     374                </ol>
     375            }
    326376
    327377        </section>
    … …  
    368418                </div>
    369419
     420
    370421                <div class="single-duration">
    371422
Note: See TracChangeset for help on using the changeset viewer.