Merge pull request #35 from Retrospring/feature-fix-question-pages
Fix question pagination
This commit is contained in:
commit
a26f429124
|
@ -1,3 +1,4 @@
|
||||||
|
- type ||= nil
|
||||||
.panel.panel-default.questionbox{data: { id: q.id }}
|
.panel.panel-default.questionbox{data: { id: q.id }}
|
||||||
.panel-body
|
.panel-body
|
||||||
.media
|
.media
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
$('#questions').append('<% @questions.each do |q|
|
$('#questions').append('<% @questions.each do |q|
|
||||||
%><%= j render 'shared/question', q: q
|
%><%= j render 'shared/question', q: q, type: nil
|
||||||
%><% 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 %>');
|
||||||
<% else %>
|
<% else %>
|
||||||
$('#pagination, #load-more-btn').remove();
|
$('#pagination, #load-more-btn').remove();
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue