diff --git a/Oqtane.Client/Modules/Controls/ActionLink.razor b/Oqtane.Client/Modules/Controls/ActionLink.razor
index 8f6459aa..5755c4c0 100644
--- a/Oqtane.Client/Modules/Controls/ActionLink.razor
+++ b/Oqtane.Client/Modules/Controls/ActionLink.razor
@@ -6,11 +6,11 @@
{
if (Disabled)
{
- @_text
+ @((MarkupString)_iconSpan) @_text
}
else
{
- @_text
+ @((MarkupString)_iconSpan) @_text
}
}
@@ -39,6 +39,9 @@
[Parameter]
public string EditMode { get; set; } // optional - specifies if a user must be in edit mode to see the action - default is true
+ [Parameter]
+ public string IconName { get; set; } // optional - specifies an icon for the link - default is no icon
+
string _text = "";
string _url = "";
string _parameters = "";
@@ -46,6 +49,7 @@
string _style = "";
bool _editmode = true;
bool _authorized = false;
+ string _iconSpan = "";
protected override void OnParametersSet()
{
@@ -75,6 +79,11 @@
_editmode = bool.Parse(EditMode);
}
+ if (!string.IsNullOrEmpty(IconName))
+ {
+ _iconSpan = $" ";
+ }
+
_url = EditUrl(Action, _parameters);
_authorized = IsAuthorized();
}