From f472e11d23c5b4e9296df1f3c47f68c64d88238a Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 20 May 2019 02:07:29 +0100 Subject: [PATCH] Show company logo in admin details page. --- .../Controllers/CompanyLogosController.cs | 9 ++- .../Admin/Views/CompanyLogos/Details.cshtml | 65 +++++++++++++++---- cicm_web/cicm_web.csproj | 2 +- 3 files changed, 60 insertions(+), 16 deletions(-) diff --git a/cicm_web/Areas/Admin/Controllers/CompanyLogosController.cs b/cicm_web/Areas/Admin/Controllers/CompanyLogosController.cs index ec6c2f30..5829516c 100644 --- a/cicm_web/Areas/Admin/Controllers/CompanyLogosController.cs +++ b/cicm_web/Areas/Admin/Controllers/CompanyLogosController.cs @@ -2,6 +2,7 @@ using System.Linq; using System.Threading.Tasks; using Cicm.Database.Models; using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.EntityFrameworkCore; @@ -13,11 +14,13 @@ namespace cicm_web.Areas.Admin.Controllers [Authorize] public class CompanyLogosController : Controller { - readonly cicmContext _context; + readonly cicmContext _context; + readonly IHostingEnvironment hostingEnvironment; - public CompanyLogosController(cicmContext context) + public CompanyLogosController(cicmContext context, IHostingEnvironment env) { - _context = context; + _context = context; + hostingEnvironment = env; } // GET: CompanyLogos diff --git a/cicm_web/Areas/Admin/Views/CompanyLogos/Details.cshtml b/cicm_web/Areas/Admin/Views/CompanyLogos/Details.cshtml index 9ac299b8..2963e878 100644 --- a/cicm_web/Areas/Admin/Views/CompanyLogos/Details.cshtml +++ b/cicm_web/Areas/Admin/Views/CompanyLogos/Details.cshtml @@ -5,7 +5,17 @@ }

Details

- +
+ + Edit + + + Back to List + +

Company logo


@@ -22,16 +32,47 @@
@Html.DisplayFor(model => model.Year)
+
+ SVG +
+
+ +
+
+ PNG 1x +
+
+ +
+
+ PNG 2x +
+
+ +
+
+ PNG 3x +
+
+ +
+
+ WebP 1x +
+
+ +
+
+ WebP 2x +
+
+ +
+
+ WebP 3x +
+
+ +
-
-
- - Edit - - - Back to List -
\ No newline at end of file diff --git a/cicm_web/cicm_web.csproj b/cicm_web/cicm_web.csproj index 1a05fa82..db459668 100644 --- a/cicm_web/cicm_web.csproj +++ b/cicm_web/cicm_web.csproj @@ -2,7 +2,7 @@ netcoreapp2.2 - 3.0.99.557 + 3.0.99.558 Canary Islands Computer Museum Copyright © 2003-2018 Natalia Portillo Canary Islands Computer Museum Website