diff --git a/src/MusicStore/Areas/Admin/Views/StoreManager/Index.cshtml b/src/MusicStore/Areas/Admin/Views/StoreManager/Index.cshtml index 4a4f30ab1e..be736f1fe6 100644 --- a/src/MusicStore/Areas/Admin/Views/StoreManager/Index.cshtml +++ b/src/MusicStore/Areas/Admin/Views/StoreManager/Index.cshtml @@ -1,17 +1,5 @@ @model IEnumerable -@helper Truncate(string input, int length) -{ - if (input.Length <= length) - { - @input - } - else - { - @input.Substring(0, length)... - } -} - @{ ViewBag.Title = "Index"; } @@ -45,10 +33,24 @@ @Html.DisplayFor(modelItem => item.Genre.Name) - @Truncate(item.Artist.Name, 25) + @if (item.Artist.Name.Length <= 25) + { + @item.Artist.Name + } + else + { + @item.Artist.Name.Substring(0, 25)... + } - @Truncate(item.Title, 25) + if (item.Title.Length <= 25) + { + @item.Title + } + else + { + @item.Title.Substring(0, 25)... + } @Html.DisplayFor(modelItem => item.Price)