Actualizar plugin Questions a 1.0.2 light

This commit is contained in:
Manuel Cillero 2020-11-22 21:40:10 +01:00
parent b9e569d03f
commit b37d1305f1
64 changed files with 394 additions and 229 deletions

View file

@ -1,29 +1,25 @@
<% previous_group = false %>
<div class="section-list">
<% @sections.each do |section| %>
<% if @project.blank? && (group = section.project) != previous_group %>
<% reset_cycle %>
<% @sections.group_by(&:project).each do |project, sections| %>
<% if @project.blank? %>
<div class="project-forums">
<h3>
<%= project.name %>
<%= link_to " \xc2\xbb", project_questions_sections_path(project_id: project.identifier) %>
</h3>
</div>
<% if group %>
<div class="project-forums">
<h3>
<%= group.name %>
<%= link_to " \xc2\xbb", project_questions_sections_path(:project_id => group.identifier) %>
</h3>
</div>
<% end %>
<div class="section-list">
<% previous_group = group %>
<% end %>
<a href="<%= url_for({:controller => "questions", :action => 'index', :section_id => section, :project_id => section.project}) %>" id="section_<%= section.id %>" class="section-tile">
<h4>
<%= section.name %>
<span class="topic-count"><%= "(#{section.questions_count})" %></span>
</h4>
<div class="description">
<%= section.description %>
</div>
</a>
<div class="section-list">
<% sections.each do |section| %>
<a id="section_<%= section.id %>" class="section-tile"
href="<%= url_for({ controller: "questions", action: 'index', section_id: section, project_id: section.project }) %>">
<h4>
<%= section.name %>
<span class="topic-count"><%= "(#{section.questions_count})" %></span>
</h4>
<div class="description">
<%= section.description %>
</div>
</a>
<% end %>
</div>
<% end %>
</ul>