DEV: Refactor the Automation Plugin UI to match admin UI guidelines (#31060)

This change updates the Automation plugin to make use of the `use_new_show_route` plugin flag, as well as generally updating the UI to match current admin UI guidelines. Notable changes include:

- Moving template/router/controller files to make use of the `admin.adminPlugins.show` route.
- Changing the URIs from `/admin/plugins/discourse-automation` to `/admin/plugins/automation`, to match the `PLUGIN_NAME`.
- Adding UI wrappers around the New/Edit forms, and polishing the list of defined automations.
This commit is contained in:
Gary Pendergast
2025-02-05 14:34:15 +11:00
committed by GitHub
parent a2dbcedbd9
commit f439bf14cc
26 changed files with 432 additions and 421 deletions

View File

@ -10,13 +10,13 @@ DiscourseAutomation::Engine.routes.draw do
put "/append-last-checked-by/:post_id" => "append_last_checked_by#post_checked"
end
scope "/admin/plugins/discourse-automation",
scope "/admin/plugins/automation",
as: "admin_discourse_automation",
constraints: AdminConstraint.new do
scope format: false do
get "/" => "admin#index"
get "/new" => "admin#new"
get "/:id" => "admin#edit"
get "/automation" => "admin#index"
get "/automation/new" => "admin#new"
get "/automation/:id" => "admin#edit"
end
scope format: :json do