From cc4bf8d2776eeb7687edede149287d7c0f720bcc Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 2 Nov 2014 17:55:16 +0100 Subject: [PATCH] =?UTF-8?q?added=20question=20widget=20(haml2html'ified=20?= =?UTF-8?q?old=20code=E2=84=A2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/shared/_questionbox.html.haml | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/views/shared/_questionbox.html.haml diff --git a/app/views/shared/_questionbox.html.haml b/app/views/shared/_questionbox.html.haml new file mode 100644 index 00000000..1c7c4ee2 --- /dev/null +++ b/app/views/shared/_questionbox.html.haml @@ -0,0 +1,40 @@ +.panel.panel-default + .panel-heading + %h3.panel-title + Ask something! + .panel-body + #question-box.row + .row + .col-xs-12 + %textarea.form-control{:name => "qb_question", :placeholder => "Type your question hereā€¦"} + .row{:style => "padding-top: 5px; padding-left: 5px; padding-right: 5px;"} + .col-xs-6 + - if user_signed_in? # and @user.allow_anonymous + %input{:name => "qb_hidename", :type => "checkbox"}/ + Hide your name + %br/ + .col-xs-6 + %p.pull-right + %input{:name => "qb_to", :type => "hidden", :value => @user.id}/ + %button#qb_ask.btn.btn-primary{"data-loading-text" => "Asking...", "data-promote" => user_signed_in? ? "true" : "false", :type => "button"} Ask + - unless user_signed_in? + #question-box-promote.row{:style => "display: none;"} + .row + .col-xs-12 + %strong Your question has been sent. + .row + .col-sm-1 + .col-sm-5 + %button#create-account.btn.btn-block.btn-primary Create an account + .col-sm-5 + %button#new-question.btn.btn-block.btn-default Ask another question + .col-sm-1 + .row + .col-sm-1 + .col-xs-12.col-sm-10 + %small Join justask2 today! You'll be able to follow and ask people you know and a lot more. + .col-sm-1 +/ %p +/ This user does not want to get asked by strangers. Why don't you +/ = succeed "?" do +/ %a{:href => "{{ url_for('register') }}"} sign up