mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Show prettyfied ATA IDENTIFY on delete and details.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@using DiscImageChef.Decoders.ATA
|
||||
@using DiscImageChef.Server.Core
|
||||
@model DiscImageChef.CommonTypes.Metadata.Ata
|
||||
|
||||
@{
|
||||
@@ -35,16 +37,11 @@
|
||||
}
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Ata</h4>
|
||||
<h4>ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE - ID = @Model.Id</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Identify)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Identify)
|
||||
</dd>
|
||||
</dl>
|
||||
@Html.Raw(Html.EncodedMultiLineText(Identify.Prettify(Model.Identify)))
|
||||
</div>
|
||||
<div>
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@using DiscImageChef.Decoders.ATA
|
||||
@using DiscImageChef.Server.Core
|
||||
@model DiscImageChef.CommonTypes.Metadata.Ata
|
||||
|
||||
@{
|
||||
@@ -34,18 +36,10 @@
|
||||
// ****************************************************************************/
|
||||
}
|
||||
<div>
|
||||
<h4>Ata</h4>
|
||||
<h4>ATA IDENTIFY DEVICE / ATAPI IDENTIFY PACKET DEVICE - ID = @Model.Id</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Identify)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Identify)
|
||||
</dd>
|
||||
</dl>
|
||||
@Html.Raw(Html.EncodedMultiLineText(Identify.Prettify(Model.Identify)))
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
12
DiscImageChef.Server/Core/HtmlHelpers.cs
Normal file
12
DiscImageChef.Server/Core/HtmlHelpers.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
|
||||
namespace DiscImageChef.Server.Core
|
||||
{
|
||||
public static class HtmlHelpers
|
||||
{
|
||||
public static string EncodedMultiLineText(this IHtmlHelper<CommonTypes.Metadata.Ata> helper, string text) =>
|
||||
string.IsNullOrEmpty(text) ? string.Empty
|
||||
: Regex.Replace(helper.Encode(text), "
|
|
", "<br/>");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user