Skip to content

Commit

Permalink
render :partial calls use paths + templates to enable pdf generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremiah Heller committed Mar 30, 2011
1 parent 0c864d3 commit 48a6821
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions app/views/reports/_summary.html.erb
Expand Up @@ -22,9 +22,9 @@ conditions = {}
</tr>
</thead>
<tbody>
<%= render :partial => 'activity_warning' %>
<%= render :partial => 'state_counts' %>
<%= render :partial => 'state_totals' %>
<%= render :partial => 'state_maps' %>
<%= render :partial => 'reports/activity_warning.html' %>
<%= render :partial => 'reports/state_counts.html' %>
<%= render :partial => 'reports/state_totals.html' %>
<%= render :partial => 'reports/state_maps.html' %>
</tbody>
</table>
8 changes: 4 additions & 4 deletions app/views/reports/show.html.erb
Expand Up @@ -2,15 +2,15 @@
<div style="float: right; padding-bottom: 15px;">
<span class="fake_button">
<%=
link_to_unless(@summary_report, "Download CSV", download_report_path(@report, :format => :csv)) do |name|
link_to name, download_report_path(@report, {:summary_report_id => @summary_report.id, :format => :csv})
link_to_unless(params[:activity_search], "Download CSV", download_report_path(@report, :format => :csv)) do |name|
link_to name, download_report_path(@report, {:activity_search => params[:activity_search], :format => :csv})
end
%>
</span>
<span class="fake_button">
<%=
link_to_unless @summary_report, "Download PDF", download_report_path(@report, :format => :pdf) do |name|
link_to name, download_report_path(@report, {:summary_report_id => @summary_report.id, :format => :pdf})
link_to_unless(params[:activity_search], "Download PDF", download_report_path(@report, :format => :pdf)) do |name|
link_to name, download_report_path(@report, {:activity_search => params[:activity_search], :format => :pdf})
end
%>
</span>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_pdf_output.erb
@@ -1,2 +1,2 @@
<%= render :partial => "summary_reports/preview.html.erb" if @summary_report %>
<%= render :partial => "reports/summary.html.erb" if @summary_report %>
<%= render :partial => "reports/preview.html.erb" %>

0 comments on commit 48a6821

Please sign in to comment.