fix styling and schema

This commit is contained in:
pixeldesu 2015-04-26 02:46:37 +02:00
parent c8ba89dd1e
commit e2f06167dc
4 changed files with 23 additions and 34 deletions

View File

@ -52,9 +52,3 @@
.answerbox--question-media, .question-media, .question-body {
overflow: visible !important;
}
.question-actions {
position: absolute;
top: 10px;
right: 20px;
}

View File

@ -5,15 +5,9 @@
%a.pull-left{href: show_user_profile_path(@question.user.screen_name)}
%img.img-rounded.answerbox--img{src: gravatar_url(@question.user)}
.media-body.question-body
%h6.text-muted.media-heading.answerbox--question-user
= user_screen_name @question.user, @question.author_is_anonymous
asked
%span{title: @question.created_at, data: { toggle: :tooltip, placement: :bottom }}
= time_ago_in_words(@question.created_at)
ago
- if user_signed_in?
.pull-right
.btn-group.question-actions
.btn-group
%button.btn.btn-link.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }}
%span.caret
%ul.dropdown-menu.dropdown-menu-right{role: :menu}
@ -27,6 +21,12 @@
%a{href: '#', data: { action: 'ab-question-report', q_id: @question.id }}
%i.fa.fa-exclamation-triangle
Report
%h6.text-muted.media-heading.answerbox--question-user
= user_screen_name @question.user, @question.author_is_anonymous
asked
%span{title: @question.created_at, data: { toggle: :tooltip, placement: :bottom }}
= time_ago_in_words(@question.created_at)
ago
%p.answerbox--question-text= @question.content
.container.question-page
/ TODO: make this pretty (it's currently C-c'd straight from shared/_answerbox)

View File

@ -6,6 +6,22 @@
%a.pull-left{href: show_user_profile_path(a.question.user.screen_name)}
%img.img-rounded.answerbox--img{src: gravatar_url(a.question.user)}
.media-body.question-body
- if user_signed_in?
.pull-right
.btn-group
%button.btn.btn-link.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }}
%span.caret
%ul.dropdown-menu.dropdown-menu-right{role: :menu}
- if current_user.mod?
%li.text-danger
%a{href: '#', data: { action: 'ab-question-destroy', q_id: a.question.id }}
%i.fa.fa-trash-o
Delete
- unless a.question.user == current_user
%li
%a{href: '#', data: { action: 'ab-question-report', q_id: a.question.id }}
%i.fa.fa-exclamation-triangle
Report
%h6.text-muted.media-heading.answerbox--question-user
= user_screen_name a.question.user, a.question.author_is_anonymous
asked
@ -22,22 +38,6 @@
·
%a{href: show_user_question_path(a.question.user.screen_name, a.question.id)}
#{a.question.answer_count} answers
- if user_signed_in?
.pull-right
.btn-group.question-actions
%button.btn.btn-link.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }}
%span.caret
%ul.dropdown-menu.dropdown-menu-right{role: :menu}
- if current_user.mod?
%li.text-danger
%a{href: '#', data: { action: 'ab-question-destroy', q_id: a.question.id }}
%i.fa.fa-trash-o
Delete
- unless a.question.user == current_user
%li
%a{href: '#', data: { action: 'ab-question-report', q_id: a.question.id }}
%i.fa.fa-exclamation-triangle
Report
.answerbox--question-text
= a.question.content
.panel-body

View File

@ -24,7 +24,6 @@ ActiveRecord::Schema.define(version: 20150422024104) do
t.datetime "created_at"
t.datetime "updated_at"
t.integer "smile_count", default: 0, null: false
t.boolean "nsfw", default: false
end
add_index "answers", ["user_id", "created_at"], name: "index_answers_on_user_id_and_created_at", using: :btree
@ -111,7 +110,6 @@ ActiveRecord::Schema.define(version: 20150422024104) do
t.datetime "created_at"
t.datetime "updated_at"
t.integer "answer_count", default: 0, null: false
t.boolean "nsfw", default: false
end
add_index "questions", ["user_id", "created_at"], name: "index_questions_on_user_id_and_created_at", using: :btree
@ -210,9 +208,6 @@ ActiveRecord::Schema.define(version: 20150422024104) do
t.boolean "privacy_show_in_search", default: true
t.boolean "banned", default: false
t.boolean "blogger", default: false
t.boolean "nsfw", default: false
t.boolean "show_nsfw", default: false
t.boolean "privacy_allow_nsfw_questions", default: true
t.boolean "contributor", default: false
end