Merge pull request #353 from sbwalker/master
fixed issue with module settings tab and module creator templating
This commit is contained in:
commit
c5aaccca76
|
@ -30,7 +30,7 @@ C:\Users\Shaun.Walker\Source\Repos\sbwalker\oqtane.framework\Oqtane.Client\Modul
|
||||||
- Index.razor - main component for your module<br />
|
- Index.razor - main component for your module<br />
|
||||||
- Edit.razor - component for adding or editing content<br />
|
- Edit.razor - component for adding or editing content<br />
|
||||||
- Settings.razor - component for managing module settings<br />
|
- Settings.razor - component for managing module settings<br />
|
||||||
- Module.cs - implements IModule interface to provide configuration settings for your module<br />
|
- ModuleInfo.cs - implements IModule interface to provide configuration settings for your module<br />
|
||||||
- Services\I[Module]Service.cs - interface for defining service API methods<br />
|
- Services\I[Module]Service.cs - interface for defining service API methods<br />
|
||||||
- Services\[Module]Service.cs - implements service API interface methods<br /><br />
|
- Services\[Module]Service.cs - implements service API interface methods<br /><br />
|
||||||
C:\Users\Shaun.Walker\Source\Repos\sbwalker\oqtane.framework\Oqtane.Server\Modules\[Module]\<br />
|
C:\Users\Shaun.Walker\Source\Repos\sbwalker\oqtane.framework\Oqtane.Server\Modules\[Module]\<br />
|
||||||
|
|
|
@ -121,6 +121,10 @@
|
||||||
{
|
{
|
||||||
var moduleobject = Activator.CreateInstance(_settingsModuleType);
|
var moduleobject = Activator.CreateInstance(_settingsModuleType);
|
||||||
_settingstitle = (string)_settingsModuleType.GetProperty("Title").GetValue(moduleobject, null);
|
_settingstitle = (string)_settingsModuleType.GetProperty("Title").GetValue(moduleobject, null);
|
||||||
|
if (string.IsNullOrEmpty(_settingstitle))
|
||||||
|
{
|
||||||
|
_settingstitle = "Other Settings";
|
||||||
|
}
|
||||||
|
|
||||||
DynamicComponent = builder =>
|
DynamicComponent = builder =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,25 +30,15 @@ namespace Oqtane.Shared
|
||||||
|
|
||||||
public static string EditUrl(string alias, string path, int moduleid, string action, string parameters)
|
public static string EditUrl(string alias, string path, int moduleid, string action, string parameters)
|
||||||
{
|
{
|
||||||
string url = NavigateUrl(alias, path, "");
|
|
||||||
if (url == "/") url = "";
|
|
||||||
if (moduleid != -1)
|
if (moduleid != -1)
|
||||||
{
|
{
|
||||||
url += "/" + moduleid.ToString();
|
path += $"/{moduleid}";
|
||||||
}
|
if (!string.IsNullOrEmpty(action))
|
||||||
if (moduleid != -1 && action != "")
|
|
||||||
{
|
{
|
||||||
url += "/" + action;
|
path += $"/{action}";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(parameters))
|
|
||||||
{
|
|
||||||
url += "?" + parameters;
|
|
||||||
}
|
}
|
||||||
if (!url.StartsWith("/"))
|
return NavigateUrl(alias, path, parameters);
|
||||||
{
|
|
||||||
url = "/" + url;
|
|
||||||
}
|
|
||||||
return url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string ContentUrl(string alias, int fileid)
|
public static string ContentUrl(string alias, int fileid)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user