ayyyy vodka

This commit is contained in:
nilsding 2014-12-08 16:01:27 +01:00
parent 19cf4da0e8
commit 2caf81d08e
9 changed files with 17 additions and 17 deletions

View File

@ -1,7 +1,7 @@
.container.j2-page .container.j2-page
= render 'layouts/messages' = render 'layouts/messages'
- @inbox.each do |i| - @inbox.each do |i|
.panel.inbox-box{'data-id' => i.id, class: "panel-#{i.new? ? 'primary' : 'default'}" } .panel.inbox-box{class: "panel-#{i.new? ? 'primary' : 'default'}", data: { id: i.id }}
.panel-heading .panel-heading
.media .media
- unless i.question.author_is_anonymous - unless i.question.author_is_anonymous
@ -20,11 +20,11 @@
#{i.question.answer_count} response(s) #{i.question.answer_count} response(s)
%p.answerbox-question-text= i.question.content %p.answerbox-question-text= i.question.content
.panel-body .panel-body
%textarea.form-control{name: 'ib-answer', 'data-id' => i.id} %textarea.form-control{name: 'ib-answer', data: { id: i.id }}
%br/ %br/
%button.btn.btn-success{name: 'ib-answer', 'data-ib-id' => i.id} %button.btn.btn-success{name: 'ib-answer', data: { id: i.id }}
Answer Answer
%button.btn.btn-danger{name: 'ib-destroy', 'data-ib-id' => i.id} %button.btn.btn-danger{name: 'ib-destroy', data: { id: i.id }}
Delete Delete
- if @inbox.empty? - if @inbox.empty?

View File

@ -1,4 +1,4 @@
.panel.panel-default.answer-box{'data-id' => a.id} .panel.panel-default.answer-box{data: { id: a.id }}
- if @question.nil? - if @question.nil?
.panel-heading .panel-heading
.media .media

View File

@ -5,16 +5,16 @@
users smiled this users smiled this
- if user_signed_in? - if user_signed_in?
- if current_user.smiled? a - if current_user.smiled? a
%button.btn.btn-info.btn-sm{type: :button, name: 'ab-smile', 'data-a-id' => a.id, 'data-action' => 'unsmile'} %button.btn.btn-info.btn-sm{type: :button, name: 'ab-smile', data: { a_id: a.id, action: :unsmile }}
%i.fa.fa-frown-o %i.fa.fa-frown-o
%span{id: "ab-smile-count-#{a.id}"}= a.smile_count %span{id: "ab-smile-count-#{a.id}"}= a.smile_count
- else - else
%button.btn.btn-info.btn-sm{type: :button, name: 'ab-smile', 'data-a-id' => a.id, 'data-action' => 'smile'} %button.btn.btn-info.btn-sm{type: :button, name: 'ab-smile', data: { a_id: a.id, action: :smile }}
%i.fa.fa-smile-o %i.fa.fa-smile-o
%span{id: "ab-smile-count-#{a.id}"}= a.smile_count %span{id: "ab-smile-count-#{a.id}"}= a.smile_count
%button.btn.btn-primary.btn-sm{type: :button, name: 'ab-comments', 'data-a-id' => a.id, 'data-state' => :hidden} %button.btn.btn-primary.btn-sm{type: :button, name: 'ab-comments', data: { a_id: a.id, state: :hidden }}
%i.fa.fa-comments %i.fa.fa-comments
%span{id: "ab-comment-count-#{a.id}"}= a.comment_count %span{id: "ab-comment-count-#{a.id}"}= a.comment_count
- if privileged? a.user - if privileged? a.user
%button.btn.btn-danger.btn-sm{name: 'ab-destroy', 'data-a-id' => a.id} %button.btn.btn-danger.btn-sm{name: 'ab-destroy', data: { a_id: a.id }}
%i.fa.fa-trash-o %i.fa.fa-trash-o

View File

@ -3,11 +3,11 @@
- else # TODO: some design guy (i.e. pixeldesu) should make some black magic here - else # TODO: some design guy (i.e. pixeldesu) should make some black magic here
%ul.comments %ul.comments
- a.comments.all.each do |comment| - a.comments.all.each do |comment|
%li{'data-comment-id' => comment.id} %li{data: { comment_id: comment.id }}
%img.img-answerbox-small{src: gravatar_url(comment.user)} %img.img-answerbox-small{src: gravatar_url(comment.user)}
%b= user_screen_name comment.user %b= user_screen_name comment.user
= comment.content = comment.content
- if user_signed_in? - if user_signed_in?
.form-group.has-feedback{name: 'ab-comment-new-group', 'data-a-id' => a.id} .form-group.has-feedback{name: 'ab-comment-new-group', 'data-a-id' => a.id}
%input.form-control{type: :text, placeholder: 'Comment...', name: 'ab-comment-new', 'data-a-id' => a.id} %input.form-control{type: :text, placeholder: 'Comment...', name: 'ab-comment-new', data: {a_id: a.id }}
%span.text-muted.form-control-feedback.comment-count{id: "ab-comment-charcount-#{a.id}"} 160 %span.text-muted.form-control-feedback.comment-count{id: "ab-comment-charcount-#{a.id}"} 160

View File

@ -10,4 +10,4 @@
%textarea.form-control{:name => "qb-all-question", :placeholder => "Type your question here…"} %textarea.form-control{:name => "qb-all-question", :placeholder => "Type your question here…"}
.modal-footer .modal-footer
%button.btn.btn-default{"data-dismiss" => "modal", :type => "button"} Cancel %button.btn.btn-default{"data-dismiss" => "modal", :type => "button"} Cancel
%button.btn.btn-primary{name: 'qb-all-ask', 'data-loading-text' => "Asking...", :type => "button"} Ask %button.btn.btn-primary{name: 'qb-all-ask', :type => "button", data: {loading_text: 'Asking...' }} Ask

View File

@ -19,7 +19,7 @@
.col-xs-6 .col-xs-6
%p.pull-right %p.pull-right
%input{name: 'qb-to', type: 'hidden', :value => @user.id}/ %input{name: 'qb-to', type: 'hidden', :value => @user.id}/
%button.btn.btn-primary{name: 'qb-ask', 'data-loading-text' => "Asking...", "data-promote" => user_signed_in? ? "false" : "true", :type => "button"} Ask %button.btn.btn-primary{name: 'qb-ask', :type => "button", data: {loading_text: 'Asking...', promote: user_signed_in? ? "false" : "true" }} Ask
- unless user_signed_in? - unless user_signed_in?
#question-box-promote.row{:style => "display: none;"} #question-box-promote.row{:style => "display: none;"}
.row .row

View File

@ -44,7 +44,7 @@
#pagination= will_paginate @timeline, renderer: BootstrapPagination::Rails, page_links: false #pagination= will_paginate @timeline, renderer: BootstrapPagination::Rails, page_links: false
- if @timeline.next_page - if @timeline.next_page
%button#load-more-btn.btn.btn-default{type: :button, 'data-current-page' => @timeline.current_page} %button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @timeline.current_page }}
Load more Load more
.visible-xs= render 'shared/links' .visible-xs= render 'shared/links'
- else - else

View File

@ -3,8 +3,8 @@
%a.btn.btn-default.btn-block{href: edit_user_profile_path} Edit profile %a.btn.btn-default.btn-block{href: edit_user_profile_path} Edit profile
- else - else
- if current_user.following? @user - if current_user.following? @user
%button#editprofile.btn.btn-default.btn-block{type: :button, name: 'user-action', 'data-action' => :unfollow, 'data-target' => @user.screen_name} %button#editprofile.btn.btn-default.btn-block{type: :button, name: 'user-action', data: { action: :unfollow, target: @user.screen_name }}
Unfollow Unfollow
- else - else
%button#editprofile.btn.btn-primary.btn-block{type: :button, name: 'user-action', 'data-action' => :follow, 'data-target' => @user.screen_name} %button#editprofile.btn.btn-primary.btn-block{type: :button, name: 'user-action', data: { action: :follow, target: @user.screen_name }}
Follow Follow

View File

@ -50,6 +50,6 @@
#pagination= will_paginate @answers, renderer: BootstrapPagination::Rails, page_links: false #pagination= will_paginate @answers, renderer: BootstrapPagination::Rails, page_links: false
- if @answers.next_page - if @answers.next_page
%button#load-more-btn.btn.btn-default{type: :button, 'data-current-page' => @answers.current_page} %button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @answers.current_page }}
Load more Load more
.visible-xs= render 'shared/links' .visible-xs= render 'shared/links'