more fixes and updates

This commit is contained in:
Andreas N 2014-12-19 23:03:03 +01:00
parent c1f0388da4
commit a764632538
2 changed files with 15 additions and 14 deletions

View file

@ -1,14 +1,15 @@
.panel.panel-default .panel.panel-default
.media .panel-body
.media-body .media
%h6.media-heading.text-muted.answerbox--question-user .media-body
= user_screen_name q.user %h6.media-heading.text-muted.answerbox--question-user
asked = user_screen_name q.user
= time_ago_in_words(q.created_at) asked
ago = time_ago_in_words(q.created_at)
- if q.answer_count > 1 ago
· - if q.answer_count > 1
%a{href: show_user_question_path(q.user.screen_name, q.id)} ·
#{q.answer_count} answers %a{href: show_user_question_path(q.user.screen_name, q.id)}
%p.answerbox--question-text #{q.answer_count} answers
= q.content %p.answerbox--question-text
= q.content

View file

@ -1,5 +1,5 @@
$('#questions').append('<% @questions.each do |a| $('#questions').append('<% @questions.each do |a|
%><%= j render 'shared/answerbox', a: a %><%= j render 'shared/question', a: a
%><% end %>'); %><% end %>');
<% if @questions.next_page %> <% if @questions.next_page %>
$('#pagination').html('<%= j will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false %>'); $('#pagination').html('<%= j will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false %>');