diff --git a/cicm_web/Controllers/CompanyController.cs b/cicm_web/Controllers/CompanyController.cs index 5860957c..365cbee0 100644 --- a/cicm_web/Controllers/CompanyController.cs +++ b/cicm_web/Controllers/CompanyController.cs @@ -32,7 +32,6 @@ using System.Linq; using Cicm.Database.Models; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; namespace cicm_web.Controllers { @@ -69,9 +68,6 @@ namespace cicm_web.Controllers if(company == null) return Index(); - ViewBag.LastLogo = company.CompanyLogos.OrderByDescending(l => l.Year).FirstOrDefault(); - ViewBag.CompanyLogos = company.CompanyLogos.OrderByDescending(l => l.Year).ToList(); - return View(company); } diff --git a/cicm_web/Views/Company/ByCountry.cshtml b/cicm_web/Views/Company/ByCountry.cshtml index 31a0abf9..1ed37e58 100644 --- a/cicm_web/Views/Company/ByCountry.cshtml +++ b/cicm_web/Views/Company/ByCountry.cshtml @@ -32,7 +32,7 @@ ViewData["Title"] = "Companies"; } @using System.IO -@using Company = Cicm.Database.Models.Company +@using Cicm.Database.Models @model Cicm.Database.Models.Company[]
@@ -68,7 +68,6 @@
- @* TODO
@if(company.LastLogo != null && File.Exists(System.IO.Path.Combine(ViewBag.WebRootPath, "assets/logos", company.LastLogo.Guid + ".svg")))
{
diff --git a/cicm_web/Views/Company/ByLetter.cshtml b/cicm_web/Views/Company/ByLetter.cshtml
index 66e84889..7fb31b38 100644
--- a/cicm_web/Views/Company/ByLetter.cshtml
+++ b/cicm_web/Views/Company/ByLetter.cshtml
@@ -31,7 +31,8 @@
ViewData["Title"] = "Companies";
}
-@using Company = Cicm.Database.Models.Company
+@using System.IO
+@using Cicm.Database.Models
@model Cicm.Database.Models.Company[]
Search results:
@@ -51,7 +52,6 @@ - @* @if(company.LastLogo != null && File.Exists(System.IO.Path.Combine(ViewBag.WebRootPath, "assets/logos", company.LastLogo.Guid + ".svg"))) {
@@ -44,7 +45,6 @@
- @* TODO
@if(company.LastLogo != null && File.Exists(System.IO.Path.Combine(ViewBag.WebRootPath, "assets/logos", company.LastLogo.Guid + ".svg")))
{
diff --git a/cicm_web/Views/Company/View.cshtml b/cicm_web/Views/Company/View.cshtml
index 3b181fad..32fc4fd7 100644
--- a/cicm_web/Views/Company/View.cshtml
+++ b/cicm_web/Views/Company/View.cshtml
@@ -34,26 +34,25 @@
@using System.IO
@using Cicm.Database
@using Cicm.Database.Models
-@using Machine = Cicm.Database.Models.Machine
@model Cicm.Database.Models.Company
@if(Model != null)
{
- @if(ViewBag.LastLogo != null && File.Exists(System.IO.Path.Combine(ViewBag.WebRootPath, "assets/logos", ViewBag.LastLogo.Guid + ".svg")))
+ @if(Model.LastLogo != null && File.Exists(System.IO.Path.Combine(ViewBag.WebRootPath, "assets/logos", Model.LastLogo.Guid + ".svg")))
{
+
1)
+ @if(Model.Logos != null && Model.Logos.Count > 1)
{