Created AdminContext handling
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
namespace HopFrame.Web.Admin.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)]
|
||||
public class AdminDescriptionAttribute(string description) : Attribute {
|
||||
public string Description { get; set; } = description;
|
||||
}
|
||||
6
src/HopFrame.Web.Admin/Attributes/AdminNameAttribute.cs
Normal file
6
src/HopFrame.Web.Admin/Attributes/AdminNameAttribute.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace HopFrame.Web.Admin.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)]
|
||||
public class AdminNameAttribute(string name) : Attribute {
|
||||
public string Name { get; set; } = name;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace HopFrame.Web.Admin.Attributes.Classes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class AdminButtonConfigAttribute(bool showCreateButton = true, bool showDeleteButton = true, bool showUpdateButton = true) : Attribute {
|
||||
public bool ShowCreateButton { get; set; } = showCreateButton;
|
||||
public bool ShowDeleteButton { get; set; } = showDeleteButton;
|
||||
public bool ShowUpdateButton { get; set; } = showUpdateButton;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using HopFrame.Web.Admin.Models;
|
||||
|
||||
namespace HopFrame.Web.Admin.Attributes.Classes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class AdminPermissionsAttribute(AdminPagePermissions permissions) : Attribute {
|
||||
public AdminPagePermissions Permissions { get; set; } = permissions;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace HopFrame.Web.Admin.Attributes.Members;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class AdminBoldAttribute : Attribute;
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace HopFrame.Web.Admin.Attributes.Members;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class AdminHideValueAttribute : Attribute;
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace HopFrame.Web.Admin.Attributes.Members;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class AdminIgnoreAttribute(bool onlyForListing = false) : Attribute {
|
||||
public bool OnlyForListing { get; set; } = onlyForListing;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace HopFrame.Web.Admin.Attributes.Members;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class AdminUneditableAttribute : Attribute;
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace HopFrame.Web.Admin.Attributes.Members;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class AdminUnsortableAttribute : Attribute;
|
||||
Reference in New Issue
Block a user