Merge remote-tracking branch 'kawa/main'
This commit is contained in:
@@ -79,6 +79,7 @@ public class StorageHtmlExportService
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{T["report.col.library_folder"]}</th>
|
||||
<th>{T["stor.col.kind"]}</th>
|
||||
<th>{T["report.col.site"]}</th>
|
||||
<th class="num">{T["report.stat.files"]}</th>
|
||||
<th class="num">{T["report.stat.total_size"]}</th>
|
||||
@@ -212,6 +213,7 @@ public class StorageHtmlExportService
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{T["report.col.library_folder"]}</th>
|
||||
<th>{T["stor.col.kind"]}</th>
|
||||
<th>{T["report.col.site"]}</th>
|
||||
<th class="num">{T["report.stat.files"]}</th>
|
||||
<th class="num">{T["report.stat.total_size"]}</th>
|
||||
@@ -312,6 +314,7 @@ public class StorageHtmlExportService
|
||||
sb.AppendLine($"""
|
||||
<tr>
|
||||
<td>{nameCell}</td>
|
||||
<td>{HtmlEncode(KindLabel(node.Kind))}</td>
|
||||
<td>{HtmlEncode(node.SiteTitle)}</td>
|
||||
<td class="num">{node.TotalFileCount:N0}</td>
|
||||
<td class="num">{FormatSize(node.TotalSizeBytes)}</td>
|
||||
@@ -322,7 +325,7 @@ public class StorageHtmlExportService
|
||||
|
||||
if (hasChildren)
|
||||
{
|
||||
sb.AppendLine($"<tr id=\"sf-{myIdx}\" style=\"display:none\"><td colspan=\"6\" style=\"padding:0\">");
|
||||
sb.AppendLine($"<tr id=\"sf-{myIdx}\" style=\"display:none\"><td colspan=\"7\" style=\"padding:0\">");
|
||||
sb.AppendLine("<table class=\"sf-tbl\"><tbody>");
|
||||
foreach (var child in node.Children)
|
||||
{
|
||||
@@ -350,6 +353,7 @@ public class StorageHtmlExportService
|
||||
sb.AppendLine($"""
|
||||
<tr>
|
||||
<td>{nameCell}</td>
|
||||
<td>{HtmlEncode(KindLabel(node.Kind))}</td>
|
||||
<td>{HtmlEncode(node.SiteTitle)}</td>
|
||||
<td class="num">{node.TotalFileCount:N0}</td>
|
||||
<td class="num">{FormatSize(node.TotalSizeBytes)}</td>
|
||||
@@ -360,7 +364,7 @@ public class StorageHtmlExportService
|
||||
|
||||
if (hasChildren)
|
||||
{
|
||||
sb.AppendLine($"<tr id=\"sf-{myIdx}\" style=\"display:none\"><td colspan=\"6\" style=\"padding:0\">");
|
||||
sb.AppendLine($"<tr id=\"sf-{myIdx}\" style=\"display:none\"><td colspan=\"7\" style=\"padding:0\">");
|
||||
sb.AppendLine("<table class=\"sf-tbl\"><tbody>");
|
||||
foreach (var child in node.Children)
|
||||
{
|
||||
@@ -381,4 +385,19 @@ public class StorageHtmlExportService
|
||||
|
||||
private static string HtmlEncode(string value)
|
||||
=> System.Net.WebUtility.HtmlEncode(value ?? string.Empty);
|
||||
|
||||
private static string KindLabel(StorageNodeKind kind)
|
||||
{
|
||||
var T = TranslationSource.Instance;
|
||||
return kind switch
|
||||
{
|
||||
StorageNodeKind.Library => T["stor.kind.library"],
|
||||
StorageNodeKind.HiddenLibrary => T["stor.kind.hidden"],
|
||||
StorageNodeKind.PreservationHold => T["stor.kind.preservation"],
|
||||
StorageNodeKind.ListAttachments => T["stor.kind.attachments"],
|
||||
StorageNodeKind.RecycleBin => T["stor.kind.recyclebin"],
|
||||
StorageNodeKind.Subsite => T["stor.kind.subsite"],
|
||||
_ => kind.ToString()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user