Removed unnecessary files + added proper documentation to admin page generators
This commit is contained in:
@@ -5,24 +5,105 @@ namespace HopFrame.Web.Admin.Generators;
|
||||
|
||||
public interface IAdminPageGenerator<TModel> {
|
||||
|
||||
/// <summary>
|
||||
/// Sets the title of the Admin Page
|
||||
/// </summary>
|
||||
/// <param name="title">the specified title</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> Title(string title);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the description of the Admin Page
|
||||
/// </summary>
|
||||
/// <param name="description">the specified description</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> Description(string description);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the url for the Admin Page
|
||||
/// </summary>
|
||||
/// <param name="url">the specified url (administration/{url})</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> Url(string url);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the permission needed to view the Admin Page
|
||||
/// </summary>
|
||||
/// <param name="permission">the specified permission</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> ViewPermission(string permission);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the permission needed to create a new Entry
|
||||
/// </summary>
|
||||
/// <param name="permission">the specified permission</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> CreatePermission(string permission);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the permission needed to update an Entry
|
||||
/// </summary>
|
||||
/// <param name="permission">the specified permission</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> UpdatePermission(string permission);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the permission needed to delete an Entry
|
||||
/// </summary>
|
||||
/// <param name="permission">the specified permission</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> DeletePermission(string permission);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables the create button
|
||||
/// </summary>
|
||||
/// <param name="show">the specified state</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> ShowCreateButton(bool show);
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables the delete button
|
||||
/// </summary>
|
||||
/// <param name="show">the specified state</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> ShowDeleteButton(bool show);
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables the update button
|
||||
/// </summary>
|
||||
/// <param name="show">the specified state</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> ShowUpdateButton(bool show);
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the default sort property and direction
|
||||
/// </summary>
|
||||
/// <param name="propertyExpression">Which property should be sorted</param>
|
||||
/// <param name="direction">In which direction should be sorted</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> DefaultSort<TProperty>(Expression<Func<TModel, TProperty>> propertyExpression, ListSortDirection direction);
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the repository for the page
|
||||
/// </summary>
|
||||
/// <typeparam name="TRepository">The specified repository</typeparam>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> ConfigureRepository<TRepository>() where TRepository : ModelRepository<TModel>;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the generator of the specified property
|
||||
/// </summary>
|
||||
/// <param name="propertyExpression">The property</param>
|
||||
/// <returns></returns>
|
||||
IAdminPropertyGenerator<TProperty, TModel> Property<TProperty>(Expression<Func<TModel, TProperty>> propertyExpression);
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the default property that should be displayed as a property in other listings
|
||||
/// </summary>
|
||||
/// <param name="propertyExpression">The property</param>
|
||||
/// <returns></returns>
|
||||
IAdminPageGenerator<TModel> ListingProperty<TProperty>(Expression<Func<TModel, TProperty>> propertyExpression);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user