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

Poll comments #1961

Merged
Prev Previous commit
Next Next commit
Adds comment's tab
  • Loading branch information
voodoorai2000 committed Oct 10, 2017
commit faa2f31b3a4c698fa134d2d5df0db82ccbcbb5d8
14 changes: 14 additions & 0 deletions app/views/polls/_filter_subnav.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="row">
<div class="small-12 column">
<ul class="tabs" data-tabs id="polls-tabs">
<li class="tabs-title is-active">
<%= link_to "#tab-comments" do %>
<h3>
<%= t("polls.show.comments_tab") %>
<span class="js-comments-count">(<%= @poll.comments_count %>)</span>
</h3>
<% end %>
</li>
</ul>
</div>
</div>
12 changes: 8 additions & 4 deletions app/views/polls/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,14 @@
</div>
<% end %>
</div>

<div class="tabs-panel is-active" id="tab-comments">
<%= render "shared/comments" %>
</div>

</div>
</div>

<div class="tabs-content" data-tabs-content="proposals-tabs" role="tablist">
Copy link
Collaborator

@decabeza decabeza Oct 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be data-tabs-content="polls-tabs" and adds to class="tabs-content"a margin-top class 😉

<%= render "filter_subnav" %>

<div class="tabs-panel is-active" id="tab-comments">
<%= render "comments" %>
</div>
</div>