Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move question card template back to questions/_questions.html.erb #10359

Merged
merged 11 commits into from
Nov 16, 2021
10 changes: 0 additions & 10 deletions app/views/notes/_card.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@
</span>
<% elsif node.type == 'page' %>
Wiki page by <%= node.revisions.collect(&:uid).uniq.length %> people
<% elsif node.type == 'question' %>
<div class="card bg-white rounded<% if node.status == 4 %> moderated<% end %>">
<div class="card-header">
<%= render partial: 'dashboard/node_moderate', locals: { node: node } %>
<h4><a <% if @widget %>target="_blank"<% end %> href="<%= node.path(:question) %>"><%= node.title %></a></h4>
</div>
<div class="card-footer">
<p class="meta"><%= render partial: "dashboard/node_meta", locals: { node: node } %></p>
</div>
</div>
<% end %>
</p>
</div>
Expand Down
10 changes: 9 additions & 1 deletion app/views/questions/_questions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
<div class="card-view questions-page row">
<% questions.each_with_index do |node,i| %>
<div class="<% if @widget %>col-xs-4 col-sm-4 col-md-4 <% end %>col-lg-4" style="margin-top:20px;">
<%= render partial: 'notes/card', locals: { node: node, i: i, tagname: @tagname } %>
<div class="card bg-white rounded<% if node.status == 4 %> moderated<% end %>">
<div class="card-header">
<%= render partial: 'dashboard/node_moderate', locals: { node: node } %>
<h4><a <% if @widget %>target="_blank"<% end %> href="<%= node.path(:question) %>"><%= node.title %></a></h4>
</div>
<div class="card-footer">
<p class="meta"><%= render partial: "dashboard/node_meta", locals: { node: node } %></p>
</div>
</div>
</div>

<% unless @widget %><hr class="d-lg-none" /><% end %>
Expand Down