mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-21 03:07:47 +01:00
Clean up user setting layouts
This commit is contained in:
parent
ea77168b50
commit
c870b00f65
23 changed files with 446 additions and 478 deletions
app/views
devise/registrations
layouts/user
services
settings
tabs
user
|
@ -1,27 +1,4 @@
|
||||||
- case resource_name
|
= render "settings/account"
|
||||||
- when :user
|
|
||||||
= render 'user/account'
|
|
||||||
- else
|
|
||||||
.container
|
|
||||||
%h1 Edit #{resource_name.to_s.humanize}
|
|
||||||
= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
|
||||||
= devise_error_messages!
|
|
||||||
|
|
||||||
= f.text_field :screen_name, autofocus: true, label: "User name"
|
- provide(:title, generate_title("Account Settings"))
|
||||||
|
- parent_layout "user/settings"
|
||||||
= f.email_field :email, label: "Email address"
|
|
||||||
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
|
||||||
%div
|
|
||||||
Currently waiting confirmation for: #{resource.unconfirmed_email}
|
|
||||||
|
|
||||||
= f.password_field :password, autocomplete: "off", label: "Password", help: "Leave this blank if you don't want to change it"
|
|
||||||
= f.password_field :password_confirmation, autocomplete: "off", label: "Confirm password"
|
|
||||||
|
|
||||||
= f.password_field :current_password, autocomplete: "off", label: "Current password", help: "We need your current password to confirm your changes"
|
|
||||||
|
|
||||||
= f.submit "Update"
|
|
||||||
%p
|
|
||||||
=button_to "Delete my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger btn-sm"
|
|
||||||
|
|
||||||
= link_to "Back", :back
|
|
||||||
= render 'shared/links'
|
|
||||||
|
|
7
app/views/layouts/user/settings.haml
Normal file
7
app/views/layouts/user/settings.haml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
.container.j2-page
|
||||||
|
.row
|
||||||
|
.col-md-3.col-xs-12.col-sm-4
|
||||||
|
= render 'tabs/settings'
|
||||||
|
.col-md-9.col-xs-12.col-sm-8
|
||||||
|
= render 'layouts/messages'
|
||||||
|
= yield
|
4
app/views/services/index.haml
Normal file
4
app/views/services/index.haml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
= render "settings/services"
|
||||||
|
|
||||||
|
- provide(:title, generate_title("Service Settings"))
|
||||||
|
- parent_layout "user/settings"
|
|
@ -1,25 +0,0 @@
|
||||||
- provide(:title, generate_title("Service Settings"))
|
|
||||||
.container.j2-page
|
|
||||||
.row
|
|
||||||
= render 'user/settings_tabs'
|
|
||||||
.col-md-9.col-xs-12.col-sm-8
|
|
||||||
= render 'layouts/messages'
|
|
||||||
.card
|
|
||||||
.card-body
|
|
||||||
- if @services.count > 0
|
|
||||||
= t 'views.settings.service.enabled'
|
|
||||||
- else
|
|
||||||
= t 'views.settings.service.none'
|
|
||||||
|
|
||||||
- APP_CONFIG['sharing'].each do |service, service_options|
|
|
||||||
- if service_options['enabled'] and !@services.any? { |x| x.provider == service.to_s }
|
|
||||||
%p=link_to t('views.settings.service.connect', service: service.capitalize), "/auth/#{service}"
|
|
||||||
|
|
||||||
- if @services.count > 0
|
|
||||||
%ul.list-group
|
|
||||||
- @services.each do |service|
|
|
||||||
%li.list-group-item
|
|
||||||
%i{class: "fa fa-#{service.provider}"}
|
|
||||||
%strong= service.provider.capitalize
|
|
||||||
(#{service.nickname})
|
|
||||||
= link_to t('views.settings.service.disconnect'), service_path(service), data: { confirm: t('views.settings.service.confirm', service: service.provider.capitalize) }, method: :delete
|
|
29
app/views/settings/_account.haml
Normal file
29
app/views/settings/_account.haml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
.card
|
||||||
|
.card-body
|
||||||
|
= bootstrap_form_for(resource, as: resource_name, url: '/settings/account', html: { method: :put }) do |f|
|
||||||
|
= render 'modal/password', f: f
|
||||||
|
|
||||||
|
= devise_error_messages!
|
||||||
|
|
||||||
|
= f.text_field :screen_name, autofocus: true, label: t('views.settings.account.username')
|
||||||
|
|
||||||
|
= f.email_field :email, label: t('views.settings.account.email')
|
||||||
|
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
||||||
|
%div= raw t('views.settings.account.email_confirm', resource: resource.unconfirmed_email)
|
||||||
|
|
||||||
|
= f.password_field :password, autocomplete: "off", label: t('views.settings.account.password'), help: t('views.settings.account.password_help')
|
||||||
|
= f.password_field :password_confirmation, autocomplete: "off", label: t('views.settings.account.password_confirm')
|
||||||
|
|
||||||
|
%button.btn.btn-primary{"data-target" => "#modal-passwd", "data-toggle" => "modal", :type => "button"}
|
||||||
|
= t 'views.actions.save'
|
||||||
|
|
||||||
|
%hr/
|
||||||
|
%p
|
||||||
|
= t 'views.settings.account.unsatisfied'
|
||||||
|
=button_to t('views.settings.account.delete'), '/settings/account', data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger btn-xs"
|
||||||
|
|
||||||
|
= link_to t('views.settings.account.back'), :back
|
||||||
|
|
||||||
|
.visible-xs= render "shared/links"
|
||||||
|
|
||||||
|
|
189
app/views/settings/_data.haml
Normal file
189
app/views/settings/_data.haml
Normal file
|
@ -0,0 +1,189 @@
|
||||||
|
.card
|
||||||
|
.card-body
|
||||||
|
%h2 Your Profile Data
|
||||||
|
%p Everything we have about you! Really, not that much as you might expect.
|
||||||
|
|
||||||
|
%h3 General
|
||||||
|
.row
|
||||||
|
.col-md-6.col-sm-6.col-xs-12
|
||||||
|
%h4 Profile
|
||||||
|
|
||||||
|
%p.data-heading User name
|
||||||
|
%p.text-muted= current_user.screen_name
|
||||||
|
|
||||||
|
%p.data-heading Display name
|
||||||
|
%p.text-muted
|
||||||
|
- if current_user.display_name.blank?
|
||||||
|
None set!
|
||||||
|
- else
|
||||||
|
= current_user.display_name
|
||||||
|
|
||||||
|
%p.data-heading Bio
|
||||||
|
%p.text-muted
|
||||||
|
- if current_user.bio.blank?
|
||||||
|
None set!
|
||||||
|
- else
|
||||||
|
= current_user.bio
|
||||||
|
|
||||||
|
%p.data-heading Location
|
||||||
|
%p.text-muted
|
||||||
|
- if current_user.location.blank?
|
||||||
|
None set!
|
||||||
|
- else
|
||||||
|
= current_user.location
|
||||||
|
|
||||||
|
%p.data-heading Website
|
||||||
|
%p.text-muted
|
||||||
|
- if current_user.website.blank?
|
||||||
|
None set!
|
||||||
|
- else
|
||||||
|
= current_user.website
|
||||||
|
.col-md-6.col-sm-6.col-xs-12
|
||||||
|
%h4 Pictures
|
||||||
|
%p.data-heading Profile picture
|
||||||
|
.media
|
||||||
|
.pull-left
|
||||||
|
%img.profile--img{src: current_user.profile_picture.url(:medium)}
|
||||||
|
.media-body
|
||||||
|
%ul
|
||||||
|
%li
|
||||||
|
%a{href: current_user.profile_picture.url(:small)} Small
|
||||||
|
%li
|
||||||
|
%a{href: current_user.profile_picture.url(:medium)} Medium
|
||||||
|
%li
|
||||||
|
%a{href: current_user.profile_picture.url(:large)} Large
|
||||||
|
%li
|
||||||
|
%a{href: current_user.profile_picture.url(:original)} Original image
|
||||||
|
|
||||||
|
%p.data-heading Header picture
|
||||||
|
%img.data-header-preview{src: current_user.profile_header.url(:mobile)}
|
||||||
|
%p
|
||||||
|
%a{href: current_user.profile_header.url(:mobile)} Mobile
|
||||||
|
|
|
||||||
|
%a{href: current_user.profile_header.url(:web)} Web
|
||||||
|
|
|
||||||
|
%a{href: current_user.profile_header.url(:retina)} Retina
|
||||||
|
|
|
||||||
|
%a{href: current_user.profile_header.url(:original)} Original image
|
||||||
|
.row
|
||||||
|
.col-md-6.col-sm-6.col-xs-12
|
||||||
|
%h4 Statistics
|
||||||
|
|
||||||
|
%p.data-heading Answers
|
||||||
|
%p.text-muted= current_user.answered_count
|
||||||
|
|
||||||
|
%p.data-heading Questions
|
||||||
|
%p.text-muted= current_user.asked_count
|
||||||
|
|
||||||
|
%p.data-heading Following
|
||||||
|
%p.text-muted= current_user.friend_count
|
||||||
|
|
||||||
|
%p.data-heading Followers
|
||||||
|
%p.text-muted= current_user.follower_count
|
||||||
|
|
||||||
|
%p.data-heading Smiles
|
||||||
|
%p.text-muted= current_user.smiled_count + current_user.comment_smiled_count
|
||||||
|
|
||||||
|
%p.data-heading Comments
|
||||||
|
%p.text-muted= current_user.commented_count
|
||||||
|
.col-md-6.col-sm-6.col-xs-12
|
||||||
|
%h4 Badges
|
||||||
|
|
||||||
|
%p.data-heading Admin
|
||||||
|
%p
|
||||||
|
- if current_user.admin?
|
||||||
|
%span.label.label-success
|
||||||
|
%i.fa.fa-fw.fa-check
|
||||||
|
- else
|
||||||
|
%span.label.label-danger
|
||||||
|
%i.fa.fa-fw.fa-close
|
||||||
|
|
||||||
|
%p.data-heading Moderator
|
||||||
|
%p
|
||||||
|
- if current_user.mod?
|
||||||
|
%span.label.label-success
|
||||||
|
%i.fa.fa-fw.fa-check
|
||||||
|
- else
|
||||||
|
%span.label.label-danger
|
||||||
|
%i.fa.fa-fw.fa-close
|
||||||
|
|
||||||
|
%p.data-heading Supporter
|
||||||
|
%p
|
||||||
|
- if current_user.supporter?
|
||||||
|
%span.label.label-success
|
||||||
|
%i.fa.fa-fw.fa-check
|
||||||
|
- else
|
||||||
|
%span.label.label-danger
|
||||||
|
%i.fa.fa-fw.fa-close
|
||||||
|
|
||||||
|
%p.data-heading Contributor
|
||||||
|
%p
|
||||||
|
- if current_user.contributor?
|
||||||
|
%span.label.label-success
|
||||||
|
%i.fa.fa-fw.fa-check
|
||||||
|
- else
|
||||||
|
%span.label.label-danger
|
||||||
|
%i.fa.fa-fw.fa-close
|
||||||
|
|
||||||
|
%p.data-heading Blogger
|
||||||
|
%p
|
||||||
|
- if current_user.blogger?
|
||||||
|
%span.label.label-success
|
||||||
|
%i.fa.fa-fw.fa-check
|
||||||
|
- else
|
||||||
|
%span.label.label-danger
|
||||||
|
%i.fa.fa-fw.fa-close
|
||||||
|
|
||||||
|
%p.data-heading Translator
|
||||||
|
%p
|
||||||
|
- if current_user.translator?
|
||||||
|
%span.label.label-success
|
||||||
|
%i.fa.fa-fw.fa-check
|
||||||
|
- else
|
||||||
|
%span.label.label-danger
|
||||||
|
%i.fa.fa-fw.fa-close
|
||||||
|
.row
|
||||||
|
.col-md-6.col-sm-6.col-xs-12
|
||||||
|
%h3 IP
|
||||||
|
%p.data-heading Current Sign In
|
||||||
|
%p.text-muted= current_user.current_sign_in_ip
|
||||||
|
|
||||||
|
%p.data-heading Last Sign In
|
||||||
|
%p.text-muted= current_user.last_sign_in_ip
|
||||||
|
.col-md-6.col-sm-6.col-xs-12
|
||||||
|
%h3 Miscellaneous
|
||||||
|
|
||||||
|
%p.data-heading Locale
|
||||||
|
%p.text-muted
|
||||||
|
- if current_user.locale.blank?
|
||||||
|
None set!
|
||||||
|
- else
|
||||||
|
= current_user.locale
|
||||||
|
|
||||||
|
%p.data-heading Sign In count
|
||||||
|
%p.text-muted= current_user.sign_in_count
|
||||||
|
%h3 Dates
|
||||||
|
.row
|
||||||
|
.col-md-6.col-sm-6.col-xs-12
|
||||||
|
%h4 Sign In
|
||||||
|
|
||||||
|
%p.data-heading Current Sign In
|
||||||
|
%p.text-muted= localize(current_user.current_sign_in_at)
|
||||||
|
|
||||||
|
%p.data-heading Last Sign In
|
||||||
|
%p.text-muted= localize(current_user.last_sign_in_at)
|
||||||
|
|
||||||
|
%p.data-heading Remember me set at
|
||||||
|
%p.text-muted= localize(current_user.remember_created_at)
|
||||||
|
.col-md-6.col-sm-6.col-xs-12
|
||||||
|
%h4 Create/Update
|
||||||
|
|
||||||
|
%p.data-heading Account created
|
||||||
|
%p.text-muted
|
||||||
|
= localize(current_user.created_at)
|
||||||
|
= " (#{time_ago_in_words(current_user.created_at)} ago)"
|
||||||
|
|
||||||
|
%p.data-heading Account last updated
|
||||||
|
%p.text-muted
|
||||||
|
= localize(current_user.updated_at)
|
||||||
|
= " (#{time_ago_in_words(current_user.updated_at)} ago)"
|
32
app/views/settings/_export.haml
Normal file
32
app/views/settings/_export.haml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
.card
|
||||||
|
.card-body
|
||||||
|
%h2 Export your data
|
||||||
|
%p
|
||||||
|
With the announcement of
|
||||||
|
= succeed ',' do
|
||||||
|
%a{href: 'http://blog.retrospring.net/saying-goodbye/'} shutting down Retrospring on June 8 2016
|
||||||
|
we promised you one last feature: exporting all your data. The data is inside a
|
||||||
|
%code= ".tar.gz"
|
||||||
|
archive and available in three formats: YAML, JSON, and XML. The archive also contains a copy of your
|
||||||
|
profile picture and header picture in all sizes.
|
||||||
|
%p
|
||||||
|
Please note that you can only export your data once a week. Exporting your data
|
||||||
|
will take a while, so please be patient. You will receive a question once exporting
|
||||||
|
is done.
|
||||||
|
- if current_user.can_export?
|
||||||
|
%form{action: begin_user_export_path, method: 'POST'}
|
||||||
|
%p.centre
|
||||||
|
%button#export-btn.btn.btn-lg.btn-primary{type: :submit} Export
|
||||||
|
= hidden_field_tag :authenticity_token, form_authenticity_token
|
||||||
|
- else
|
||||||
|
%p.centre
|
||||||
|
%button.btn.btn-lg.btn-primary.disabled{disabled: :disabled} Export
|
||||||
|
%p
|
||||||
|
- if current_user.export_url.nil?
|
||||||
|
Once exporting your account is done, a download link will appear here.
|
||||||
|
- else
|
||||||
|
Here is your export from
|
||||||
|
= succeed ':' do
|
||||||
|
= current_user.export_created_at
|
||||||
|
%a{href: current_user.export_url}
|
||||||
|
= File.basename current_user.export_url
|
9
app/views/settings/_privacy.haml
Normal file
9
app/views/settings/_privacy.haml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
.card
|
||||||
|
.card-body
|
||||||
|
= bootstrap_form_for(current_user, url: {action: "edit_privacy"}, method: "patch") do |f|
|
||||||
|
|
||||||
|
= f.check_box :privacy_allow_anonymous_questions, label: t('views.settings.privacy.anonymous')
|
||||||
|
= f.check_box :privacy_allow_public_timeline, label: t('views.settings.privacy.public')
|
||||||
|
= f.check_box :privacy_allow_stranger_answers, label: t('views.settings.privacy.stranger')
|
||||||
|
|
||||||
|
= f.submit t('views.actions.save'), class: 'btn btn-primary'
|
57
app/views/settings/_profile.haml
Normal file
57
app/views/settings/_profile.haml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
.card
|
||||||
|
.card-body
|
||||||
|
= bootstrap_form_for(current_user, url: {action: "edit"}, :html => { :multipart => true }, method: "patch") do |f|
|
||||||
|
|
||||||
|
= f.text_field :display_name, label: t('views.settings.profile.displayname')
|
||||||
|
|
||||||
|
.media#profile-picture-media
|
||||||
|
.pull-left
|
||||||
|
%img.img-rounded.profile--img{src: current_user.profile_picture.url(:medium)}
|
||||||
|
.media-body
|
||||||
|
= f.file_field :profile_picture, label: t('views.settings.profile.avatar')
|
||||||
|
|
||||||
|
.row#profile-picture-crop-controls{style: 'display: none;'}
|
||||||
|
.col-sm-10.col-md-8
|
||||||
|
%strong= t('views.settings.profile.avatar_adjust')
|
||||||
|
%img#profile-picture-cropper{src: current_user.profile_picture.url(:medium)}
|
||||||
|
.col-sm-2.col-md-4
|
||||||
|
.btn-group
|
||||||
|
%button#cropper-zoom-out.btn.btn-inverse{type: :button}
|
||||||
|
%i.fa.fa-search-minus
|
||||||
|
%button#cropper-zoom-in.btn.btn-inverse{type: :button}
|
||||||
|
%i.fa.fa-search-plus
|
||||||
|
|
||||||
|
.media#profile-header-media
|
||||||
|
.pull-left
|
||||||
|
%img.img-rounded.header--img{src: current_user.profile_header.url(:mobile)}
|
||||||
|
.media-body
|
||||||
|
= f.file_field :profile_header, label: t('views.settings.profile.header')
|
||||||
|
|
||||||
|
.row#profile-header-crop-controls{style: 'display: none;'}
|
||||||
|
.col-sm-10.col-md-8
|
||||||
|
%strong= t('views.settings.profile.header_adjust')
|
||||||
|
%img#profile-header-cropper{src: current_user.profile_header.url(:web)}
|
||||||
|
.col-sm-2.col-md-4
|
||||||
|
.btn-group
|
||||||
|
%button#cropper-header-zoom-out.btn.btn-inverse{type: :button}
|
||||||
|
%i.fa.fa-search-minus
|
||||||
|
%button#cropper-header-zoom-in.btn.btn-inverse{type: :button}
|
||||||
|
%i.fa.fa-search-plus
|
||||||
|
|
||||||
|
= f.text_field :motivation_header, label: t('views.settings.profile.motivation'), placeholder: t('views.settings.profile.placeholder.motivation')
|
||||||
|
|
||||||
|
= f.text_field :website, label: t('views.settings.profile.website'), placeholder: 'http://example.com'
|
||||||
|
|
||||||
|
= f.text_field :location, label: t('views.settings.profile.location'), placeholder: t('views.settings.profile.placeholder.location')
|
||||||
|
|
||||||
|
= f.text_area :bio, label: t('views.settings.profile.bio'), placeholder: t('views.settings.profile.placeholder.bio')
|
||||||
|
|
||||||
|
= f.check_box :show_foreign_themes, label: 'Render other user themes when visiting their profile'
|
||||||
|
|
||||||
|
- for attrib in %i(crop_x crop_y crop_w crop_h)
|
||||||
|
= f.hidden_field attrib, id: attrib
|
||||||
|
|
||||||
|
- for attrib in %i(crop_h_x crop_h_y crop_h_w crop_h_h)
|
||||||
|
= f.hidden_field attrib, id: attrib
|
||||||
|
|
||||||
|
= f.submit t('views.actions.save'), class: 'btn btn-primary'
|
19
app/views/settings/_services.haml
Normal file
19
app/views/settings/_services.haml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
.card
|
||||||
|
.card-body
|
||||||
|
- if @services.count > 0
|
||||||
|
= t 'views.settings.service.enabled'
|
||||||
|
- else
|
||||||
|
= t 'views.settings.service.none'
|
||||||
|
|
||||||
|
- APP_CONFIG['sharing'].each do |service, service_options|
|
||||||
|
- if service_options['enabled'] and !@services.any? { |x| x.provider == service.to_s }
|
||||||
|
%p=link_to t('views.settings.service.connect', service: service.capitalize), "/auth/#{service}"
|
||||||
|
|
||||||
|
- if @services.count > 0
|
||||||
|
%ul.list-group
|
||||||
|
- @services.each do |service|
|
||||||
|
%li.list-group-item
|
||||||
|
%i{class: "fa fa-#{service.provider}"}
|
||||||
|
%strong= service.provider.capitalize
|
||||||
|
(#{service.nickname})
|
||||||
|
= link_to t('views.settings.service.disconnect'), service_path(service), data: { confirm: t('views.settings.service.confirm', service: service.provider.capitalize) }, method: :delete
|
67
app/views/settings/_theme.haml
Normal file
67
app/views/settings/_theme.haml
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
.card
|
||||||
|
.card-body
|
||||||
|
%b Presets:
|
||||||
|
%a{href: '#', class: 'theme_preset', data: {preset: 'rs'}} Retrospring Purple,
|
||||||
|
%a{href: '#', class: 'theme_preset', data: {preset: 'dc'}} Dark Copycat,
|
||||||
|
%a{href: '#', class: 'theme_preset', data: {preset: 'lc'}} Light Copycat
|
||||||
|
= bootstrap_form_for(current_user.theme || Theme.new, url: {action: "update_theme"}, html: {id: 'update_theme'}, method: "patch") do |f|
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :primary_color, class: 'color', data: {default: 0x5E35B1}
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :primary_text, class: 'color', data: {default: 0xFFFFFF}
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :danger_color, class: 'color', data: {default: 0xFF0039}
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :danger_text, class: 'color', data: {default: 0xFFFFFF}
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :success_color, class: 'color', data: {default: 0x3FB618}
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :success_text, class: 'color', data: {default: 0xFFFFFF}
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :warning_color, class: 'color', data: {default: 0xFF7518}
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :warning_text, class: 'color', data: {default: 0xFFFFFF}
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :info_color, class: 'color', data: {default: 0x9954BB}
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :info_text, class: 'color', data: {default: 0xFFFFFF}
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :default_color, class: 'color', data: {default: 0x222222}
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :default_text, class: 'color', data: {default: 0xEEEEEE}
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :panel_color, class: 'color', data: {default: 0xF9F9F9}
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :panel_text, class: 'color', data: {default: 0x151515}
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :link_color, class: 'color', data: {default: 0x5E35B1}
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :background_color, class: 'color', data: {default: 0xFFFFFF}
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :background_text, class: 'color', data: {default: 0x222222}
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :background_muted, class: 'color', data: {default: 0xBBBBBB}
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :input_color, class: 'color', data: {default: 0xFFFFFF}
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :input_text, class: 'color', data: {default: 0x000000}
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= f.text_field :outline_color, class: 'color', data: {default: 0x5E35B1}
|
||||||
|
.col-md-6
|
||||||
|
|
||||||
|
.pull-left
|
||||||
|
= f.submit t('views.actions.save'), class: 'btn btn-primary'
|
||||||
|
|
||||||
|
.pull-right
|
||||||
|
=button_to 'Delete Theme', delete_user_theme_path, data: { confirm: "Are you sure?" }, tabindex: -1, method: :delete, class: "btn btn-danger"
|
11
app/views/tabs/_settings.haml
Normal file
11
app/views/tabs/_settings.haml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
.card
|
||||||
|
.list-group
|
||||||
|
= list_group_item t('views.settings.tabs.account'), edit_user_registration_path
|
||||||
|
= list_group_item t('views.settings.tabs.profile'), edit_user_profile_path
|
||||||
|
= list_group_item t('views.settings.tabs.privacy'), edit_user_privacy_path
|
||||||
|
= list_group_item t('views.settings.tabs.sharing'), services_path
|
||||||
|
= list_group_item 'Theme', edit_user_theme_path
|
||||||
|
= list_group_item "Your Data", user_data_path
|
||||||
|
= list_group_item 'Export', user_export_path
|
||||||
|
|
||||||
|
.hidden-xs= render "shared/links"
|
|
@ -1,33 +0,0 @@
|
||||||
- provide(:title, generate_title("Account Settings"))
|
|
||||||
.container.j2-page
|
|
||||||
.row
|
|
||||||
= render 'user/settings_tabs'
|
|
||||||
.col-md-9.col-xs-12.col-sm-8
|
|
||||||
= render 'layouts/messages'
|
|
||||||
.card
|
|
||||||
.card-body
|
|
||||||
= bootstrap_form_for(resource, as: resource_name, url: '/settings/account', html: { method: :put }) do |f|
|
|
||||||
= render 'modal/password', f: f
|
|
||||||
|
|
||||||
= devise_error_messages!
|
|
||||||
|
|
||||||
= f.text_field :screen_name, autofocus: true, label: t('views.settings.account.username')
|
|
||||||
|
|
||||||
= f.email_field :email, label: t('views.settings.account.email')
|
|
||||||
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
|
||||||
%div= raw t('views.settings.account.email_confirm', resource: resource.unconfirmed_email)
|
|
||||||
|
|
||||||
= f.password_field :password, autocomplete: "off", label: t('views.settings.account.password'), help: t('views.settings.account.password_help')
|
|
||||||
= f.password_field :password_confirmation, autocomplete: "off", label: t('views.settings.account.password_confirm')
|
|
||||||
|
|
||||||
%button.btn.btn-primary{"data-target" => "#modal-passwd", "data-toggle" => "modal", :type => "button"}
|
|
||||||
= t 'views.actions.save'
|
|
||||||
|
|
||||||
%hr/
|
|
||||||
%p
|
|
||||||
= t 'views.settings.account.unsatisfied'
|
|
||||||
=button_to t('views.settings.account.delete'), '/settings/account', data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger btn-xs"
|
|
||||||
|
|
||||||
= link_to t('views.settings.account.back'), :back
|
|
||||||
|
|
||||||
.visible-xs= render "shared/links"
|
|
|
@ -1,12 +0,0 @@
|
||||||
.col-md-3.col-xs-12.col-sm-4
|
|
||||||
.card
|
|
||||||
.list-group
|
|
||||||
= list_group_item t('views.settings.tabs.account'), edit_user_registration_path
|
|
||||||
= list_group_item t('views.settings.tabs.profile'), edit_user_profile_path
|
|
||||||
= list_group_item t('views.settings.tabs.privacy'), edit_user_privacy_path
|
|
||||||
= list_group_item t('views.settings.tabs.sharing'), services_path
|
|
||||||
= list_group_item 'Theme', edit_user_theme_path
|
|
||||||
= list_group_item "Your Data", user_data_path
|
|
||||||
= list_group_item 'Export', user_export_path
|
|
||||||
|
|
||||||
.hidden-xs= render "shared/links"
|
|
4
app/views/user/data.haml
Normal file
4
app/views/user/data.haml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
= render "settings/data"
|
||||||
|
|
||||||
|
- provide(:title, generate_title("Your Data"))
|
||||||
|
- parent_layout "user/settings"
|
|
@ -1,194 +0,0 @@
|
||||||
- provide(:title, generate_title("Your Data"))
|
|
||||||
.container.j2-page
|
|
||||||
.row
|
|
||||||
= render 'settings_tabs'
|
|
||||||
.col-md-9.col-xs-12.col-sm-8
|
|
||||||
.card
|
|
||||||
.card-body
|
|
||||||
%h2 Your Profile Data
|
|
||||||
%p Everything we have about you! Really, not that much as you might expect.
|
|
||||||
|
|
||||||
%h3 General
|
|
||||||
.row
|
|
||||||
.col-md-6.col-sm-6.col-xs-12
|
|
||||||
%h4 Profile
|
|
||||||
|
|
||||||
%p.data-heading User name
|
|
||||||
%p.text-muted= current_user.screen_name
|
|
||||||
|
|
||||||
%p.data-heading Display name
|
|
||||||
%p.text-muted
|
|
||||||
- if current_user.display_name.blank?
|
|
||||||
None set!
|
|
||||||
- else
|
|
||||||
= current_user.display_name
|
|
||||||
|
|
||||||
%p.data-heading Bio
|
|
||||||
%p.text-muted
|
|
||||||
- if current_user.bio.blank?
|
|
||||||
None set!
|
|
||||||
- else
|
|
||||||
= current_user.bio
|
|
||||||
|
|
||||||
%p.data-heading Location
|
|
||||||
%p.text-muted
|
|
||||||
- if current_user.location.blank?
|
|
||||||
None set!
|
|
||||||
- else
|
|
||||||
= current_user.location
|
|
||||||
|
|
||||||
%p.data-heading Website
|
|
||||||
%p.text-muted
|
|
||||||
- if current_user.website.blank?
|
|
||||||
None set!
|
|
||||||
- else
|
|
||||||
= current_user.website
|
|
||||||
.col-md-6.col-sm-6.col-xs-12
|
|
||||||
%h4 Pictures
|
|
||||||
%p.data-heading Profile picture
|
|
||||||
.media
|
|
||||||
.pull-left
|
|
||||||
%img.profile--img{src: current_user.profile_picture.url(:medium)}
|
|
||||||
.media-body
|
|
||||||
%ul
|
|
||||||
%li
|
|
||||||
%a{href: current_user.profile_picture.url(:small)} Small
|
|
||||||
%li
|
|
||||||
%a{href: current_user.profile_picture.url(:medium)} Medium
|
|
||||||
%li
|
|
||||||
%a{href: current_user.profile_picture.url(:large)} Large
|
|
||||||
%li
|
|
||||||
%a{href: current_user.profile_picture.url(:original)} Original image
|
|
||||||
|
|
||||||
%p.data-heading Header picture
|
|
||||||
%img.data-header-preview{src: current_user.profile_header.url(:mobile)}
|
|
||||||
%p
|
|
||||||
%a{href: current_user.profile_header.url(:mobile)} Mobile
|
|
||||||
|
|
|
||||||
%a{href: current_user.profile_header.url(:web)} Web
|
|
||||||
|
|
|
||||||
%a{href: current_user.profile_header.url(:retina)} Retina
|
|
||||||
|
|
|
||||||
%a{href: current_user.profile_header.url(:original)} Original image
|
|
||||||
.row
|
|
||||||
.col-md-6.col-sm-6.col-xs-12
|
|
||||||
%h4 Statistics
|
|
||||||
|
|
||||||
%p.data-heading Answers
|
|
||||||
%p.text-muted= current_user.answered_count
|
|
||||||
|
|
||||||
%p.data-heading Questions
|
|
||||||
%p.text-muted= current_user.asked_count
|
|
||||||
|
|
||||||
%p.data-heading Following
|
|
||||||
%p.text-muted= current_user.friend_count
|
|
||||||
|
|
||||||
%p.data-heading Followers
|
|
||||||
%p.text-muted= current_user.follower_count
|
|
||||||
|
|
||||||
%p.data-heading Smiles
|
|
||||||
%p.text-muted= current_user.smiled_count + current_user.comment_smiled_count
|
|
||||||
|
|
||||||
%p.data-heading Comments
|
|
||||||
%p.text-muted= current_user.commented_count
|
|
||||||
.col-md-6.col-sm-6.col-xs-12
|
|
||||||
%h4 Badges
|
|
||||||
|
|
||||||
%p.data-heading Admin
|
|
||||||
%p
|
|
||||||
- if current_user.admin?
|
|
||||||
%span.label.label-success
|
|
||||||
%i.fa.fa-fw.fa-check
|
|
||||||
- else
|
|
||||||
%span.label.label-danger
|
|
||||||
%i.fa.fa-fw.fa-close
|
|
||||||
|
|
||||||
%p.data-heading Moderator
|
|
||||||
%p
|
|
||||||
- if current_user.mod?
|
|
||||||
%span.label.label-success
|
|
||||||
%i.fa.fa-fw.fa-check
|
|
||||||
- else
|
|
||||||
%span.label.label-danger
|
|
||||||
%i.fa.fa-fw.fa-close
|
|
||||||
|
|
||||||
%p.data-heading Supporter
|
|
||||||
%p
|
|
||||||
- if current_user.supporter?
|
|
||||||
%span.label.label-success
|
|
||||||
%i.fa.fa-fw.fa-check
|
|
||||||
- else
|
|
||||||
%span.label.label-danger
|
|
||||||
%i.fa.fa-fw.fa-close
|
|
||||||
|
|
||||||
%p.data-heading Contributor
|
|
||||||
%p
|
|
||||||
- if current_user.contributor?
|
|
||||||
%span.label.label-success
|
|
||||||
%i.fa.fa-fw.fa-check
|
|
||||||
- else
|
|
||||||
%span.label.label-danger
|
|
||||||
%i.fa.fa-fw.fa-close
|
|
||||||
|
|
||||||
%p.data-heading Blogger
|
|
||||||
%p
|
|
||||||
- if current_user.blogger?
|
|
||||||
%span.label.label-success
|
|
||||||
%i.fa.fa-fw.fa-check
|
|
||||||
- else
|
|
||||||
%span.label.label-danger
|
|
||||||
%i.fa.fa-fw.fa-close
|
|
||||||
|
|
||||||
%p.data-heading Translator
|
|
||||||
%p
|
|
||||||
- if current_user.translator?
|
|
||||||
%span.label.label-success
|
|
||||||
%i.fa.fa-fw.fa-check
|
|
||||||
- else
|
|
||||||
%span.label.label-danger
|
|
||||||
%i.fa.fa-fw.fa-close
|
|
||||||
.row
|
|
||||||
.col-md-6.col-sm-6.col-xs-12
|
|
||||||
%h3 IP
|
|
||||||
%p.data-heading Current Sign In
|
|
||||||
%p.text-muted= current_user.current_sign_in_ip
|
|
||||||
|
|
||||||
%p.data-heading Last Sign In
|
|
||||||
%p.text-muted= current_user.last_sign_in_ip
|
|
||||||
.col-md-6.col-sm-6.col-xs-12
|
|
||||||
%h3 Miscellaneous
|
|
||||||
|
|
||||||
%p.data-heading Locale
|
|
||||||
%p.text-muted
|
|
||||||
- if current_user.locale.blank?
|
|
||||||
None set!
|
|
||||||
- else
|
|
||||||
= current_user.locale
|
|
||||||
|
|
||||||
%p.data-heading Sign In count
|
|
||||||
%p.text-muted= current_user.sign_in_count
|
|
||||||
%h3 Dates
|
|
||||||
.row
|
|
||||||
.col-md-6.col-sm-6.col-xs-12
|
|
||||||
%h4 Sign In
|
|
||||||
|
|
||||||
%p.data-heading Current Sign In
|
|
||||||
%p.text-muted= localize(current_user.current_sign_in_at)
|
|
||||||
|
|
||||||
%p.data-heading Last Sign In
|
|
||||||
%p.text-muted= localize(current_user.last_sign_in_at)
|
|
||||||
|
|
||||||
%p.data-heading Remember me set at
|
|
||||||
%p.text-muted= localize(current_user.remember_created_at)
|
|
||||||
.col-md-6.col-sm-6.col-xs-12
|
|
||||||
%h4 Create/Update
|
|
||||||
|
|
||||||
%p.data-heading Account created
|
|
||||||
%p.text-muted
|
|
||||||
= localize(current_user.created_at)
|
|
||||||
= " (#{time_ago_in_words(current_user.created_at)} ago)"
|
|
||||||
|
|
||||||
%p.data-heading Account last updated
|
|
||||||
%p.text-muted
|
|
||||||
= localize(current_user.updated_at)
|
|
||||||
= " (#{time_ago_in_words(current_user.updated_at)} ago)"
|
|
4
app/views/user/edit.haml
Normal file
4
app/views/user/edit.haml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
= render "settings/profile"
|
||||||
|
|
||||||
|
- provide(:title, generate_title("Profile Settings"))
|
||||||
|
- parent_layout "user/settings"
|
|
@ -1,63 +0,0 @@
|
||||||
- provide(:title, generate_title("Profile Settings"))
|
|
||||||
.container.j2-page
|
|
||||||
.row
|
|
||||||
= render 'settings_tabs'
|
|
||||||
.col-md-9.col-xs-12.col-sm-9
|
|
||||||
= render 'layouts/messages'
|
|
||||||
.card
|
|
||||||
.card-body
|
|
||||||
= bootstrap_form_for(current_user, url: {action: "edit"}, :html => { :multipart => true }, method: "patch") do |f|
|
|
||||||
|
|
||||||
= f.text_field :display_name, label: t('views.settings.profile.displayname')
|
|
||||||
|
|
||||||
.media#profile-picture-media
|
|
||||||
.pull-left
|
|
||||||
%img.img-rounded.profile--img{src: current_user.profile_picture.url(:medium)}
|
|
||||||
.media-body
|
|
||||||
= f.file_field :profile_picture, label: t('views.settings.profile.avatar')
|
|
||||||
|
|
||||||
.row#profile-picture-crop-controls{style: 'display: none;'}
|
|
||||||
.col-sm-10.col-md-8
|
|
||||||
%strong= t('views.settings.profile.avatar_adjust')
|
|
||||||
%img#profile-picture-cropper{src: current_user.profile_picture.url(:medium)}
|
|
||||||
.col-sm-2.col-md-4
|
|
||||||
.btn-group
|
|
||||||
%button#cropper-zoom-out.btn.btn-inverse{type: :button}
|
|
||||||
%i.fa.fa-search-minus
|
|
||||||
%button#cropper-zoom-in.btn.btn-inverse{type: :button}
|
|
||||||
%i.fa.fa-search-plus
|
|
||||||
|
|
||||||
.media#profile-header-media
|
|
||||||
.pull-left
|
|
||||||
%img.img-rounded.header--img{src: current_user.profile_header.url(:mobile)}
|
|
||||||
.media-body
|
|
||||||
= f.file_field :profile_header, label: t('views.settings.profile.header')
|
|
||||||
|
|
||||||
.row#profile-header-crop-controls{style: 'display: none;'}
|
|
||||||
.col-sm-10.col-md-8
|
|
||||||
%strong= t('views.settings.profile.header_adjust')
|
|
||||||
%img#profile-header-cropper{src: current_user.profile_header.url(:web)}
|
|
||||||
.col-sm-2.col-md-4
|
|
||||||
.btn-group
|
|
||||||
%button#cropper-header-zoom-out.btn.btn-inverse{type: :button}
|
|
||||||
%i.fa.fa-search-minus
|
|
||||||
%button#cropper-header-zoom-in.btn.btn-inverse{type: :button}
|
|
||||||
%i.fa.fa-search-plus
|
|
||||||
|
|
||||||
= f.text_field :motivation_header, label: t('views.settings.profile.motivation'), placeholder: t('views.settings.profile.placeholder.motivation')
|
|
||||||
|
|
||||||
= f.text_field :website, label: t('views.settings.profile.website'), placeholder: 'http://example.com'
|
|
||||||
|
|
||||||
= f.text_field :location, label: t('views.settings.profile.location'), placeholder: t('views.settings.profile.placeholder.location')
|
|
||||||
|
|
||||||
= f.text_area :bio, label: t('views.settings.profile.bio'), placeholder: t('views.settings.profile.placeholder.bio')
|
|
||||||
|
|
||||||
= f.check_box :show_foreign_themes, label: 'Render other user themes when visiting their profile'
|
|
||||||
|
|
||||||
- for attrib in %i(crop_x crop_y crop_w crop_h)
|
|
||||||
= f.hidden_field attrib, id: attrib
|
|
||||||
|
|
||||||
- for attrib in %i(crop_h_x crop_h_y crop_h_w crop_h_h)
|
|
||||||
= f.hidden_field attrib, id: attrib
|
|
||||||
|
|
||||||
= f.submit t('views.actions.save'), class: 'btn btn-primary'
|
|
4
app/views/user/edit_privacy.haml
Normal file
4
app/views/user/edit_privacy.haml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
= render "settings/privacy"
|
||||||
|
|
||||||
|
- provide(:title, generate_title("Privacy Settings"))
|
||||||
|
- parent_layout "user/settings"
|
|
@ -1,15 +0,0 @@
|
||||||
- provide(:title, generate_title("Privacy Settings"))
|
|
||||||
.container.j2-page
|
|
||||||
.row
|
|
||||||
= render 'settings_tabs'
|
|
||||||
.col-md-9.col-xs-12.col-sm-8
|
|
||||||
= render 'layouts/messages'
|
|
||||||
.card
|
|
||||||
.card-body
|
|
||||||
= bootstrap_form_for(current_user, url: {action: "edit_privacy"}, method: "patch") do |f|
|
|
||||||
|
|
||||||
= f.check_box :privacy_allow_anonymous_questions, label: t('views.settings.privacy.anonymous')
|
|
||||||
= f.check_box :privacy_allow_public_timeline, label: t('views.settings.privacy.public')
|
|
||||||
= f.check_box :privacy_allow_stranger_answers, label: t('views.settings.privacy.stranger')
|
|
||||||
|
|
||||||
= f.submit t('views.actions.save'), class: 'btn btn-primary'
|
|
4
app/views/user/edit_theme.haml
Normal file
4
app/views/user/edit_theme.haml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
= render "settings/theme"
|
||||||
|
|
||||||
|
- provide(:title, generate_title("Theme Settings"))
|
||||||
|
- parent_layout "user/settings"
|
|
@ -1,73 +0,0 @@
|
||||||
- provide(:title, generate_title("Theme Settings"))
|
|
||||||
.container.j2-page
|
|
||||||
.row
|
|
||||||
= render 'settings_tabs'
|
|
||||||
.col-md-9.col-xs-12.col-sm-8
|
|
||||||
= render 'layouts/messages'
|
|
||||||
.card
|
|
||||||
.card-body
|
|
||||||
%b Presets:
|
|
||||||
%a{href: '#', class: 'theme_preset', data: {preset: 'rs'}} Retrospring Purple,
|
|
||||||
%a{href: '#', class: 'theme_preset', data: {preset: 'dc'}} Dark Copycat,
|
|
||||||
%a{href: '#', class: 'theme_preset', data: {preset: 'lc'}} Light Copycat
|
|
||||||
= bootstrap_form_for(current_user.theme || Theme.new, url: {action: "update_theme"}, html: {id: 'update_theme'}, method: "patch") do |f|
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :primary_color, class: 'color', data: {default: 0x5E35B1}
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :primary_text, class: 'color', data: {default: 0xFFFFFF}
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :danger_color, class: 'color', data: {default: 0xFF0039}
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :danger_text, class: 'color', data: {default: 0xFFFFFF}
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :success_color, class: 'color', data: {default: 0x3FB618}
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :success_text, class: 'color', data: {default: 0xFFFFFF}
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :warning_color, class: 'color', data: {default: 0xFF7518}
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :warning_text, class: 'color', data: {default: 0xFFFFFF}
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :info_color, class: 'color', data: {default: 0x9954BB}
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :info_text, class: 'color', data: {default: 0xFFFFFF}
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :default_color, class: 'color', data: {default: 0x222222}
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :default_text, class: 'color', data: {default: 0xEEEEEE}
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :panel_color, class: 'color', data: {default: 0xF9F9F9}
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :panel_text, class: 'color', data: {default: 0x151515}
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :link_color, class: 'color', data: {default: 0x5E35B1}
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :background_color, class: 'color', data: {default: 0xFFFFFF}
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :background_text, class: 'color', data: {default: 0x222222}
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :background_muted, class: 'color', data: {default: 0xBBBBBB}
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :input_color, class: 'color', data: {default: 0xFFFFFF}
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :input_text, class: 'color', data: {default: 0x000000}
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= f.text_field :outline_color, class: 'color', data: {default: 0x5E35B1}
|
|
||||||
.col-md-6
|
|
||||||
|
|
||||||
.pull-left
|
|
||||||
= f.submit t('views.actions.save'), class: 'btn btn-primary'
|
|
||||||
|
|
||||||
.pull-right
|
|
||||||
=button_to 'Delete Theme', delete_user_theme_path, data: { confirm: "Are you sure?" }, tabindex: -1, method: :delete, class: "btn btn-danger"
|
|
|
@ -1,38 +1,4 @@
|
||||||
|
= render "settings/export"
|
||||||
|
|
||||||
- provide(:title, generate_title("Export"))
|
- provide(:title, generate_title("Export"))
|
||||||
.container.j2-page
|
- parent_layout "user/settings"
|
||||||
.row
|
|
||||||
= render 'settings_tabs'
|
|
||||||
.col-md-9.col-xs-12.col-sm-8
|
|
||||||
= render 'layouts/messages'
|
|
||||||
.card
|
|
||||||
.card-body
|
|
||||||
%h2 Export your data
|
|
||||||
%p
|
|
||||||
With the announcement of
|
|
||||||
= succeed ',' do
|
|
||||||
%a{href: 'http://blog.retrospring.net/saying-goodbye/'} shutting down Retrospring on June 8 2016
|
|
||||||
we promised you one last feature: exporting all your data. The data is inside a
|
|
||||||
%code= ".tar.gz"
|
|
||||||
archive and available in three formats: YAML, JSON, and XML. The archive also contains a copy of your
|
|
||||||
profile picture and header picture in all sizes.
|
|
||||||
%p
|
|
||||||
Please note that you can only export your data once a week. Exporting your data
|
|
||||||
will take a while, so please be patient. You will receive a question once exporting
|
|
||||||
is done.
|
|
||||||
- if current_user.can_export?
|
|
||||||
%form{action: begin_user_export_path, method: 'POST'}
|
|
||||||
%p.centre
|
|
||||||
%button#export-btn.btn.btn-lg.btn-primary{type: :submit} Export
|
|
||||||
= hidden_field_tag :authenticity_token, form_authenticity_token
|
|
||||||
- else
|
|
||||||
%p.centre
|
|
||||||
%button.btn.btn-lg.btn-primary.disabled{disabled: :disabled} Export
|
|
||||||
%p
|
|
||||||
- if current_user.export_url.nil?
|
|
||||||
Once exporting your account is done, a download link will appear here.
|
|
||||||
- else
|
|
||||||
Here is your export from
|
|
||||||
= succeed ':' do
|
|
||||||
= current_user.export_created_at
|
|
||||||
%a{href: current_user.export_url}
|
|
||||||
= File.basename current_user.export_url
|
|
||||||
|
|
Loading…
Reference in a new issue