Skip to content
Extraits de code Groupes Projets
Valider cd6475d5 rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

Merge pull request #5562 from sjain1107/5560-Hide-community-spotlight

5560 Hide community spotlight setting if not enabled
parents a7d652c7 8b1f0453
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -150,6 +150,7 @@ diaspora.yml file**. The existing settings from 0.4.x and before will not work a ...@@ -150,6 +150,7 @@ diaspora.yml file**. The existing settings from 0.4.x and before will not work a
* Do not truncate notification emails anymore [#4342](https://github.com/diaspora/diaspora/issues/4342) * Do not truncate notification emails anymore [#4342](https://github.com/diaspora/diaspora/issues/4342)
* Allows users to export their data in gzipped JSON format from their user settings page [#5499](https://github.com/diaspora/diaspora/pull/5499) * Allows users to export their data in gzipped JSON format from their user settings page [#5499](https://github.com/diaspora/diaspora/pull/5499)
* Strip EXIF data from newly uploaded images [#5510](https://github.com/diaspora/diaspora/pull/5510) * Strip EXIF data from newly uploaded images [#5510](https://github.com/diaspora/diaspora/pull/5510)
* Hide user setting if the community spotlight is not enabled on the pod [#5562](https://github.com/diaspora/diaspora/pull/5562)
# 0.4.1.2 # 0.4.1.2
......
...@@ -7,5 +7,6 @@ ...@@ -7,5 +7,6 @@
%br %br
%br %br
= t('.try_adding_some_more_contacts') = t('.try_adding_some_more_contacts')
!= t('.or_spotlight', :link => link_to(t(".community_spotlight") , community_spotlight_path)) - if AppConfig.settings.community_spotlight.enable?
!= t('.or_spotlight', :link => link_to(t(".community_spotlight") , community_spotlight_path))
...@@ -85,9 +85,10 @@ ...@@ -85,9 +85,10 @@
= f.fields_for :stream_preferences do |type| = f.fields_for :stream_preferences do |type|
#stream_prefs #stream_prefs
= f.label :show_community_spotlight_in_stream, :class => "checkbox" do - if AppConfig.settings.community_spotlight.enable?
= f.check_box :show_community_spotlight_in_stream = f.label :show_community_spotlight_in_stream, :class => "checkbox" do
= t('.show_community_spotlight') = f.check_box :show_community_spotlight_in_stream
= t('.show_community_spotlight')
.small-horizontal-spacer .small-horizontal-spacer
= f.label :getting_started, :class => "checkbox" do = f.label :getting_started, :class => "checkbox" do
......
...@@ -215,6 +215,18 @@ describe UsersController, :type => :controller do ...@@ -215,6 +215,18 @@ describe UsersController, :type => :controller do
expect(response.status).to eq(200) expect(response.status).to eq(200)
end end
it 'displays community spotlight checkbox' do
AppConfig.settings.community_spotlight.enable = true
get 'edit', :id => @user.id
expect(response.body).to include('input name="user[show_community_spotlight_in_stream]"')
end
it 'hides community spotlight checkbox' do
AppConfig.settings.community_spotlight = false
get 'edit', :id => @user.id
expect(response.body).not_to include('input name="user[show_community_spotlight_in_stream]"')
end
it 'set @email_pref to false when there is a user pref' do it 'set @email_pref to false when there is a user pref' do
@user.user_preferences.create(:email_type => 'mentioned') @user.user_preferences.create(:email_type => 'mentioned')
get 'edit', :id => @user.id get 'edit', :id => @user.id
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter