mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Prettify details for MMC/SD.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@using DiscImageChef.Decoders.SecureDigital
|
||||
@using DiscImageChef.Server.Core
|
||||
@model DiscImageChef.CommonTypes.Metadata.MmcSd
|
||||
|
||||
@{
|
||||
@@ -37,36 +39,83 @@
|
||||
<h4>MmcSd</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CID)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CID)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CSD)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.OCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.OCR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SCR)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ExtendedCSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ExtendedCSD)
|
||||
</dd>
|
||||
@if (Model.SCR != null)
|
||||
{
|
||||
if (Model.CID != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CID)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyCID(Model.CID)))
|
||||
</dd>
|
||||
}
|
||||
if (Model.CSD != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyCSD(Model.CSD)))
|
||||
</dd>
|
||||
}
|
||||
if (Model.OCR != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.OCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyOCR(Model.OCR)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifySCR(Model.SCR)))
|
||||
</dd>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.CID != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CID)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(DiscImageChef.Decoders.MMC.Decoders.PrettifyCID(Model.CID)))
|
||||
</dd>
|
||||
}
|
||||
if (Model.CSD != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(DiscImageChef.Decoders.MMC.Decoders.PrettifyCSD(Model.CSD)))
|
||||
</dd>
|
||||
}
|
||||
if (Model.OCR != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.OCR)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(DiscImageChef.Decoders.MMC.Decoders.PrettifyOCR(Model.OCR)))
|
||||
</dd>
|
||||
}
|
||||
|
||||
if (Model.ExtendedCSD != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ExtendedCSD)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.Raw(Html.EncodedMultiLineText(DiscImageChef.Decoders.MMC.Decoders.PrettifyExtendedCSD(Model.ExtendedCSD)))
|
||||
</dd>
|
||||
}
|
||||
}
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -13,5 +13,9 @@ namespace DiscImageChef.Server.Core
|
||||
public static string EncodedMultiLineText(this IHtmlHelper<Mmc> helper, string text) =>
|
||||
string.IsNullOrEmpty(text) ? string.Empty
|
||||
: Regex.Replace(helper.Encode(text), "
|
|
", "<br/>");
|
||||
|
||||
public static string EncodedMultiLineText(this IHtmlHelper<MmcSd> helper, string text) =>
|
||||
string.IsNullOrEmpty(text) ? string.Empty
|
||||
: Regex.Replace(helper.Encode(text), "
|
|
", "<br/>");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user