Files
sure/app/views/layouts/print.html.erb
soky srm 25ac822308 Reports print functionality (#622)
* Print initial impl

* Try to keep the bigger section together

* /* Tufte-inspired Print Report Styles */

* styling

* I8n

* Move print styling out.

* FIX unrelated test ordering

on line 53 - import.rows.first doesn't guarantee ordering. Without an explicit ORDER BY, the database may return rows in any order.

* Update print-report.css

* Update print.html.erb

* pass data to view

* Update index.html.erb

* Fix ERB helpers

* Update reports_helper.rb
2026-01-12 14:40:30 +01:00

29 lines
774 B
Plaintext

<!DOCTYPE html>
<html lang="en" class="font-sans">
<head>
<title><%= content_for(:title) || t("reports.print.document_title") %></title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
</head>
<body class="bg-white text-gray-900 antialiased print-body">
<div class="print-container">
<%= yield %>
</div>
<script>
// Auto-trigger print dialog when page loads
window.onload = function() {
// Small delay to ensure styles are loaded
setTimeout(function() {
window.print();
}, 500);
};
</script>
</body>
</html>