diff --git a/app/views/users/_privacy_settings.haml b/app/views/users/_privacy_settings.haml new file mode 100644 index 000000000..1c91a637b --- /dev/null +++ b/app/views/users/_privacy_settings.haml @@ -0,0 +1,33 @@ += render 'shared/settings_nav' + +.container-fluid + .col-lg-8.col-lg-offset-2 + %h3 + = t('.title') + + = form_for current_user, url: user_path, html: { method: :put } do |f| + = f.error_messages + + = f.fields_for :stream_preferences do |type| + #stream_prefs + = f.label :strip_exif, class: "checkbox" do + = f.check_box :strip_exif + = t('.strip_exif') + + .small-horizontal-spacer + .clearfix + = f.submit t('users.edit.change'), class: 'btn btn-primary pull-right' + + %hr + .small-horizontal-spacer + %h3 + = t('.ignored_users') + + - if @blocks.length.zero? + = t('.no_user_ignored_message') + + - @blocks.each do |block| + = block.person_name + \- + = link_to t('.stop_ignoring'), block_path(block), + method: :delete diff --git a/app/views/users/privacy_settings.html.haml b/app/views/users/privacy_settings.html.haml index cdcd90f26..16db316be 100644 --- a/app/views/users/privacy_settings.html.haml +++ b/app/views/users/privacy_settings.html.haml @@ -6,36 +6,4 @@ = t('.title') .container-fluid - = render 'shared/settings_nav' - - .container-fluid - .col-lg-8.col-lg-offset-2 - %h3 - = t('.title') - - = form_for current_user, url: user_path, html: { method: :put } do |f| - = f.error_messages - - = f.fields_for :stream_preferences do |type| - #stream_prefs - = f.label :strip_exif, class: "checkbox" do - = f.check_box :strip_exif - = t('.strip_exif') - - .small-horizontal-spacer - .clearfix - = f.submit t('users.edit.change'), class: 'btn btn-primary pull-right' - - %hr - .small-horizontal-spacer - %h3 - = t('.ignored_users') - - - if @blocks.length.zero? - = t('.no_user_ignored_message') - - - @blocks.each do |block| - = block.person_name - \- - = link_to t('.stop_ignoring'), block_path(block), - method: :delete + = render "privacy_settings" diff --git a/app/views/users/privacy_settings.mobile.haml b/app/views/users/privacy_settings.mobile.haml index f89abe4e4..8b2822c1a 100644 --- a/app/views/users/privacy_settings.mobile.haml +++ b/app/views/users/privacy_settings.mobile.haml @@ -6,36 +6,4 @@ - content_for :page_title do = t('.title') - = render 'shared/settings_nav' - - .container-fluid - .col-lg-8.col-lg-offset-2 - %h3 - = t('.title') - - = form_for current_user, url: user_path, html: { method: :put } do |f| - = f.error_messages - - = f.fields_for :stream_preferences do |type| - #stream_prefs - = f.label :strip_exif, class: "checkbox" do - = f.check_box :strip_exif - = t('.strip_exif') - - .small-horizontal-spacer - .clearfix - = f.submit t('users.edit.change'), class: 'btn btn-primary pull-right' - - %hr - .small-horizontal-spacer - %h3 - = t('.ignored_users') - - - if @blocks.length.zero? - = t('.no_user_ignored_message') - - - @blocks.each do |block| - = block.person_name - \- - = link_to t('.stop_ignoring'), block_path(block), - method: :delete + = render "privacy_settings"