Gui improvements and ideas
This commit is contained in:
parent
3f4c7d17bf
commit
2ae0b55e42
54 changed files with 639 additions and 237 deletions
|
|
@ -8,7 +8,8 @@
|
|||
<th><%= Report.human_attribute_name(:name) %></th>
|
||||
|
||||
<th><%= Report.human_attribute_name(:comment_html) %></th>
|
||||
|
||||
<th></th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @reports.each do |report| %>
|
||||
|
|
@ -18,7 +19,8 @@
|
|||
<td><%= link_to(report.name, url_for(report)) %></td>
|
||||
|
||||
<td><%= link_to(truncate(strip_tags(report.comment)), url_for(report)) if report.comment %></td>
|
||||
|
||||
<td><%= l(report.created_at, format: :short) %></td>
|
||||
<td><%= l(report.updated_at, format: :short) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
<div class="container">
|
||||
<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>
|
||||
|
||||
<%= @report.comment_html %>
|
||||
<% if @report.comment_html %>
|
||||
<div class="mt-2 mb-4 lead">
|
||||
<%= @report.comment_html %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="my-5">
|
||||
<div class="border-top pt-3">
|
||||
<%= turbo_frame_tag "new_element_frame" do %>
|
||||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Element".html_safe, new_element_path(report_id: @report.id), class: "btn btn-primary" %>
|
||||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Neues Element".html_safe, new_element_path(report_id: @report.id), class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
@ -17,8 +24,16 @@
|
|||
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to report_path(@report, format: :pdf), class: "btn btn-primary", target: "_blank" do %>
|
||||
<i class="bi bi-filetype-pdf"></i> PDF
|
||||
<% end %>
|
||||
<%= link_to report_path(@report, format: :docx), class: "btn btn-primary", target: "_blank" do %>
|
||||
<i class="bi bi-filetype-docx"></i> DOCX
|
||||
<% end %>
|
||||
<%= 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 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" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
10
app/views/reports/show.xlsx.axlsx
Normal file
10
app/views/reports/show.xlsx.axlsx
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
wb = xlsx_package.workbook
|
||||
wb.add_worksheet(name: "Erfolgskriterien") do |sheet|
|
||||
sheet.add_row SuccessCriterion.column_names
|
||||
|
||||
@report.elements.each do |element|
|
||||
element.success_criteria.each do |sc|
|
||||
sheet.add_row sc.attributes.values
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue