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
|
@model DiscImageChef.CommonTypes.Metadata.MmcSd
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -37,36 +39,83 @@
|
|||||||
<h4>MmcSd</h4>
|
<h4>MmcSd</h4>
|
||||||
<hr />
|
<hr />
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
<dt class="col-sm-2">
|
@if (Model.SCR != null)
|
||||||
@Html.DisplayNameFor(model => model.CID)
|
{
|
||||||
</dt>
|
if (Model.CID != null)
|
||||||
<dd class="col-sm-10">
|
{
|
||||||
@Html.DisplayFor(model => model.CID)
|
<dt class="col-sm-2">
|
||||||
</dd>
|
@Html.DisplayNameFor(model => model.CID)
|
||||||
<dt class="col-sm-2">
|
</dt>
|
||||||
@Html.DisplayNameFor(model => model.CSD)
|
<dd class="col-sm-10">
|
||||||
</dt>
|
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyCID(Model.CID)))
|
||||||
<dd class="col-sm-10">
|
</dd>
|
||||||
@Html.DisplayFor(model => model.CSD)
|
}
|
||||||
</dd>
|
if (Model.CSD != null)
|
||||||
<dt class="col-sm-2">
|
{
|
||||||
@Html.DisplayNameFor(model => model.OCR)
|
<dt class="col-sm-2">
|
||||||
</dt>
|
@Html.DisplayNameFor(model => model.CSD)
|
||||||
<dd class="col-sm-10">
|
</dt>
|
||||||
@Html.DisplayFor(model => model.OCR)
|
<dd class="col-sm-10">
|
||||||
</dd>
|
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyCSD(Model.CSD)))
|
||||||
<dt class="col-sm-2">
|
</dd>
|
||||||
@Html.DisplayNameFor(model => model.SCR)
|
}
|
||||||
</dt>
|
if (Model.OCR != null)
|
||||||
<dd class="col-sm-10">
|
{
|
||||||
@Html.DisplayFor(model => model.SCR)
|
<dt class="col-sm-2">
|
||||||
</dd>
|
@Html.DisplayNameFor(model => model.OCR)
|
||||||
<dt class="col-sm-2">
|
</dt>
|
||||||
@Html.DisplayNameFor(model => model.ExtendedCSD)
|
<dd class="col-sm-10">
|
||||||
</dt>
|
@Html.Raw(Html.EncodedMultiLineText(Decoders.PrettifyOCR(Model.OCR)))
|
||||||
<dd class="col-sm-10">
|
</dd>
|
||||||
@Html.DisplayFor(model => model.ExtendedCSD)
|
}
|
||||||
</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>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -13,5 +13,9 @@ namespace DiscImageChef.Server.Core
|
|||||||
public static string EncodedMultiLineText(this IHtmlHelper<Mmc> helper, string text) =>
|
public static string EncodedMultiLineText(this IHtmlHelper<Mmc> helper, string text) =>
|
||||||
string.IsNullOrEmpty(text) ? string.Empty
|
string.IsNullOrEmpty(text) ? string.Empty
|
||||||
: Regex.Replace(helper.Encode(text), "
|
|
", "<br/>");
|
: 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