Fix company list not showing properly.

This commit is contained in:
2020-06-01 02:44:34 +01:00
parent 14f8ecaefc
commit dc824dc519
2 changed files with 56 additions and 49 deletions

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<Version>3.0.99.1547</Version> <Version>3.0.99.1551</Version>
<Company>Canary Islands Computer Museum</Company> <Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2020 Natalia Portillo</Copyright> <Copyright>Copyright © 2003-2020 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product> <Product>Canary Islands Computer Museum Website</Product>

View File

@@ -39,9 +39,9 @@
return; return;
} }
<p align="center"> @if (CountryId.HasValue)
@if (CountryId.HasValue) {
{ <p align="center">
<b>@string.Format(L["Companies founded in {0}."], L[_countryName])</b> <b>@string.Format(L["Companies founded in {0}."], L[_countryName])</b>
if (File.Exists(System.IO.Path.Combine(Host.WebRootPath, "assets/flags/countries", CountryId + ".svg"))) if (File.Exists(System.IO.Path.Combine(Host.WebRootPath, "assets/flags/countries", CountryId + ".svg")))
{ {
@@ -55,22 +55,26 @@
/assets/flags/countries/png/1x/@(CountryId).webp 3x" src="/assets/flags/countries/png/1x@(CountryId).png" alt="" height="32" /> /assets/flags/countries/png/1x/@(CountryId).webp 3x" src="/assets/flags/countries/png/1x@(CountryId).png" alt="" height="32" />
</picture> </picture>
} }
<br /> </p>
} }
@if (_character.HasValue) @if (_character.HasValue)
{ {
<p align="center">
<b>@string.Format(L["Companies which name starts with {0}."], _character)</b> <b>@string.Format(L["Companies which name starts with {0}."], _character)</b>
<br /> </p>
} }
@if (_companies.Any()) @if (_companies.Any())
{ {
<p> <div class="container">
@string.Format(L["{0} companies found in the database."], _companies.Count()) <span class="align-content-center">@string.Format(L["{0} companies found in the database."], _companies.Count())</span>
<br /> <hr/>
<table>
@foreach (var company in _companies) @foreach (var company in _companies)
{ {
<tr>
<td class="text-right">
<a href="/company/@company.Id"> <a href="/company/@company.Id">
@if (company.LastLogo != null && @if (company.LastLogo != null &&
File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", company.LastLogo + ".svg"))) File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", company.LastLogo + ".svg")))
@@ -85,14 +89,17 @@
/assets/logos/thumbs/png/3x/@(company.LastLogo).png 3x" src="/assets/logos/thumbs/png/1x@(company.LastLogo).png" alt="" height="auto" width="auto" style="max-height: 32px; max-width: 128px" /> /assets/logos/thumbs/png/3x/@(company.LastLogo).png 3x" src="/assets/logos/thumbs/png/1x@(company.LastLogo).png" alt="" height="auto" width="auto" style="max-height: 32px; max-width: 128px" />
</picture> </picture>
} }
@company.Name
</a> </a>
<br /> </td>
<td>
<a href="/company/@company.Id">@company.Name</a>
</td>
</tr>
} }
</p> </table>
} </div>
else }
{ else
<p>@L["There are no companies in the database."]</p> {
} <p align="center">@L["There are no companies in the database."]</p>
</p> }