1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-05 22:21:26 +00:00

Revert "Moving away from matchups_array and saving matches individually"

This reverts commit 650a9ed7d6.
This commit is contained in:
2015-04-25 13:59:59 -04:00
parent 650a9ed7d6
commit 7b3fe2aaad
6 changed files with 11 additions and 67 deletions

View File

@@ -3,26 +3,11 @@
#html, #body, #wrapper { width:100%; }
</style>
<script src="https://rawgithub.com/eligrey/FileSaver.js/master/FileSaver.js" type="text/javascript"></script>
<script>
function exportDataToRtf() {
var blob = new Blob([document.getElementById("exportable").innerHTML], {
type: "application/octet-stream"
});
saveAs(blob, "brackets.rtf");
}
</script>
<%= link_to "Back to #{@tournament.name} weights", "/static_pages/weights?tournament=#{@tournament.id}" %>
<br>
<br>
<button type="submit" class="btn btn-primary" onclick="exportDataToRtf()">Export to file for printing</button>
<!--[if lte IE 9]>
<div>Excel export does not work on IE versions lower than 10. Please use chrome or update IE.</div>
<!--<![endif]-->
<br>
<br>
<div id="exportable">
<% @tournament.weights.sort_by{|w| w.max}.each do |w| %>
<div class="pagebreak">
<% @weight = w %>
@@ -47,5 +32,4 @@
<%= render 'fourPoolSemiBracket' %>
<% end %>
</div>
<% end %>
</div>
<% end %>