feat: Added Base for UserManagement
This commit is contained in:
7
CouchLog/Components/AdminSettings/Pages/Index.razor
Normal file
7
CouchLog/Components/AdminSettings/Pages/Index.razor
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
@page "/AdminSettings"
|
||||||
|
|
||||||
|
<h3>Index</h3>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
@page "/AdminSettings/UserManagement"
|
||||||
|
|
||||||
|
<h3>UserManagement</h3>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
}
|
||||||
2
CouchLog/Components/AdminSettings/Pages/_Imports.razor
Normal file
2
CouchLog/Components/AdminSettings/Pages/_Imports.razor
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
@using CouchLog.Components.AdminSettings.Shared
|
||||||
|
@layout AdminSettingsLayout
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
@inherits LayoutComponentBase
|
||||||
|
@layout CouchLog.Components.Layout.MainLayout
|
||||||
|
|
||||||
|
<h1>Manage your account</h1>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2>Change your account settings</h2>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<AdminSettingsNavMenu />
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
@Body
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
@using Microsoft.AspNetCore.Identity
|
||||||
|
@using CouchLog.Data
|
||||||
|
|
||||||
|
@inject SignInManager<ApplicationUser> SignInManager
|
||||||
|
|
||||||
|
<ul class="nav nav-pills flex-column">
|
||||||
|
<li class="nav-item">
|
||||||
|
<NavLink class="nav-link" href="/AdminSettings/UserManagement" Match="NavLinkMatch.All">User Management</NavLink>
|
||||||
|
</li>
|
||||||
|
<!--
|
||||||
|
<li class="nav-item">
|
||||||
|
<NavLink class="nav-link" href=""></NavLink>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<NavLink class="nav-link" href=""></NavLink>
|
||||||
|
</li>
|
||||||
|
-->
|
||||||
|
</ul>
|
||||||
@@ -6,10 +6,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<div class="top-row px-4">
|
|
||||||
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<article class="content px-4">
|
<article class="content px-4">
|
||||||
@Body
|
@Body
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
@page "/AdminSettings"
|
|
||||||
|
|
||||||
@using Microsoft.AspNetCore.Authorization
|
|
||||||
|
|
||||||
@attribute [Authorize]
|
|
||||||
|
|
||||||
<PageTitle>Admin Settings</PageTitle>
|
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
<PageTitle>GlobalList</PageTitle>
|
<PageTitle>GlobalList</PageTitle>
|
||||||
|
|
||||||
<div class="container-fluid mt-4">
|
<div class="container-fluid mt-4">
|
||||||
|
<!-- #region CreateEntity -->
|
||||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||||
<h2>Global List</h2>
|
<h2>Global List</h2>
|
||||||
<button class="btn btn-info" type="button" @onclick="ToogleCollapseNewGlobalEntity">@(isCollapseNewGlobalEntityOpen ? "X" : "Add Entity")</button>
|
<button class="btn btn-info" type="button" @onclick="ToogleCollapseNewGlobalEntity">@(isCollapseNewGlobalEntityOpen ? "X" : "Add Entity")</button>
|
||||||
@@ -59,13 +60,17 @@
|
|||||||
</EditForm>
|
</EditForm>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- #endregion -->
|
||||||
|
|
||||||
|
<!-- #region Show Entitys -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@foreach (var Entity in GlobalEntities)
|
@foreach (var Entity in GlobalEntities)
|
||||||
{
|
{
|
||||||
<div name="Enity-Container" class="col-12 col-md-6 col-lg-3 mb-4 Entity-Container">
|
<div name="Enity-Container" class="col-12 col-md-6 col-lg-3 mb-4 Entity-Container">
|
||||||
<div name="Entity-Container-Card" class="Entity-Container-Card">
|
<div name="Entity-Container-Card" class="Entity-Container-Card">
|
||||||
<div class="Entity-Container-Menu-Button">
|
|
||||||
<button type="button" class="Entity-Container-Menu-Button" data-bs-toogle="modal" data-bs-target="@Entity.Id">⋮</button>
|
<div class="Entity-Container-Menu-Button dropdown ms-1">
|
||||||
|
<button type="button" class="Entity-Container-Menu-Button btn menu-btn" data-bs-toggle="modal" data-bs-target="#modal-@Entity.Id">⋮</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" id="@Entity.Id" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
<div class="modal fade" id="@Entity.Id" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
@@ -103,8 +108,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="modal-@Entity.Id" tabindex="-1" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">Optionen</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<button class="btn btn-danger" type="button" @onclick="() => DeleteEntity(Entity)">Delete Entity</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Schließen</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- #endregion -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code
|
@code
|
||||||
@@ -268,4 +291,24 @@
|
|||||||
GenreIds.Add(GenreId);
|
GenreIds.Add(GenreId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task DeleteEntity(GlobalEntity entity)
|
||||||
|
{
|
||||||
|
if(entity.PicturePath != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File.Delete(Path.Combine("wwwroot", entity.PicturePath));
|
||||||
|
}
|
||||||
|
catch(Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CouchLogDB.GlobalEntities.Remove(entity);
|
||||||
|
|
||||||
|
await CouchLogDB.SaveChangesAsync();
|
||||||
|
|
||||||
|
NavigationManager.NavigateTo(NavigationManager.Uri, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 18
|
||||||
VisualStudioVersion = 17.14.36511.14
|
VisualStudioVersion = 18.1.11304.174 d18.0
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CouchLog", "CouchLog.csproj", "{4FBF15C3-5FC5-4605-9EBC-3F7DA1ADC47A}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CouchLog", "CouchLog.csproj", "{4FBF15C3-5FC5-4605-9EBC-3F7DA1ADC47A}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 142 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 142 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 142 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 142 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 113 KiB |
Reference in New Issue
Block a user