modified all admin UIs to position action buttons on the left side of grids and implemented ActionDialog throughout rather than dedicated delete components
This commit is contained in:
@ -25,7 +25,7 @@
|
||||
}
|
||||
@if (authorized)
|
||||
{
|
||||
<button class="@Class" @onclick="DisplayModal">@Action</button>
|
||||
<button class="@Class" @onclick="DisplayModal">@Text</button>
|
||||
}
|
||||
|
||||
@code {
|
||||
@ -41,6 +41,9 @@
|
||||
[Parameter]
|
||||
public SecurityAccessLevel? Security { get; set; } // optional - can be used to explicitly specify SecurityAccessLevel
|
||||
|
||||
[Parameter]
|
||||
public string Text { get; set; } // optional - defaults to Action if not specified
|
||||
|
||||
[Parameter]
|
||||
public string Class { get; set; } // optional
|
||||
|
||||
@ -56,6 +59,10 @@
|
||||
{
|
||||
Action = "Ok";
|
||||
}
|
||||
if (string.IsNullOrEmpty(Text))
|
||||
{
|
||||
Text = Action;
|
||||
}
|
||||
if (string.IsNullOrEmpty(Class))
|
||||
{
|
||||
Class = "btn btn-success";
|
||||
|
@ -36,12 +36,12 @@
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
text = Action;
|
||||
if (!String.IsNullOrEmpty(Text))
|
||||
if (!string.IsNullOrEmpty(Text))
|
||||
{
|
||||
text = Text;
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(Parameters))
|
||||
if (!string.IsNullOrEmpty(Parameters))
|
||||
{
|
||||
parameters = Parameters;
|
||||
}
|
||||
|
Reference in New Issue
Block a user