Sha256: 6e82ced0d432d6c775c3cc29a2e721e5da31018fd48ce17e6bc58f5fc98d135b

Contents?: true

Size: 1.64 KB

Versions: 9

Compression:

Stored size: 1.64 KB

Contents

.user
  .addresses
    h1
      = Comable.t('address_book')

    - if current_comable_user.errors.any?
      .errors
        ul
          - current_comable_user.errors.full_messages.each do |full_message|
            li = full_message

    - if current_comable_user.addresses.empty?
      .not_found
        p
          = Comable.t('not_found')
    - else
      .row
        .bill_address.col-sm-6
          h2
            = current_comable_user.class.human_attribute_name(:bill_address)
          - if current_comable_user.bill_address
            = render 'address', address: current_comable_user.bill_address
          - else
            .not_found
              p
                = Comable.t('not_found')

        .ship_address.col-sm-6
          h2
            = current_comable_user.class.human_attribute_name(:ship_address)
          - if current_comable_user.ship_address
            = render 'address', address: current_comable_user.ship_address
          - else
            .not_found
              p
                = Comable.t('not_found')

      .row
        .other_addresses
          h2
            = Comable.t('other_addresses')
          ul.list-unstyled
            - current_comable_user.other_addresses.each do |address|
              li.col-sm-4
                = render 'address', address: address

  .new_address
    h2
      = Comable.t('new_address')
    = form_for current_comable_user, as: :user, url: comable.addresses_user_url, method: :put do |f|
      = f.fields_for :addresses, current_comable_user.addresses.build do |ff|
        = render 'comable/shared/address_form', address: ff
      .submit
        = f.submit Comable.t('actions.create')

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
comable-frontend-0.7.1 app/views/comable/users/addresses.slim
comable-frontend-0.7.0 app/views/comable/users/addresses.slim
comable-frontend-0.7.0.beta2 app/views/comable/users/addresses.slim
comable-frontend-0.7.0.beta1 app/views/comable/users/addresses.slim
comable-frontend-0.6.0 app/views/comable/users/addresses.slim
comable_frontend-0.5.0 app/views/comable/users/addresses.slim
comable_frontend-0.4.2 app/views/comable/users/addresses.slim
comable_frontend-0.4.1 app/views/comable/users/addresses.slim
comable_frontend-0.4.0 app/views/comable/users/addresses.slim