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 />
|
||||
- Edit.razor - component for adding or editing content<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\[Module]Service.cs - implements service API interface methods<br /><br />
|
||||
C:\Users\Shaun.Walker\Source\Repos\sbwalker\oqtane.framework\Oqtane.Server\Modules\[Module]\<br />
|
||||
|
|
|
@ -121,6 +121,10 @@
|
|||
{
|
||||
var moduleobject = Activator.CreateInstance(_settingsModuleType);
|
||||
_settingstitle = (string)_settingsModuleType.GetProperty("Title").GetValue(moduleobject, null);
|
||||
if (string.IsNullOrEmpty(_settingstitle))
|
||||
{
|
||||
_settingstitle = "Other Settings";
|
||||
}
|
||||
|
||||
DynamicComponent = builder =>
|
||||
{
|
||||
|
@ -141,7 +145,7 @@
|
|||
pagemodule.PageId = int.Parse(_pageId);
|
||||
pagemodule.Title = _title;
|
||||
pagemodule.ContainerType = _containerType;
|
||||
|
||||
|
||||
await PageModuleService.UpdatePageModuleAsync(pagemodule);
|
||||
await PageModuleService.UpdatePageModuleOrderAsync(pagemodule.PageId, pagemodule.Pane);
|
||||
|
||||
|
|
|
@ -30,25 +30,15 @@ namespace Oqtane.Shared
|
|||
|
||||
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)
|
||||
{
|
||||
url += "/" + moduleid.ToString();
|
||||
path += $"/{moduleid}";
|
||||
if (!string.IsNullOrEmpty(action))
|
||||
{
|
||||
path += $"/{action}";
|
||||
}
|
||||
}
|
||||
if (moduleid != -1 && action != "")
|
||||
{
|
||||
url += "/" + action;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(parameters))
|
||||
{
|
||||
url += "?" + parameters;
|
||||
}
|
||||
if (!url.StartsWith("/"))
|
||||
{
|
||||
url = "/" + url;
|
||||
}
|
||||
return url;
|
||||
return NavigateUrl(alias, path, parameters);
|
||||
}
|
||||
|
||||
public static string ContentUrl(string alias, int fileid)
|
||||
|
|
Loading…
Reference in New Issue
Block a user