-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added: Add admin interface app for global admin dashboard theming and styling #987
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that you managed to implement a fully customizable admin interface, and kudos to all the effort that went into this but ... I do think 500 lines of code added for functionality that may not really get used (i.e., who will really care enough about how the admin interface looks to set 30+ color variables?) is a bit overkill. It pains me, but I'd vote for a css file to style everything "AML style" and leave this branch for what it is.
backend/admin_interface/static/admin_interface/js/admin_interface_configuration.js
Outdated
Show resolved
Hide resolved
762f3ea
to
507b53e
Compare
Should I merge this? |
ffb7ea0
to
9a562e7
Compare
…oard theming and styling (cherry picked from commit 387879fc5277fd5d9828c12f49e09e7825429ebd)
This commit adds the necessary URLs and views for the admin interface app. It includes a new `admin_interface/urls.py` file with a route for the `get_theme_stylesheet` view. Additionally, the `backend/aml/urls.py` file is modified to include the `admin_interface` URLs. The purpose of this change is to enable theming and styling for the global admin dashboard. Note: This commit message follows the established convention of starting with a verb in the imperative mood, followed by a brief description of the changes.
This commit modifies the `AdminInterfaceConfigurationAdmin` class in the `admin.py` file to include a theme overview column in the list display. The theme overview shows a visual representation of the colors assigned to the theme using HTML color blocks. The purpose of this change is to provide a quick visual reference of the theme colors in the admin interface configuration list. Note: This commit message follows the established convention of starting with a verb in the imperative mood, followed by a brief description of the changes.
… work with color inputs The commit modifies the `AdminInterfaceThemeConfiguration` model in the `models.py` file. It updates the default color values for various elements such as primary, secondary, accent colors, body colors, header color, link colors, borders, error colors, message colors, darkened colors, selected colors, and button colors. The purpose of this change is to ensure consistent and visually appealing theming for the admin interface. Note: This commit message follows the established convention of starting with a verb in the imperative mood, followed by a brief description of the changes.
… work with color inputs
The commit removes the unused code for appending color behind input in the `admin_interface_configuration.js` file. This code was commented out and not being used in the application.
9a562e7
to
248a4a7
Compare
The commit removes the unused `admin_custom.css` file from the `admin_interface/css` directory. This file was no longer being used in the application.
This pull request adds a new "admin_interface" app that allows for theming and styling of the global admin dashboard.
For now, I've only added the css color variables that are used by Django and the custom css stylesheet. If we also want to set fonts, I can add it in a later PR.
Architecturally, the theme (
AdminInterfaceThemeConfiguration
) hangs under the admin interface configuration (AdminInterfaceConfiguration
) with a one-to-one relation. I decided to do it like this so we could potentially add other kinds of configuration features to this admin interface configuration model if needed in the future. The theming part (colors, and possibly fonts in the future) will then be nicely separated from potential unrelated settings.Resolves #894
Screenshots
Overview
Edit form