noosfero | Use chartkick gem to improve the visualization of custom_form submissions. (!1316)

Rodrigo Souto gitlab at mg.gitlab.com
Thu Sep 28 10:08:16 BRT 2017


Rodrigo Souto started a new discussion on plugins/custom_forms/views/custom_forms_plugin_profile/review.html.erb:

> +<li> <span> <%= _('Query Duration') %> </span> <span class="query_info"> : <%=  @form.duration_in_days %></span> </li>
> +  <br>
> +  <li><span> <%= _('Participants') %> </span> <span class="query_info"><%=  %>: <%=  @form.submissions.count %></span></li>
> +  <br>
> +  <li><%= _('Download all form responses as') %>:
> +  <%= link_to '[CSV]', :format => 'csv' %></li>
> +</p>
> +</div>
> +<div>
> +
> +  <br>
> +
> +  <h4 class="review_text_align"> <%= _('Query Overview') %> </h4>
> +  <% @query_results.each_with_index do |result, index|  %>
> +    <div>
> +      <% if @graph.show_as_pizza? result["data"]["show_as"] %>

This can look way better if you do something like `render partial: result["data"]["show_as"]` and move this codes to separate partials. You can have a partial named like `_pizza_graph.html.erb` and symbolic links like `_check_box.html.erb -> _pizza_graph.html.erb`.

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1316#note_41777233
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170928/8f0f7249/attachment-0001.html>


More information about the Noosfero-dev mailing list