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

Add quick links to the admin interface in the WebUI #8545

Merged
merged 4 commits into from
Jan 4, 2019

Conversation

ClearlyClaire
Copy link
Contributor

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:
screenshot_2018-08-31 account statuses - thib sitedethib com - dev instance

@ClearlyClaire ClearlyClaire added the moderation Administration and moderation tooling label Aug 31, 2018
@ClearlyClaire
Copy link
Contributor Author

CircleCI is stuck for some reason…

authorize :status, :index?

@statuses = @account.statuses.where(id: params[:id])
authorize @statuses[0], :show?
Copy link
Member

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|
Copy link
Member

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?

Copy link
Contributor Author

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.

@Gargron Gargron merged commit 6f9a7bd into mastodon:master Jan 4, 2019
@ClearlyClaire ClearlyClaire deleted the features/admin-links branch March 14, 2019 15:44
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
* 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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moderation Administration and moderation tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants