Skip to content

Commit

Permalink
Merge pull request #860 from GoFroggyRun/ela_tab
Browse files Browse the repository at this point in the history
Merged #860
  • Loading branch information
hdoupe authored Mar 27, 2018
2 parents 6f0bbf6 + 6dd54ea commit 6d8a740
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
29 changes: 14 additions & 15 deletions templates/dynamic/elasticity_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,31 +126,30 @@ <h1>Elasticity Results</h1>
<a href="/dynamic/macro/edit/{{ unique_url.pk }}/?start_year={{ first_year }}" class="text-white btn btn-secondary">Edit Parameters</a>
</div>

<div class="result-table">
<div class="result-table-controls">
<div class="controls-tools">
<div class="btn-group">
<button type="button" class="btn btn-text btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
Save As <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="/taxbrain/pdf">PDF Report</a></li>
<li><a href="/taxbrain/{{ unique_url.pk }}/output.csv/">Outputs as CSV</a></li>
<li><a href="/taxbrain/{{ unique_url.pk }}/input.csv/">Inputs as CSV</a></li>
</ul>
</div>
<button class="btn btn-share btn-sm">Share</button>
<button class="btn btn-text btn-sm">Print</button>
<button onclick="printByID()" class="btn btn-text btn-sm">Print</button>
</div>
</div>

<div class="result-table" id="printTable">
{% include 'taxbrain/includes/results/elasticity_table.html' with table=tables.elasticity_gdp %}

</div>

<div class="result-info"></div>


<script>
function printByID() {
var tab = document.getElementById("printTable").innerHTML;
var win = window.open('', 'Print');
win.document.write(tab);
win.document.close();
win.focus()
win.print();
win.close();
return true;
}
</script>
<div class="push"></div>
</div> <!-- /wrapper -->

Expand Down
3 changes: 0 additions & 3 deletions templates/taxbrain/includes/results/elasticity_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ <h2 class="table-title">{{table.label}}</h2>
{% for col in table.cols %}
<th>
{{col.label}}
<div class="units">
{{ col.divisor|scales_of_units:col.units }}
</div>
</th>
{% endfor %}
</tr>
Expand Down

0 comments on commit 6d8a740

Please sign in to comment.