2020-04-19 14:31:24 -07:00
|
|
|
.card
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-header
|
2021-12-19 14:51:06 -08:00
|
|
|
- if user.profile.motivation_header.blank?
|
2022-06-13 12:55:37 -07:00
|
|
|
= t(".title")
|
2020-04-26 07:25:54 -07:00
|
|
|
- else
|
2021-12-19 14:51:06 -08:00
|
|
|
= user.profile.motivation_header
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-body
|
2020-05-10 05:06:22 -07:00
|
|
|
- if user.banned?
|
2020-04-26 08:30:06 -07:00
|
|
|
.text-center
|
2022-06-13 12:55:37 -07:00
|
|
|
%strong= t(".status.banned")
|
2022-06-13 13:48:40 -07:00
|
|
|
- elsif user_signed_in? && current_user.blocking?(user)
|
|
|
|
.text-center
|
|
|
|
%strong= t(".status.blocking")
|
|
|
|
- elsif user_signed_in? && user.blocking?(current_user)
|
|
|
|
.text-center
|
|
|
|
%strong= t(".status.blocked")
|
2022-11-06 06:01:20 -08:00
|
|
|
- elsif user.inbox_locked?
|
|
|
|
.text-center
|
|
|
|
%strong= t(".status.locked")
|
2022-11-13 05:27:33 -08:00
|
|
|
- elsif !user_signed_in? && user.privacy_require_user?
|
|
|
|
.text-center
|
|
|
|
%strong= t(".status.require_user_html", sign_in: link_to(t("voc.login"), new_user_session_path), sign_up: link_to(t("voc.register"), new_user_registration_path))
|
2015-01-12 13:44:13 -08:00
|
|
|
- else
|
2020-05-10 05:06:22 -07:00
|
|
|
- if user_signed_in? || user.privacy_allow_anonymous_questions?
|
2023-01-08 08:12:46 -08:00
|
|
|
#question-box{ data: user.profile.allow_long_questions ? {} : { controller: "character-count", "character-count-max-value": user.profile.question_length_limit }}
|
2022-10-02 13:10:04 -07:00
|
|
|
%textarea.form-control{ name: "qb-question", placeholder: t(".placeholder"), data: { "character-count-target": "input" } }
|
2022-10-13 13:29:04 -07:00
|
|
|
.row{ style: "padding-top: 5px;" }
|
2020-04-26 08:30:06 -07:00
|
|
|
.col-6
|
2015-01-12 13:44:13 -08:00
|
|
|
- if user_signed_in?
|
2020-05-10 05:06:22 -07:00
|
|
|
- if user.privacy_allow_anonymous_questions?
|
2022-07-27 11:16:11 -07:00
|
|
|
%label
|
|
|
|
%input{ name: "qb-anonymous", type: :checkbox }
|
|
|
|
= t(".anonymous")
|
2015-01-12 13:44:13 -08:00
|
|
|
%br/
|
|
|
|
- else
|
2022-06-13 12:55:37 -07:00
|
|
|
%input{ name: "qb-anonymous", type: :hidden, value: false }/
|
2020-04-26 08:30:06 -07:00
|
|
|
.col-6
|
2015-01-12 13:44:13 -08:00
|
|
|
%p.pull-right
|
2023-01-08 08:12:46 -08:00
|
|
|
%span.text-muted.me-1{ class: user.profile.allow_long_questions ? "d-none" : "", data: { "character-count-target": "counter" } }= Question::SHORT_QUESTION_MAX_LENGTH
|
2022-06-13 12:55:37 -07:00
|
|
|
%input{ name: "qb-to", type: "hidden", value: user.id }/
|
|
|
|
%button.btn.btn-primary{ name: "qb-ask",
|
2020-05-10 05:06:22 -07:00
|
|
|
type: :button,
|
2022-10-02 13:10:04 -07:00
|
|
|
data: { loading_text: t(".load"), promote: user_signed_in? ? "false" : "true", "character-count-target": "action" } }
|
2020-05-10 05:06:22 -07:00
|
|
|
Ask
|
2015-01-12 13:44:13 -08:00
|
|
|
- unless user_signed_in?
|
2020-05-10 05:06:22 -07:00
|
|
|
- if user.privacy_allow_anonymous_questions?
|
2022-01-03 13:37:01 -08:00
|
|
|
.d-none#question-box-promote
|
2015-01-12 13:44:13 -08:00
|
|
|
.row
|
2020-04-26 08:30:06 -07:00
|
|
|
.col-12.text-center
|
2022-06-13 12:55:37 -07:00
|
|
|
%strong= t(".promote.message")
|
2015-01-12 13:44:13 -08:00
|
|
|
.row
|
2020-04-26 08:30:06 -07:00
|
|
|
.col-sm-5.offset-sm-1
|
2023-01-04 05:43:28 -08:00
|
|
|
.d-grid
|
|
|
|
%button.btn.btn-primary#create-account= t(".promote.create")
|
2015-01-12 13:44:13 -08:00
|
|
|
.col-sm-5
|
2023-01-04 05:43:28 -08:00
|
|
|
.d-grid
|
|
|
|
%button.btn.btn-default#new-question= t(".promote.another")
|
2015-01-12 13:44:13 -08:00
|
|
|
.row
|
2020-04-26 08:30:06 -07:00
|
|
|
.col-xs-12.col-sm-10.offset-sm-1.text-center
|
2022-06-13 12:55:37 -07:00
|
|
|
%small= t(".promote.join", app_title: APP_CONFIG["site_name"])
|
2015-01-12 13:44:13 -08:00
|
|
|
- else
|
2022-11-13 05:27:33 -08:00
|
|
|
.text-center
|
|
|
|
%strong= t(".status.non_anonymous_html", sign_in: link_to(t("voc.login"), new_user_session_path), sign_up: link_to(t("voc.register"), new_user_registration_path))
|