- if @associate.new_associate? .col-12.text-left.text-md-left.loged-font = t('associate_home.grettings') = succeed "." do %strong= current_user.name %p.grey.pt-2 != t('associate_home.awaiting_moderation') - elsif @associate.approved? = render partial: "/user_associate/covid_voucher" .col-12.col-md-6.text-left.text-md-left.loged-font = t('associate_home.grettings') = succeed "." do %strong= current_user.name %p.grey.pt-2 != t('associate_home.awaiting_payment') .col-12.col-md-6.text-right.text-md-right.loged-font = simple_form_for(@associate, url: payment_pay_association_path, html: { method: :post }) do |f| = f.error_notification = f.button :submit, t('associate_home.awaiting_payment_button_label'), class: "btn btn-warning orange" - if (@associate.code_of_ethics_terms == false) = f.input :code_of_ethics_terms, as: :boolean, label: ("#{link_to 'Como pessoa associada à Abraji, aceito o código de ética e suas recomendações de conduta.', {:controller => :pages, :action => :institutional_codigo_de_conduta_etica}, :target => :_blank}").html_safe - if (@need_ethics == '1') %p.alert.alert-danger.col-4.float-right = t('associate_home.association_need_ethics') - elsif @associate.awaiting_payment? .col-12.text-left.text-md-left.loged-font = t('associate_home.grettings') = succeed "." do %strong= current_user.name %p.grey.pt-2 != t('user_home.associate_home.awaiting_payment_return') -elsif @associate.running? - if (@associate.valid_until.to_date - 30.days) <= Date.today = render partial: "/user_associate/covid_voucher" .col-12.col-md-6.text-left.text-md-left.loged-font = t('associate_home.grettings') = succeed "." do %strong= current_user.name %p.grey.pt-2 != t('associate_home.association_ok', expire_date: @associate.valid_until.strftime("%d/%m/%Y")) %br != t('associate_home.association_ok_do_renew') .col-12.col-md-6.text-right.text-md-right.loged-font = simple_form_for(@associate, url: payment_pay_association_path, html: { method: :post }) do |f| = f.error_notification = f.button :submit, t('associate_home.association_expired_since_button_label'), class: "btn btn-warning orange" - if (@associate.code_of_ethics_terms == false) = f.input :code_of_ethics_terms, as: :boolean, label: ("#{link_to 'Como pessoa associada à Abraji, aceito o código de ética e suas recomendações de conduta.', {:controller => :pages, :action => :institutional_codigo_de_conduta_etica}, :target => :_blank}").html_safe - if (@need_ethics == '1') %p.alert.alert-danger.col-4.float-right = t('associate_home.association_need_ethics') - else .col-12.text-left.text-md-left.loged-font = t('associate_home.grettings') = succeed "." do %strong= current_user.name %p.grey.pt-2 != t('associate_home.association_ok', expire_date: @associate.valid_until.strftime("%d/%m/%Y")) %br != t('associate_home.cruza_grafos') %br = image_tag("products/logo-cruza-grafos.png") = link_to t('cruza_grafos.subscribe_active_label_button'), t('cruza_grafos.subscribe_active_link_button'), target:"_blank", class: "btn btn-warning orange" -elsif @associate.expired? = render partial: "/user_associate/covid_voucher" .col-12.col-md-6.text-left.text-md-left.loged-font = t('associate_home.grettings') = succeed "." do %strong= current_user.name %p.grey.pt-2 != t('associate_home.association_expired_since', expire_date: @associate.valid_until.strftime("%d/%m/%Y")) %br != t('associate_home.association_ok_do_renew') .col-12.col-md-6.text-right.text-md-right.loged-font = simple_form_for(@associate, url: payment_pay_association_path, html: { method: :post }) do |f| = f.error_notification = f.button :submit, t('associate_home.association_expired_since_button_label'), class: "btn btn-warning orange" - if (@associate.code_of_ethics_terms == false) = f.input :code_of_ethics_terms, as: :boolean, label: ("#{link_to 'Como pessoa associada à Abraji, aceito o código de ética e suas recomendações de conduta.', {:controller => :pages, :action => :institutional_codigo_de_conduta_etica}, :target => :_blank}").html_safe - if (@need_ethics == '1') %p.alert.alert-danger.col-4.float-right = t('associate_home.association_need_ethics') -elsif @associate.rejected? .col-12.col-md-6.text-left.text-md-left.loged-font = t('associate_home.grettings') = succeed "." do %strong= current_user.name %p.grey.pt-2 != t('associate_home.moderation_refused') .col-12.col-md-6.text-right.text-md-right.loged-font %a.btn.btn-warning.orange{:href => "mailto:#{t('associate_home.moderation_refused_mailto')}"} =t('associate_home.moderation_refused_button_label')