Certain features can now be enabled/disabled from config
This commit is contained in:
parent
3a663eeb09
commit
28cc6b5938
|
@ -22,7 +22,8 @@
|
|||
%ul.nav.navbar-nav
|
||||
= nav_entry t('views.navigation.timeline'), root_path
|
||||
= nav_entry t('views.navigation.inbox'), "/inbox", badge: inbox_count
|
||||
= nav_entry t('views.navigation.discover'), discover_path
|
||||
- if APP_CONFIG.dig(:features, :discover, :enabled)
|
||||
= nav_entry t('views.navigation.discover'), discover_path
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
- unless @user.nil?
|
||||
- unless @user == current_user
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
.panel.panel-default.hidden-xs
|
||||
.list-group
|
||||
= list_group_item t('views.general.timeline'), root_path
|
||||
= list_group_item t('views.general.public'), public_timeline_path
|
||||
- if APP_CONFIG.dig(:features, :public, :enabled)
|
||||
= list_group_item t('views.general.public'), public_timeline_path
|
||||
- current_user.groups.each do |group|
|
||||
= list_group_item group.display_name, group_timeline_path(group.name)
|
||||
- unless @group.nil?
|
||||
|
|
|
@ -12,6 +12,14 @@ anonymous_name: "Anonymous"
|
|||
# How many items (questions, answers, ...) do you want to show per page?
|
||||
items_per_page: 10
|
||||
|
||||
features:
|
||||
# "Discover" page
|
||||
discover:
|
||||
enabled: true
|
||||
# Public timeline
|
||||
public:
|
||||
enabled: true
|
||||
|
||||
# OAuth tokens
|
||||
sharing:
|
||||
twitter:
|
||||
|
|
|
@ -103,8 +103,8 @@ Rails.application.routes.draw do
|
|||
match '/unsubscribe', to: 'subscription#unsubscribe', via: :post, as: :unsubscribe_answer
|
||||
end
|
||||
|
||||
match '/discover', to: 'discover#index', via: :get, as: :discover
|
||||
match '/public', to: 'public#index', via: :get, as: :public_timeline
|
||||
match '/discover', to: 'discover#index', via: :get, as: :discover if APP_CONFIG.dig(:features, :discover, :enabled)
|
||||
match '/public', to: 'public#index', via: :get, as: :public_timeline if APP_CONFIG.dig(:features, :public, :enabled)
|
||||
match '/group/:group_name', to: 'group#index', via: :get, as: :group_timeline
|
||||
|
||||
match '/notifications(/:type)', to: 'notifications#index', via: :get, as: :notifications, defaults: {type: 'new'}
|
||||
|
|
Loading…
Reference in New Issue