Unify settings ui

This commit is contained in:
Steffen van Bergerem 2016-02-06 13:53:42 +01:00
parent 03ef5bd064
commit ada0ad6eb5
10 changed files with 102 additions and 94 deletions

View file

@ -3,10 +3,9 @@
.container-fluid.applications-page .container-fluid.applications-page
.row .row
.col-md-12 .col-md-3
= render "shared/settings_nav" = render "shared/settings_nav"
.row .col-md-9
.col-md-12
%h3= t(".title") %h3= t(".title")
.row .row
.col-md-12 .col-md-12

View file

@ -4,11 +4,9 @@
.container-fluid .container-fluid
.row .row
.col-md-12 .col-md-3
= render "shared/settings_nav" = render "shared/settings_nav"
.col-md-9
.row
.col-md-12
- content_for :submit_block do - content_for :submit_block do
= link_to t("cancel"), local_or_remote_person_path(current_user.person), class: "btn btn-default" = link_to t("cancel"), local_or_remote_person_path(current_user.person), class: "btn btn-default"
= submit_tag t(".update_profile"), class: "btn btn-primary pull-right", id: "update_profile" = submit_tag t(".update_profile"), class: "btn btn-primary pull-right", id: "update_profile"

View file

@ -7,16 +7,15 @@
.container-fluid .container-fluid
.row .row
.col-md-12 .col-md-3
= render "shared/settings_nav" = render "shared/settings_nav"
.col-md-9
.row
.col-md-12
%h3= t(".title") %h3= t(".title")
.row .row
.col-md-7 .col-md-12
= render "add_remove_services" = render "add_remove_services"
.col-md-5 .row
.col-md-12
%p %p
= t(".services_explanation") = t(".services_explanation")

View file

@ -1,10 +1,14 @@
#section_header #section_header
%h2 %h2
= t("settings") = t("settings")
%ul.nav.nav-tabs#settings_nav .list-group#settings_nav
%li{class: current_page?(edit_profile_path) && "active"}= link_to t("profile"), edit_profile_path = link_to t("profile"), edit_profile_path,
%li{class: current_page?(edit_user_path) && "active"}= link_to t("account"), edit_user_path class: current_page?(edit_profile_path) ? "list-group-item active" : "list-group-item"
%li{class: current_page?(privacy_settings_path) && "active"}= link_to t("privacy"), privacy_settings_path = link_to t("account"), edit_user_path,
%li{class: current_page?(services_path) && "active"}= link_to t("_services"), services_path class: current_page?(edit_user_path) ? "list-group-item active" : "list-group-item"
%li{class: current_page?(api_openid_connect_user_applications_path) && "active"} = link_to t("privacy"), privacy_settings_path,
= link_to t("_applications"), api_openid_connect_user_applications_path class: current_page?(privacy_settings_path) ? "list-group-item active" : "list-group-item"
= link_to t("_services"), services_path,
class: current_page?(services_path) ? "list-group-item active" : "list-group-item"
= link_to t("_applications"), api_openid_connect_user_applications_path,
class: current_page?(api_openid_connect_user_applications_path) ? "list-group-item active" : "list-group-item"

View file

@ -5,10 +5,6 @@
- content_for :page_title do - content_for :page_title do
= t(".edit_account") = t(".edit_account")
.row
.col-md-12
= render "shared/settings_nav"
.row .row
.col-md-12 .col-md-12
.row .row
@ -173,42 +169,40 @@
%hr %hr
.row .row
.col-md-12#account_data .col-md-6#account_data
.row
.col-md-6
%h3= t(".export_data") %h3= t(".export_data")
.form-group .form-group
- if current_user.exporting - if current_user.exporting
.export-in-progress= t(".export_in_progress") .export-in-progress= t(".export_in_progress")
- elsif current_user.export.present? - elsif current_user.export.present?
= link_to t(".request_export_update"), export_profile_user_path, method: :post, = link_to t(".request_export_update"), export_profile_user_path, method: :post,
class: "btn btn-default btn-block" class: "btn btn-default"
.small-horizontal-spacer .small-horizontal-spacer
= link_to t(".download_export"), download_profile_user_path, = link_to t(".download_export"), download_profile_user_path,
class: "btn btn-success btn-block" class: "btn btn-success"
.small-horizontal-spacer .small-horizontal-spacer
%h6 %h6
= t(".last_exported_at", timestamp: current_user.exported_at) = t(".last_exported_at", timestamp: current_user.exported_at)
- else - else
= link_to t(".request_export"), export_profile_user_path, method: :post, = link_to t(".request_export"), export_profile_user_path, method: :post,
class: "btn btn-default btn-block" class: "btn btn-default"
.form-group .form-group
- if current_user.exporting_photos - if current_user.exporting_photos
.export-in-progress= t(".export_photos_in_progress") .export-in-progress= t(".export_photos_in_progress")
- elsif current_user.exported_photos_file.present? - elsif current_user.exported_photos_file.present?
= link_to t(".request_export_photos_update"), export_photos_user_path, method: :post, = link_to t(".request_export_photos_update"), export_photos_user_path, method: :post,
class: "btn btn-default btn-block" class: "btn btn-default"
.small-horizontal-spacer .small-horizontal-spacer
= link_to t(".download_export_photos"), download_photos_user_path, class: "btn btn-success btn-block" = link_to t(".download_export_photos"), download_photos_user_path, class: "btn btn-success"
.small-horizontal-spacer .small-horizontal-spacer
%h6 %h6
= t(".last_exported_at", timestamp: current_user.exported_photos_at) = t(".last_exported_at", timestamp: current_user.exported_photos_at)
- else - else
= link_to t(".request_export_photos"), export_photos_user_path, method: :post, = link_to t(".request_export_photos"), export_photos_user_path, method: :post,
class: "btn btn-default btn-block" class: "btn btn-default"
.col-md-12 .col-md-6
%h3 %h3
= t(".close_account_text") = t(".close_account_text")
.form-group .form-group

View file

@ -1,9 +1,3 @@
.row
.col-md-12
= render "shared/settings_nav"
.row
.col-md-12
.row .row
.col-md-12 .col-md-12
%h3 %h3

View file

@ -1,2 +1,6 @@
.container-fluid .container-fluid
.row
.col-md-3
= render "shared/settings_nav"
.col-md-9
= render "edit" = render "edit"

View file

@ -1,2 +1,8 @@
.settings_container.container-fluid .settings_container.container-fluid
.row
.col-md-12
= render "shared/settings_nav"
.row
.col-md-12
= render "edit" = render "edit"

View file

@ -6,4 +6,8 @@
= t('.title') = t('.title')
.container-fluid .container-fluid
.row
.col-md-3
= render "shared/settings_nav"
.col-md-9
= render "privacy_settings" = render "privacy_settings"

View file

@ -6,4 +6,10 @@
= t(".title") = t(".title")
.settings_container.container-fluid .settings_container.container-fluid
.row
.col-md-12
= render "shared/settings_nav"
.row
.col-md-12
= render "privacy_settings" = render "privacy_settings"