From a76463253818ac02d5d9be650a10ec3e147027fd Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 23:03:03 +0100 Subject: [PATCH] more fixes and updates --- app/views/shared/_question.html.haml | 27 ++++++++++++++------------- app/views/user/questions.js.erb | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/app/views/shared/_question.html.haml b/app/views/shared/_question.html.haml index 7158cda5..f1d6100e 100644 --- a/app/views/shared/_question.html.haml +++ b/app/views/shared/_question.html.haml @@ -1,14 +1,15 @@ .panel.panel-default - .media - .media-body - %h6.media-heading.text-muted.answerbox--question-user - = user_screen_name q.user - asked - = time_ago_in_words(q.created_at) - ago - - if q.answer_count > 1 - · - %a{href: show_user_question_path(q.user.screen_name, q.id)} - #{q.answer_count} answers - %p.answerbox--question-text - = q.content \ No newline at end of file + .panel-body + .media + .media-body + %h6.media-heading.text-muted.answerbox--question-user + = user_screen_name q.user + asked + = time_ago_in_words(q.created_at) + ago + - if q.answer_count > 1 + · + %a{href: show_user_question_path(q.user.screen_name, q.id)} + #{q.answer_count} answers + %p.answerbox--question-text + = q.content \ No newline at end of file diff --git a/app/views/user/questions.js.erb b/app/views/user/questions.js.erb index f648a149..b444b715 100644 --- a/app/views/user/questions.js.erb +++ b/app/views/user/questions.js.erb @@ -1,5 +1,5 @@ $('#questions').append('<% @questions.each do |a| - %><%= j render 'shared/answerbox', a: a + %><%= j render 'shared/question', a: a %><% end %>'); <% if @questions.next_page %> $('#pagination').html('<%= j will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false %>');