Commit 9cee0e0
authored
Extract layout and pages to partials (#8172)
* Add layout helper from base page w/titles
Should be able to handle the site, page and combined titles for both layout files.
Consolidate title helper into layout helper.
* Extract layout file
Known issue with show action when declaring a member_action to render a page, no page title is rendered.
We won't include the body tag data attributes since we don't utilize that and since there's no need now as users can customize.
* Add page title and presenter methods
* Extract page template
* Extract show template
* Extract new/edit form templates
* Extract index template
* Remove renderer_for helper method
Now that we've extracted all pages, this has no references.
* Remove unused view factory class/config
This predates Arbre builder method which is how we create components. This may have been used to override views entirely but with partials we provide a simpler, more Rails like way to customize the admin while minimizing the library footprint and maintainance.
Note that we use the method_or_proc_helper throughout but mysteriously this is defined in view helpers but at the root level module. We already require and include the module elsewhere, e.g. menu item and scopes, so requiring it in filters/forms isn't abnormal. With the view factory removal, the test suite starting failing here but now all green.
* Remove unused main_content locale
* Reorganize some templates post extraction
This moves sidebar to top level. The action item and sidebar block templates now go into "shared" directory. This also removes an unnecessary head partial since we'll just include the html head defaults directly into the layout file now that we have that extracted.1 parent 320cb34 commit 9cee0e0
101 files changed
Lines changed: 362 additions & 963 deletions
File tree
- app/views
- active_admin
- devise
- confirmations
- passwords
- registrations
- sessions
- unlocks
- page
- resource
- layouts
- config/locales
- docs
- features/comments
- lib
- active_admin
- orm/active_record
- comments
- view_helpers
- views
- pages
- spec/unit
- views/pages
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 23 | + | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments