Edit mode improvements
This commit is contained in:
		| @ -62,6 +62,17 @@ | ||||
|             </select> | ||||
|         </td> | ||||
|     </tr> | ||||
|     <tr> | ||||
|         <td> | ||||
|             <label for="Name" class="control-label">Edit Mode? </label> | ||||
|         </td> | ||||
|         <td> | ||||
|             <select class="form-control" @bind="@editmode"> | ||||
|                 <option value="True">Yes</option> | ||||
|                 <option value="False">No</option> | ||||
|             </select> | ||||
|         </td> | ||||
|     </tr> | ||||
|     <tr> | ||||
|         <td> | ||||
|             <label for="Name" class="control-label">Theme: </label> | ||||
| @ -123,6 +134,7 @@ | ||||
|     string parentid; | ||||
|     string order = ""; | ||||
|     string isnavigation = "True"; | ||||
|     string editmode = "False"; | ||||
|     string themetype; | ||||
|     string layouttype = ""; | ||||
|     string icon = ""; | ||||
| @ -166,6 +178,7 @@ | ||||
|             page.Path = path; | ||||
|             page.Order = (order == null ? 1 : Int32.Parse(order)); | ||||
|             page.IsNavigation = (isnavigation == null ? true : Boolean.Parse(isnavigation)); | ||||
|             page.EditMode = (editmode == null ? true : Boolean.Parse(editmode)); | ||||
|             page.ThemeType = themetype; | ||||
|             page.LayoutType = (layouttype == null ? "" : layouttype); | ||||
|             page.Icon = (icon == null ? "" : icon); | ||||
|  | ||||
| @ -62,6 +62,17 @@ | ||||
|             </select> | ||||
|         </td> | ||||
|     </tr> | ||||
|     <tr> | ||||
|         <td> | ||||
|             <label for="Name" class="control-label">Edit Mode? </label> | ||||
|         </td> | ||||
|         <td> | ||||
|             <select class="form-control" @bind="@editmode" readonly> | ||||
|                 <option value="True">Yes</option> | ||||
|                 <option value="False">No</option> | ||||
|             </select> | ||||
|         </td> | ||||
|     </tr> | ||||
|     <tr> | ||||
|         <td> | ||||
|             <label for="Name" class="control-label">Theme: </label> | ||||
| @ -127,6 +138,7 @@ | ||||
|     string parentid; | ||||
|     string order; | ||||
|     string isnavigation; | ||||
|     string editmode; | ||||
|     string themetype; | ||||
|     string layouttype; | ||||
|     string icon; | ||||
| @ -154,6 +166,7 @@ | ||||
|  | ||||
|                 order = page.Order.ToString(); | ||||
|                 isnavigation = page.IsNavigation.ToString(); | ||||
|                 editmode = page.EditMode.ToString(); | ||||
|                 themetype = page.ThemeType; | ||||
|                 layouttype = page.LayoutType; | ||||
|                 icon = page.Icon; | ||||
|  | ||||
| @ -62,6 +62,17 @@ | ||||
|             </select> | ||||
|         </td> | ||||
|     </tr> | ||||
|     <tr> | ||||
|         <td> | ||||
|             <label for="Name" class="control-label">Edit Mode? </label> | ||||
|         </td> | ||||
|         <td> | ||||
|             <select class="form-control" @bind="@editmode"> | ||||
|                 <option value="True">Yes</option> | ||||
|                 <option value="False">No</option> | ||||
|             </select> | ||||
|         </td> | ||||
|     </tr> | ||||
|     <tr> | ||||
|         <td> | ||||
|             <label for="Name" class="control-label">Theme: </label> | ||||
| @ -127,6 +138,7 @@ | ||||
|     string parentid; | ||||
|     string order; | ||||
|     string isnavigation; | ||||
|     string editmode; | ||||
|     string themetype; | ||||
|     string layouttype; | ||||
|     string icon; | ||||
| @ -161,6 +173,7 @@ | ||||
|                 } | ||||
|                 order = page.Order.ToString(); | ||||
|                 isnavigation = page.IsNavigation.ToString(); | ||||
|                 editmode = page.EditMode.ToString(); | ||||
|                 themetype = page.ThemeType; | ||||
|                 layouttype = page.LayoutType; | ||||
|                 icon = page.Icon; | ||||
| @ -195,6 +208,7 @@ | ||||
|             page.Path = path; | ||||
|             page.Order = (order == null ? 1 : Int32.Parse(order)); | ||||
|             page.IsNavigation = (isnavigation == null ? true : Boolean.Parse(isnavigation)); | ||||
|             page.EditMode = (editmode == null ? true : Boolean.Parse(editmode)); | ||||
|             page.ThemeType = themetype; | ||||
|             page.LayoutType = (layouttype == null ? "" : layouttype); | ||||
|             page.Icon = (icon == null ? "" : icon); | ||||
|  | ||||
| @ -11,7 +11,7 @@ | ||||
| } | ||||
| else | ||||
| { | ||||
|     <ActionLink Action="Add" Text="Add Page" Style="float: right; margin: 10px;" /> | ||||
|     <ActionLink Action="Add" Text="Add Page" /> | ||||
|     <table class="table table-borderless"> | ||||
|         <thead> | ||||
|             <tr> | ||||
|  | ||||
| @ -55,7 +55,8 @@ | ||||
|     </table> | ||||
|     <button type="button" class="btn btn-primary" @onclick="@SaveUser">Save</button> | ||||
|     <button type="button" class="btn btn-secondary" @onclick="@Cancel">Cancel</button> | ||||
|     <br /><br /> | ||||
|     <br /> | ||||
|     <br /> | ||||
| } | ||||
|  | ||||
| @code { | ||||
|  | ||||
| @ -2,8 +2,9 @@ | ||||
| { | ||||
|     public interface IModuleControl | ||||
|     { | ||||
|         string Title { get; } | ||||
|         SecurityAccessLevel SecurityAccessLevel { get; } | ||||
|         string Actions { get; } // can be specified as a comma delimited set of values | ||||
|         SecurityAccessLevel SecurityAccessLevel { get; } // defines the security access level for this control - defaults to View | ||||
|         string Title { get; } // title to display for this control - defaults to module title | ||||
|         string Actions { get; } // allows for routing by configuration rather than by convention ( comma delimited ) - defaults to using component file name | ||||
|         string ContainerType { get; } // container for embedding control - defaults to AdminContainer | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -12,12 +12,14 @@ namespace Oqtane.Modules | ||||
|         [CascadingParameter] | ||||
|         protected Module ModuleState { get; set; } | ||||
|  | ||||
|         public virtual string Title { get { return ""; } } | ||||
|  | ||||
|         public virtual SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.View; } set { } } // default security | ||||
|  | ||||
|         public virtual string Title { get { return ""; } } | ||||
|  | ||||
|         public virtual string Actions { get { return ""; } } | ||||
|  | ||||
|         public virtual string ContainerType { get { return ""; } } | ||||
|  | ||||
|         public string NavigateUrl() | ||||
|         { | ||||
|             return NavigateUrl(PageState.Page.Path); | ||||
|  | ||||
| @ -1,11 +0,0 @@ | ||||
| namespace Oqtane.Modules | ||||
| { | ||||
|     public enum SecurityAccessLevel | ||||
|     { | ||||
|         Anonymous, | ||||
|         View, | ||||
|         Edit, | ||||
|         Admin, | ||||
|         Host | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker