ujh/fountainpencompanion

View on GitHub
app/views/accounts/show.html.slim

Summary

Maintainability
Test Coverage
- content_for :title, "Account"
div id="account" class="row"
  div class="col-sm-12 col-md-3 fpc-account-image"
    = profile_image
    p
      small.text-muted To change your profile picture you need to change the data for your email address on <a href="http://gravatar.com">gravatar.com</a>.
  div class="col-sm-12 col-md-9"
    = simple_form_for current_user, url: account_path, html: { class: 'form-horizontal' } do |f|
      div style="max-width: 450px"
        = f.input :name, wrapper: :vertical_form
      div style="max-width: 650px"
        = f.input :email, disabled: true, wrapper: :vertical_form, hint: link_to("Change Email Address Or Password", edit_user_registration_path)
      div style="max-width: 450px"
        = f.input :time_zone, wrapper: :vertical_select, input_html: { class: 'form-control' }, collection: ActiveSupport::TimeZone.all.map {|tz| [tz.to_s, tz.tzinfo.identifier] }

      div style="max-width: 300px"
        = f.input :public_page, disabled: true, wrapper: :vertical_form, input_html: { value: user_url(current_user, domain: "fpc.ink", port: nil, protocol: 'http')}

      = f.input :blurb, wrapper: :vertical_form, input_html: { rows: "10"}, hint: "This field allows styling through markdown", placeholder: "The contents of this field will show up on your public account page."

      div class="pt-2 mb-5"
        = f.button :button, "Save", class: "btn-success"