Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any view can be replaced, not only from generators #1679

Merged
merged 3 commits into from
Jul 2, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions docs/customizing_page_views.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,24 @@
title: Customizing page views
---

In order to change the appearance of any page,
you can write custom Rails views.
You can provide replacements for any of Administrate's templates.
This way you can change the appearance of any page or element of
the interface.

In general, you can override any of the views under Administrate's
[/app/views][1].
For example, say that you want to customize the template used for flash
messages. You can provide your own as
`/app/views/administrate/application/_flashes.html.erb`, and it will replace
Administrate's own.

Figuring out which views are available and where can be repetitive. You can
spare yourself some effort by using the built-in view generators.
pablobm marked this conversation as resolved.
Show resolved Hide resolved

[1](https://github.com/thoughtbot/administrate/tree/master/app/views).
pablobm marked this conversation as resolved.
Show resolved Hide resolved

## Customizing for all resources

The easiest way to get started is by using the built-in generators.
In order to change the appearance of views for all resource types,
call the generators with no arguments.

Expand Down