Add pandoc
All checks were successful
/ Run tests (push) Successful in 1m35s
/ Run system tests (push) Successful in 2m31s
/ Build, push and deploy image (push) Successful in 6m18s

This commit is contained in:
david 2024-07-26 03:14:07 +02:00
parent dec482bfba
commit 109dcd205c
11 changed files with 108 additions and 4 deletions

View file

@ -35,6 +35,17 @@
<%= link_to report_path(@report, format: :xlsx), class: "btn btn-primary", target: "_blank" do %>
<i class="bi bi-filetype-xlsx"></i> XLSX
<% end %>
<%= link_to report_path(@report, format: :rtf), class: "btn btn-primary", target: "_blank" do %>
<i class="bi bi-file-richtext"></i> RTF
<% end %>
<%= link_to report_path(@report, format: :xml), class: "btn btn-primary", target: "_blank" do %>
<i class="bi bi-filetype-html"></i> HTML
<% end %>
<%= link_to report_path(@report, format: :odt), class: "btn btn-primary", target: "_blank" do %>
<i class="bi bi-file-richtext"></i> ODT
<% end %>
</div>
<div class="action-row">
<%= link_to t("scaffold.link_edit", model: @report.model_name.human), edit_report_path(@report) %>
<%= link_to t("scaffold.link_index", model: @report.model_name.human(count: 2)), reports_path %>
<%= button_to t("scaffold.link_destroy", model: @report.model_name.human), @report, method: :delete, class: "btn btn-outline-danger" %>

View file

@ -0,0 +1,23 @@
<html>
<head>
</head>
<body>
<h1><%= @report.name %></h1>
<small>
Erstellt am <%= l(@report.created_at, format: :short) %>,
zuletzt bearbeitet am <%= l(@report.updated_at, format: :short) %>
</small>
<% if @report.comment_html %>
<div>
<%= @report.comment_html %>
</div>
<% end %>
<div >
<% @report.elements.each do |element| %>
<%= render element %>
<% end %>
</div>
</body>
</head>

View file

@ -0,0 +1,25 @@
<h1><i class="bi bi-journal-text me-2"></i><%= @report.name %></h1>
<p class="small">
Erstellt am <%= l(@report.created_at, format: :short) %>,
zuletzt bearbeitet am <%= l(@report.updated_at, format: :short) %>
</p>
<% if @report.comment_html %>
<div class="mt-2 mb-4 lead">
<%= @report.comment_html %>
</div>
<% end %>
<div class="border-top pt-3">
<%= turbo_frame_tag "new_element_frame" do %>
<%= render partial: "reports/new_element_button", locals: { report: @report } %>
<% end %>
</div>
<div id="element_list">
<% @report.elements.each do |element| %>
<%= turbo_frame_tag dom_id(element, :frame) do %>
<%= render element %>
<% end %>
<% end %>
</div>