[116813] branches/gsoc11-statistics/stats-server/app/views/partials/ _chart_draw.html.erb
cal at macports.org
cal at macports.org
Fri Feb 7 13:39:20 PST 2014
Revision: 116813
https://trac.macports.org/changeset/116813
Author: cal at macports.org
Date: 2014-02-07 13:39:20 -0800 (Fri, 07 Feb 2014)
Log Message:
-----------
macports stats: allow using different chart names by copying the hash containing the title
Modified Paths:
--------------
branches/gsoc11-statistics/stats-server/app/views/partials/_chart_draw.html.erb
Modified: branches/gsoc11-statistics/stats-server/app/views/partials/_chart_draw.html.erb
===================================================================
--- branches/gsoc11-statistics/stats-server/app/views/partials/_chart_draw.html.erb 2014-02-07 21:38:38 UTC (rev 116812)
+++ branches/gsoc11-statistics/stats-server/app/views/partials/_chart_draw.html.erb 2014-02-07 21:39:20 UTC (rev 116813)
@@ -33,8 +33,8 @@
%>
<%# Set table options %>
-<% table_options = {:width => 600,
- :html => {:class => "graph_chart"}}
+<% tbl_options = {:width => 600,
+ :html => {:class => "graph_chart"}}
%>
@@ -44,8 +44,9 @@
<% type = controller.chart_type chart %>
<%# Set titles %>
- <% vis_options[:title] = title %>
- <% table_options[:title] = title %>
+ <!-- Chart title: <%= title %> -->
+ <% local_vis_options = vis_options.merge({ :title => title }) %>
+ <% local_tbl_options = tbl_options.merge({ :title => title }) %>
<%# Anchor %>
<a name=<%= chart %>> </a>
@@ -55,14 +56,14 @@
<% if not controller.dataset_empty? chart %>
<%# Draw visualization %>
- <% visualization chart.to_s, type, vis_options do |viz| %>
+ <% visualization chart.to_s, type, local_vis_options do |viz| %>
<% controller.populate_chart chart, viz %>
<% end %>
<% if drawtables %>
<%# Draw table %>
<% table = chart.to_s + "_table" %>
- <% visualization table, "Table", table_options do |viz| %>
+ <% visualization table, "Table", local_tbl_options do |viz| %>
<% controller.populate_chart chart, viz %>
<% end %>
<% end %>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140207/4bf06ca7/attachment.html>
More information about the macports-changes
mailing list