Updated routes for admins dashboard
• Updated: - routes for admins dashboard (expenses, group categories, promotions, trending hashtags) that were in the /settings path but are now in the /admin path - /filters to be in /settings/filters • Removed: - authorize_follow route
This commit is contained in:
@@ -9,7 +9,7 @@ SimpleNavigation::Configuration.run do |navigation|
|
||||
end
|
||||
|
||||
n.item :preferences, safe_join([fa_icon('cog fw'), t('settings.preferences')]), settings_preferences_url, highlights_on: %r{/settings/preferences|/settings/notifications}
|
||||
n.item :filters, safe_join([fa_icon('filter fw'), t('filters.index.title')]), filters_path, highlights_on: %r{/filters}
|
||||
n.item :filters, safe_join([fa_icon('filter fw'), t('filters.index.title')]), settings_filters_path, highlights_on: %r{/filters}
|
||||
|
||||
n.item :security, safe_join([fa_icon('lock fw'), t('settings.account')]), edit_user_registration_url do |s|
|
||||
s.item :password, safe_join([fa_icon('lock fw'), t('settings.account_settings')]), edit_user_registration_url, highlights_on: %r{/auth/edit|/settings/delete}
|
||||
@@ -43,10 +43,10 @@ SimpleNavigation::Configuration.run do |navigation|
|
||||
s.item :sidekiq, safe_join([fa_icon('diamond fw'), 'Sidekiq']), sidekiq_url, link_html: { target: 'sidekiq' }, if: -> { current_user.admin? }
|
||||
s.item :pghero, safe_join([fa_icon('database fw'), 'PgHero']), pghero_url, link_html: { target: 'pghero' }, if: -> { current_user.admin? }
|
||||
s.item :moderation, safe_join([fa_icon('id-card-o fw'), t('verifications.moderation.title')]), settings_verifications_moderation_url, if: -> { current_user.admin? }
|
||||
s.item :promotions, safe_join([fa_icon('star fw'), t('promotions.title')]), settings_promotions_url, if: -> { current_user.admin? }
|
||||
s.item :monthly_funding, safe_join([fa_icon('money fw'), t('monthly_funding.title')]), settings_expenses_url, if: -> { current_user.admin? }
|
||||
s.item :group_categories, safe_join([fa_icon('users fw'), t('group_categories.title')]), settings_group_categories_url, if: -> { current_user.admin? }
|
||||
s.item :trending_hashtags, safe_join([fa_icon('hashtag fw'), 'Trending Hashtags']), settings_trending_hashtags_url, if: -> { current_user.admin? }
|
||||
s.item :promotions, safe_join([fa_icon('star fw'), t('promotions.title')]), admin_promotions_url, if: -> { current_user.admin? }
|
||||
s.item :monthly_funding, safe_join([fa_icon('money fw'), t('monthly_funding.title')]), admin_expenses_url, if: -> { current_user.admin? }
|
||||
s.item :group_categories, safe_join([fa_icon('users fw'), t('group_categories.title')]), admin_group_categories_url, if: -> { current_user.admin? }
|
||||
s.item :trending_hashtags, safe_join([fa_icon('hashtag fw'), 'Trending Hashtags']), admin_trending_hashtags_url, if: -> { current_user.admin? }
|
||||
end
|
||||
|
||||
n.item :logout, safe_join([fa_icon('sign-out fw'), t('auth.logout')]), destroy_user_session_url, link_html: { 'data-method' => 'delete' }
|
||||
|
||||
@@ -37,8 +37,6 @@ Rails.application.routes.draw do
|
||||
confirmations: 'auth/confirmations',
|
||||
}
|
||||
|
||||
get '/authorize_follow', to: redirect { |_, request| "/authorize_interaction?#{request.params.to_query}" }
|
||||
|
||||
namespace :settings do
|
||||
resource :profile, only: [:show, :update]
|
||||
resource :preferences, only: [:show, :update]
|
||||
@@ -50,11 +48,6 @@ Rails.application.routes.draw do
|
||||
post '/btcpay-notification', to: 'upgrade#btcpay_notification', as: :btcpay_notification
|
||||
end
|
||||
|
||||
resources :promotions, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
resources :expenses, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
resources :group_categories, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
resources :trending_hashtags, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
|
||||
namespace :verifications do
|
||||
get :moderation, to: 'moderation#index', as: :moderation
|
||||
get 'moderation/:id/approve', to: 'moderation#approve', as: :approve
|
||||
@@ -87,14 +80,13 @@ Rails.application.routes.draw do
|
||||
|
||||
resources :sessions, only: [:destroy]
|
||||
resources :scheduled_statuses, only: [:index, :destroy]
|
||||
resources :filters, except: [:show]
|
||||
end
|
||||
|
||||
resources :media, only: [:show] do
|
||||
get :player
|
||||
end
|
||||
|
||||
resources :filters, except: [:show]
|
||||
|
||||
get '/media_proxy/:id/(*any)', to: 'media_proxy#show', as: :media_proxy
|
||||
|
||||
namespace :admin do
|
||||
@@ -105,6 +97,10 @@ Rails.application.routes.draw do
|
||||
resources :action_logs, only: [:index]
|
||||
resources :warning_presets, except: [:new]
|
||||
resource :settings, only: [:edit, :update]
|
||||
resources :promotions, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
resources :expenses, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
resources :group_categories, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
resources :trending_hashtags, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
|
||||
resources :reports, only: [:index, :show] do
|
||||
member do
|
||||
|
||||
Reference in New Issue
Block a user