Advertisement
Guest User

Untitled

a guest
Aug 29th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 1.59 KB | None | 0 0
  1.   <table class="accordion table" id="questionColapsible">
  2.     <tbody>
  3.     <% @categories.each_with_index do |category, index|%>
  4.       <tr class='category-row <%= "active-collapse" if display && category == @question.category %>'>
  5.         <td class='align-middle'>
  6.             <div class="text-center category-title <%= "collapsed" if !display && category != @question.category %>" id='<%= "heading#{index}" %>' role='tab' data-toggle="collapse" data-target='<%= "#collapse#{index}" %>' aria-expanded="false" aria-controls='<%= "collapse#{index}" %>'>
  7.               <h5 class="mb-0">
  8.                 <button class="btn btn-link text-type-13" type="button" >
  9.                   <%= category.display_category %>
  10.                 </button>
  11.               </h5>
  12.             </div>
  13.             <div id='<%= "collapse#{index}" %>' class='collapse <%= "show" if display && category == @question.category %>' aria-labelledby='<%= "heading#{index}" %>' data-parent="#questionColapsible">
  14.                 <table class="display-question-table table">
  15.                   <% category.questions.each do |question| %>
  16.                     <tr class='category-question <%= "active-question" if display && @question == question%>'>                  
  17.                       <td class="question-table-item text-center"><%= link_to  question.display_question, faq_question_path("question", id: question), :class => "question-link text-type-13" %></td>
  18.                     </tr>              
  19.                   <% end %>
  20.                 </table>
  21.             </div>
  22.         </td>
  23.       </tr>
  24.     <% end %>
  25.     </tbody>
  26.   </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement