-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many improvements to generic repository. Added MudBlazor helper project.
- Loading branch information
1 parent
b35f4ca
commit 1ba8335
Showing
43 changed files
with
1,361 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
samples/DotNetElements.CrudExample/Components/Components/TagDialog.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@inherits CrudEditDialog<TagModel, EditTagModel> | ||
|
||
@using DotNetElements.Web.MudBlazor | ||
@using DotNetElements.CrudExample.Modules.TagModule | ||
|
||
@code { | ||
|
||
} |
62 changes: 62 additions & 0 deletions
62
samples/DotNetElements.CrudExample/Components/Components/TagsTable.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
@* @inherits CrudTable<Guid, TagModel, AuditedModelDetails, EditTagModel, TagDialog> | ||
@using DotNetElements.Web.MudBlazor | ||
@using DotNetElements.CrudExample.Modules.TagModule | ||
<MudSimpleTable Style="overflow-x: auto;"> | ||
<thead> | ||
<tr> | ||
<th>Label</th> | ||
<th style="width: 140px;">Actions</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach (ModelWithDetails<TagModel, AuditedModelDetails> context in TableEntries) | ||
{ | ||
<tr> | ||
<td>@context.Value.Label</td> | ||
<td class="py-0 pl-2" style="width: 140px;"> | ||
<MudIconButton OnClick="() => OnEditEntry(context)" Class="pa-1" Icon="@Icons.Material.Outlined.Edit" Color="Color.Warning" /> | ||
<MudIconButton OnClick="() => OnDeleteEntry(context, context.Value.Label)" Class="pa-1" Icon="@Icons.Material.Outlined.Delete" Color="Color.Error" /> | ||
<MudIconButton OnClick="() => OnShowEntryDetails(context)" Class="pa-1" Icon="@Icons.Material.Outlined.Info" Color="Color.Default" /> | ||
</td> | ||
</tr> | ||
@if (context.DetailsShown && context.Details is not null) | ||
{ | ||
<tr> | ||
<td colspan="100"> | ||
<MudGrid Spacing="2"> | ||
<MudItem xs="12"> | ||
<MudStack Spacing="1"> | ||
<MudText Typo="Typo.caption"><b>ID</b></MudText> | ||
<MudText Typo="Typo.caption">@context.Value.Id</MudText> | ||
</MudStack> | ||
</MudItem> | ||
<MudItem xs="4"> | ||
<MudStack Spacing="1"> | ||
<MudText Typo="Typo.caption"><b>Creation Time</b></MudText> | ||
<MudText Typo="Typo.caption">@context.Details.CreationTime</MudText> | ||
</MudStack> | ||
</MudItem> | ||
<MudItem xs="4"> | ||
<MudStack Spacing="1"> | ||
<MudText Typo="Typo.caption"><b>Last Modification Time</b></MudText> | ||
<MudText Typo="Typo.caption">@context.Details.LastModificationTime</MudText> | ||
</MudStack> | ||
</MudItem> | ||
</MudGrid> | ||
</td> | ||
</tr> | ||
} | ||
} | ||
</tbody> | ||
</MudSimpleTable> | ||
@code | ||
{ | ||
protected override CrudTableOptions OnConfiguring() | ||
{ | ||
return new CrudTableOptions("api/tags"); | ||
} | ||
} *@ |
1 change: 1 addition & 0 deletions
1
samples/DotNetElements.CrudExample/Components/Layout/NavMenu.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<MudNavMenu> | ||
<MudNavLink Icon="@Icons.Material.Outlined.Home" Href="/" Match="NavLinkMatch.All">Home</MudNavLink> | ||
<MudNavLink Icon="@Icons.Material.Outlined.TableView" Href="/crud" Match="NavLinkMatch.Prefix">CRUD</MudNavLink> | ||
@* <MudNavLink Icon="@Icons.Material.Outlined.TableView" Href="/genericCrud" Match="NavLinkMatch.Prefix">Generic CRUD</MudNavLink> *@ | ||
</MudNavMenu> | ||
|
Oops, something went wrong.