Started creating generated admin page

This commit is contained in:
2024-10-06 12:48:05 +02:00
parent dd67bba07d
commit 6a781990e4
6 changed files with 140 additions and 15 deletions

View File

@@ -6,7 +6,6 @@ public interface IAdminPropertyGenerator {
IAdminPropertyGenerator Editable(bool editable);
IAdminPropertyGenerator DisplayValueWhileEditing(bool display);
IAdminPropertyGenerator DisplayInListing(bool display = true);
IAdminPropertyGenerator Bold(bool isBold = true);
IAdminPropertyGenerator Ignore(bool ignore = true);
IAdminPropertyGenerator Generated(bool generated = true);

View File

@@ -35,11 +35,6 @@ internal sealed class AdminPropertyGenerator(string name, Type type) : IAdminPro
return this;
}
public IAdminPropertyGenerator Bold(bool isBold = true) {
_property.Bold = isBold;
return this;
}
public IAdminPropertyGenerator Ignore(bool ignore = false) {
_property.Ignore = ignore;
return this;
@@ -73,7 +68,6 @@ internal sealed class AdminPropertyGenerator(string name, Type type) : IAdminPro
public void ApplyConfigurationFromAttributes<T>(AdminPageGenerator<T> pageGenerator, object[] attributes, PropertyInfo property) {
if (attributes.Any(a => a is KeyAttribute)) {
pageGenerator.Page.DefaultSortPropertyName = property.Name;
Bold();
Editable(false);
}
@@ -82,9 +76,6 @@ internal sealed class AdminPropertyGenerator(string name, Type type) : IAdminPro
if (attributes.Any(a => a is AdminUneditableAttribute))
Editable(false);
if (attributes.Any(a => a is AdminBoldAttribute))
Bold();
if (attributes.Any(a => a is AdminIgnoreAttribute)) {
var attribute = attributes.Single(a => a is AdminIgnoreAttribute) as AdminIgnoreAttribute;