added profile management

This commit is contained in:
Shaun Walker
2019-10-25 00:03:11 -04:00
parent 15460eafb7
commit f59f6b2f34
12 changed files with 262 additions and 18 deletions

View File

@ -12,17 +12,20 @@
public string Action { get; set; }
[Parameter]
public string Text { get; set; } // optional
public string Text { get; set; } // optional - defaults to Action if not specified
[Parameter]
public string Parameters { get; set; } // optional
public string Parameters { get; set; } // optional - querystring parameter should be in the form of "id=x&name=y"
[Parameter]
public string Class { get; set; } // optional
public string Class { get; set; } // optional - defaults to primary if not specified
[Parameter]
public string Style { get; set; } // optional
[Parameter]
public string Control { get; set; } // optional - can be used to explicitly link an Action to a Module Control
string text = "";
string url = "";
string parameters = "";
@ -57,7 +60,15 @@
if (PageState.EditMode)
{
string typename = ModuleState.ModuleType.Replace(Utilities.GetTypeNameLastSegment(ModuleState.ModuleType, 0) + ",", Action + ",");
string typename;
if (string.IsNullOrEmpty(Control))
{
typename = ModuleState.ModuleType.Replace(Utilities.GetTypeNameLastSegment(ModuleState.ModuleType, 0) + ",", Action + ",");
}
else
{
typename = ModuleState.ModuleType.Replace(Utilities.GetTypeNameLastSegment(ModuleState.ModuleType, 0) + ",", Control + ",");
}
Type moduleType = Type.GetType(typename);
if (moduleType != null)
{