-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add quick links to the admin interface in the WebUI #8545
Conversation
1b6962c
to
2cf5ef3
Compare
CircleCI is stuck for some reason… |
2cf5ef3
to
e705b64
Compare
authorize :status, :index? | ||
|
||
@statuses = @account.statuses.where(id: params[:id]) | ||
authorize @statuses[0], :show? |
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 suggest @statuses.first
|
||
%hr.spacer/ | ||
|
||
= form_for(@form, url: admin_account_statuses_path(@account.id)) do |f| |
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.
Is this file not a carbon copy of something else? Could we reuse the existing template?
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.
It's not an exact copy as there is no need for filters or pagination, but yeah, some refactoring is probably possible.
e705b64
to
150b6fe
Compare
If the current logged-in user is an admin, add quick links to the admin interface in account and toot dropdown menu. Suggestion by @ashkitten
150b6fe
to
a2a661d
Compare
* Allow to show a specific status in the admin interface * Let the front-end know the current account is a moderator * Add admin links to status and account menus If the current logged-in user is an admin, add quick links to the admin interface in account and toot dropdown menu. Suggestion by @ashkitten * Use @statuses.first instead of @statuses[0]
This adds quick links at the bottom of the status/account dropdown menus if the logged-in user is a moderator.
Also an admin view for select toots only: