Admin interface for listing, adding and removing custom emojis (#5002)
* Admin interface for listing, adding and removing custom emojis * Only display local ones in the list
This commit is contained in:
parent
d43944143a
commit
09a94b575e
8 changed files with 91 additions and 0 deletions
|
@ -108,6 +108,18 @@ en:
|
|||
unsubscribe: Unsubscribe
|
||||
username: Username
|
||||
web: Web
|
||||
custom_emojis:
|
||||
created_msg: Emoji successfully created!
|
||||
delete: Delete
|
||||
destroyed_msg: Emojo successfully destroyed!
|
||||
emoji: Emoji
|
||||
image_hint: PNG up to 50KB
|
||||
new:
|
||||
title: Add new custom emoji
|
||||
shortcode: Shortcode
|
||||
shortcode_hint: At least 2 characters, only alphanumeric characters and underscores
|
||||
title: Custom emojis
|
||||
upload: Upload
|
||||
domain_blocks:
|
||||
add_new: Add new
|
||||
created_msg: Domain block is now being processed
|
||||
|
|
|
@ -28,6 +28,7 @@ SimpleNavigation::Configuration.run do |navigation|
|
|||
admin.item :sidekiq, safe_join([fa_icon('diamond fw'), 'Sidekiq']), sidekiq_url, link_html: { target: 'sidekiq' }
|
||||
admin.item :pghero, safe_join([fa_icon('database fw'), 'PgHero']), pghero_url, link_html: { target: 'pghero' }
|
||||
admin.item :settings, safe_join([fa_icon('cogs fw'), t('admin.settings.title')]), edit_admin_settings_url
|
||||
admin.item :custom_emojis, safe_join([fa_icon('smile-o fw'), t('admin.custom_emojis.title')]), admin_custom_emojis_url, highlights_on: %r{/admin/custom_emojis}
|
||||
end
|
||||
|
||||
primary.item :logout, safe_join([fa_icon('sign-out fw'), t('auth.logout')]), destroy_user_session_url, link_html: { 'data-method' => 'delete' }
|
||||
|
|
|
@ -136,6 +136,8 @@ Rails.application.routes.draw do
|
|||
resources :users, only: [] do
|
||||
resource :two_factor_authentication, only: [:destroy]
|
||||
end
|
||||
|
||||
resources :custom_emojis, only: [:index, :new, :create, :destroy]
|
||||
end
|
||||
|
||||
get '/admin', to: redirect('/admin/settings/edit', status: 302)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue