You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Creating an Admin Modules](creating_an_admin_module.md)
4
-
-[View Components](view_components.md)
5
-
-[Filters](filters.md)
6
-
-[Recycler](recycler.md)
7
-
-[Resource Tabs](resource_tabs.md)
8
-
-[Search](search.md)
9
-
-[Widgets](widgets.md)
10
-
-[Dashboard Cells](dashboard_cells.md)
1
+
# Building Admin Modules
2
+
3
+
Any application admin panel will need more than just user management capabilities. Your app might need page, tag, product management. This section deals with extending Bonfire admin are with your own modules and integrating them into the admin panel.
4
+
5
+
## Creating an Admin Module
6
+
7
+
Learn how to create new modules of code for the admin area, centered around a single task or resource, like Users, Photos, etc. This guide covers the basics of creating a `Module.php` file, configuring module locations, and adding menu items.
8
+
9
+
[Read more about Creating an Admin Module](creating_an_admin_module.md)
10
+
11
+
## View Components
12
+
13
+
View Components allow you to create custom HTML elements to use within your views. This section lists the components available within the default `Admin` theme and provides examples of their usage.
14
+
15
+
[Read more about View Components](view_components.md)
16
+
17
+
## Filters
18
+
19
+
Filtering allows you to specify which columns can be filtered and then pass your model to a view cell that handles the display of the filters. This ensures a consistent look and functionality in the UI while providing the least amount of work when creating a UI.
20
+
21
+
[Read more about Filters](filters.md)
22
+
23
+
## Recycler
24
+
25
+
The Recycler provides an area where users can browse objects that have been deleted and either restore or purge them. The models for these resources must have soft deletes enabled. This section covers registering a resource, localizing column names, and modifying the Recycler query.
26
+
27
+
[Read more about the Recycler](recycler.md)
28
+
29
+
## Resource Tabs
30
+
31
+
Resource tabs are the tabs displayed when editing a resource, like an individual User or User Group. They make it possible to easily integrate other tabs onto a user without editing the core theme.
32
+
33
+
[Read more about Resource Tabs](resource_tabs.md)
34
+
35
+
## Search
36
+
37
+
Bonfire provides a flexible search system that is highlighted on all areas of the admin area. This section covers integrating your module into the search results, adding filters for the Advanced Search form, and providing search results.
38
+
39
+
[Read more about Search](search.md)
40
+
41
+
## Widgets
42
+
43
+
Widgets are elements that display information on the dashboard. They can be small informational cards or charts. This section covers adding new widgets, configuring them, and displaying them on the dashboard.
44
+
45
+
[Read more about Widgets](widgets.md)
46
+
47
+
## Dashboard Cells
48
+
49
+
Customize the dashboard with the use of view cells. This section covers specifying which cells to display, creating the cell, and displaying it on the dashboard.
50
+
51
+
[Read more about Dashboard Cells](dashboard_cells.md)
Bonfire provides a simple assets system that was created to solve two main challenges:
4
-
5
-
1. We should be able to serve CSS/JS assets from anywhere. While this is primarily for use by themes, it could serve many purposes.
6
-
2. How to easily handle browser caching/cache-busting with updated assets.
7
-
8
-
And try to do this in the simplest way possible.
9
-
10
-
For the examples, we will link to assets for the Admin theme.
3
+
As elaborated in [Assets Management](../modules/assets.md), Bonfire provides a simple assets system that was created to serve CSS/JS assets from anywhere and to easily handle browser caching/cache-busting with updated assets.
11
4
12
5
## Linking to assets
13
6
14
7
Within your views you can link to assets anywhere within your project with the `asset()` or `asset_link()` helper function.
15
8
`asset_link()` takes two arguments. The first is the path to the file to load. The first segment of this path must be one of the defined
16
-
`$folders` in the configuration file. The rest of the path would be based on the actual file structure within that
17
-
location. For the `Admin` theme, a folder has been defined called `admin`. Both the `Auth` and `App` themes have
18
-
similar folders already defined.
9
+
`$folders` in the configuration file `Assets.php`. The rest of the path would be based on the actual file structure within that
10
+
location. For the `App` theme, a folder has been defined called `app`.
19
11
20
-
The second argument is the type of asset being loaded. This tells it how the resulting link should be formed.
21
-
Currently, it only supports `css` and `js` files.
12
+
The second argument is the type of asset being loaded. Currently, it only supports `css` and `js` files.
22
13
23
14
```php
24
-
<?= asset_link('admin/css/admin.css', 'css') ?>
25
-
<?= asset_link('admin/js/admin.js', 'js') ?>
15
+
<?= asset_link('app/css/admin.css', 'css') ?>
16
+
<?= asset_link('app/js/admin.js', 'js') ?>
26
17
```
27
18
28
-
The `asset()` function is similar, except it only returns the URL. This is helpful as the function also inserts
29
-
a string within the filename that helps browsers cache the file, but that will change when the file is updated
30
-
so the browser knows to grab a fresh copy of the file.
19
+
The `asset()` function is similar, except it only returns the URL only.
0 commit comments