support for module header and footer content

This commit is contained in:
sbwalker
2025-05-14 12:18:37 -04:00
parent 9000f05961
commit 57d443be8d
11 changed files with 147 additions and 22 deletions

View File

@ -113,6 +113,18 @@ namespace Oqtane.Models
[NotMapped]
public DateTime? ExpiryDate { get; set; }
/// <summary>
/// Header content to include at the top of a module instance in the UI
/// </summary>
[NotMapped]
public string Header { get; set; }
/// <summary>
/// Footer content to include below a module instance in the UI
/// </summary>
[NotMapped]
public string Footer { get; set; }
#endregion
#region SiteRouter properties
@ -218,6 +230,8 @@ namespace Oqtane.Models
ContainerType = ContainerType,
EffectiveDate = EffectiveDate,
ExpiryDate = ExpiryDate,
Header = Header,
Footer = Footer,
CreatedBy = CreatedBy,
CreatedOn = CreatedOn,
ModifiedBy = ModifiedBy,

View File

@ -41,14 +41,27 @@ namespace Oqtane.Models
/// Reference to a Razor Container which wraps this module instance.
/// </summary>
public string ContainerType { get; set; }
/// <summary>
/// Start of when this assignment is valid. See also <see cref="ExpiryDate"/>
/// </summary>
public DateTime? EffectiveDate { get; set; }
/// <summary>
/// End of when this assignment is valid. See also <see cref="EffectiveDate"/>
/// </summary>
public DateTime? ExpiryDate { get; set; }
/// <summary>
/// Header content to include above the module instance in the UI
/// </summary>
public string Header { get; set; }
/// <summary>
/// Footer content to include below the module instance in the UI
/// </summary>
public string Footer { get; set; }
#region IDeletable Properties
public string DeletedBy { get; set; }

View File

@ -95,6 +95,8 @@ namespace Oqtane.Models
Pane = PaneNames.Default;
Order = 1;
ContainerType = "";
Header = "";
Footer = "";
IsDeleted = false;
PermissionList = new List<Permission>()
{
@ -110,6 +112,8 @@ namespace Oqtane.Models
public string Pane { get; set; }
public int Order { get; set; }
public string ContainerType { get; set; }
public string Header { get; set; }
public string Footer { get; set; }
public bool IsDeleted { get; set; }
public List<Permission> PermissionList { get; set; }
public List<Setting> Settings { get; set; }