mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-21 02:17:50 +01:00
how about new template
This commit is contained in:
parent
75bca2430b
commit
e9985ed0aa
3 changed files with 16 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
.answerbox .text-muted a, .answerbox .text-muted a:hover {
|
.text-muted a, .answerbox .text-muted a:hover {
|
||||||
color: $gray-dark;
|
color: $gray-dark;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
14
app/views/shared/_question.html.haml
Normal file
14
app/views/shared/_question.html.haml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
.panel.panel-default
|
||||||
|
.media
|
||||||
|
.media-body
|
||||||
|
%h6.media-heading.text-muted.answerbox--question-user
|
||||||
|
= user_screen_name a.question.user
|
||||||
|
asked
|
||||||
|
= time_ago_in_words(a.question.created_at)
|
||||||
|
ago
|
||||||
|
- if a.question.answer_count > 1
|
||||||
|
·
|
||||||
|
%a{href: show_user_question_path(a.question.user.screen_name, a.question.id)}
|
||||||
|
#{a.question.answer_count} answers
|
||||||
|
%p.answerbox--question-text
|
||||||
|
= a.question.content
|
|
@ -7,7 +7,7 @@
|
||||||
%h1.j2-lh= @title
|
%h1.j2-lh= @title
|
||||||
#questions
|
#questions
|
||||||
- @questions.each do |a|
|
- @questions.each do |a|
|
||||||
= render 'shared/answerbox', a: a
|
= render 'shared/question', a: a
|
||||||
|
|
||||||
#pagination= will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false
|
#pagination= will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue