Improved Manage Category page
This commit is contained in:
parent
bd0d69cdc3
commit
a056039654
|
@ -56,26 +56,28 @@ bg-error text-error-content
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div class="overflow-x-auto">
|
<div class="overflow-x-auto">
|
||||||
<table class="table">
|
<table class="table table-zebra">
|
||||||
<tr class="border-b-2 border-current">
|
<thead>
|
||||||
|
<tr>
|
||||||
<th>@Localizer["Name"]</th>
|
<th>@Localizer["Name"]</th>
|
||||||
<th>@Localizer["Type"]</th>
|
<th>@Localizer["Type"]</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
@foreach (var category in Categories) {
|
@foreach (var category in Categories) {
|
||||||
string postfix = CategoryUtilities.GetCssClassPostfixForColor(category.Color);
|
string postfix = CategoryUtilities.GetCssClassPostfixForColor(category.Color);
|
||||||
<tr class="border-b-2">
|
<tr>
|
||||||
<td>@category.Name</td>
|
<td>@category.Name</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="badge badge-@postfix">@category.Color.Humanize()</span>
|
<span class="badge badge-@postfix">@Localizer[$"Category_Color_{category.Color}"]</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<form method="post" @formname="@category.Id.ToString()" @onsubmit="@DeleteCategory">
|
<form method="post" @formname="@category.Id.ToString()" @onsubmit="@DeleteCategory">
|
||||||
<AntiforgeryToken />
|
<AntiforgeryToken/>
|
||||||
<input type="hidden" name="category-id" value="@category.Id" required />
|
<input type="hidden" name="category-id" value="@category.Id" required />
|
||||||
|
|
||||||
<button type="submit" class="btn btn-sm btn-square btn-error" title="delete">
|
<button type="submit" class="btn btn-sm btn-square btn-error" title="@Localizer["Delete_Label"]">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
|
||||||
<path fill-rule="evenodd" d="M8.75 1A2.75 2.75 0 0 0 6 3.75v.443c-.795.077-1.584.176-2.365.298a.75.75 0 1 0 .23 1.482l.149-.022.841 10.518A2.75 2.75 0 0 0 7.596 19h4.807a2.75 2.75 0 0 0 2.742-2.53l.841-10.52.149.023a.75.75 0 0 0 .23-1.482A41.03 41.03 0 0 0 14 4.193V3.75A2.75 2.75 0 0 0 11.25 1h-2.5ZM10 4c.84 0 1.673.025 2.5.075V3.75c0-.69-.56-1.25-1.25-1.25h-2.5c-.69 0-1.25.56-1.25 1.25v.325C8.327 4.025 9.16 4 10 4ZM8.58 7.72a.75.75 0 0 0-1.5.06l.3 7.5a.75.75 0 1 0 1.5-.06l-.3-7.5Zm4.34.06a.75.75 0 1 0-1.5-.06l-.3 7.5a.75.75 0 1 0 1.5.06l.3-7.5Z" clip-rule="evenodd"/>
|
<path fill-rule="evenodd" d="M8.75 1A2.75 2.75 0 0 0 6 3.75v.443c-.795.077-1.584.176-2.365.298a.75.75 0 1 0 .23 1.482l.149-.022.841 10.518A2.75 2.75 0 0 0 7.596 19h4.807a2.75 2.75 0 0 0 2.742-2.53l.841-10.52.149.023a.75.75 0 0 0 .23-1.482A41.03 41.03 0 0 0 14 4.193V3.75A2.75 2.75 0 0 0 11.25 1h-2.5ZM10 4c.84 0 1.673.025 2.5.075V3.75c0-.69-.56-1.25-1.25-1.25h-2.5c-.69 0-1.25.56-1.25 1.25v.325C8.327 4.025 9.16 4 10 4ZM8.58 7.72a.75.75 0 0 0-1.5.06l.3 7.5a.75.75 0 1 0 1.5-.06l-.3-7.5Zm4.34.06a.75.75 0 1 0-1.5-.06l-.3 7.5a.75.75 0 1 0 1.5.06l.3-7.5Z" clip-rule="evenodd"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
@ -143,4 +143,13 @@
|
||||||
<data name="Category_Delete_Error" xml:space="preserve">
|
<data name="Category_Delete_Error" xml:space="preserve">
|
||||||
<value>Konnte Kategorie nicht löschen, wird sie noch verwendet?</value>
|
<value>Konnte Kategorie nicht löschen, wird sie noch verwendet?</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Delete_Label" xml:space="preserve">
|
||||||
|
<value>Kategorie löschen</value>
|
||||||
|
</data>
|
||||||
|
<data name="Name" xml:space="preserve">
|
||||||
|
<value>Bezeichnung der Kategorie</value>
|
||||||
|
</data>
|
||||||
|
<data name="Type" xml:space="preserve">
|
||||||
|
<value>Art der Kategorie</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -143,4 +143,13 @@
|
||||||
<data name="Category_Delete_Error" xml:space="preserve">
|
<data name="Category_Delete_Error" xml:space="preserve">
|
||||||
<value>Could not delete Category, is it still used?</value>
|
<value>Could not delete Category, is it still used?</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Delete_Label" xml:space="preserve">
|
||||||
|
<value>Delete category</value>
|
||||||
|
</data>
|
||||||
|
<data name="Name" xml:space="preserve">
|
||||||
|
<value>Name of Category</value>
|
||||||
|
</data>
|
||||||
|
<data name="Type" xml:space="preserve">
|
||||||
|
<value>Type of Category</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in a new issue