Added projects
Some checks failed
/ Run tests (push) Failing after 2m3s
/ Run system tests (push) Failing after 2m17s
/ Build, push and deploy image (push) Has been skipped

This commit is contained in:
david 2024-11-24 22:08:36 +01:00
parent 0964187f22
commit 8b4ffb83ec
37 changed files with 470 additions and 1935 deletions

View file

@ -0,0 +1,5 @@
<%= bootstrap_form_with(model: project) do |form| %>
<%= form.text_field :name %>
<%= form.rich_text_area :details %>
<%= form.submit %>
<% end %>

View file

@ -0,0 +1,20 @@
.project id=dom_id(project)
p
strong Name:
= project.name
p
strong Details:
= project.details
p
strong Berichte:
ul.ps-0
- project.reports.each do
li.d-flex.ps-0
=< "ID #{_1.id}: #{l(_1.created_at,format: :short)} #{_1.name}"
= link_to(_1, class: "btn btn-sm btn-link-secondary") do
i.bi.bi-folder-symlink
= button_to(project_reports_path(project), class: "btn btn-sm btn-link-secondary", params: { copy_from_id: _1.id }) do
i.bi.bi-copy
p
= link_to(new_project_report_path(project), class: "btn btn-secondary") do
i.bi.bi-plus-lg

View file

@ -0,0 +1,2 @@
json.extract! project, :id, :name, :created_at, :updated_at
json.url project_url(project, format: :json)

View file

@ -0,0 +1,8 @@
<h1><%= t("scaffold.pagetitle_edit", model: Project.model_name.human) %></h1>
<%= render "form", project: @project %>
<div class="action-row">
<%= link_to t("scaffold.link_show", model: Project.model_name.human), @project %>
<%= link_to t("scaffold.link_index", model: Project.model_name.human(count: 2)), projects_path %>
</div>

View file

@ -0,0 +1,25 @@
<h1><%= t("scaffold.pagetitle_index", model: Project.model_name.human(count: 2)) %></h1>
<table class="table table-striped">
<thead>
<tr>
<th><%= Project.human_attribute_name(:id) %></th>
<th><%= Project.human_attribute_name(:name) %></th>
</thead>
<tbody>
<% @projects.each do |project| %>
<tr>
<td><%= link_to(project.id, url_for(project)) %></td>
<td><%= link_to(project.name, url_for(project)) %></td>
</tr>
<% end %>
</tbody>
</table>
<div class="action-row">
<%= link_to t("scaffold.link_new", model: Project.model_name.human), new_project_path %>
</div>

View file

@ -0,0 +1 @@
json.array! @projects, partial: "projects/project", as: :project

View file

@ -0,0 +1,7 @@
<h1><%= t("scaffold.pagetitle_new", model: Project.model_name.human) %></h1>
<%= render "form", project: @project %>
<div class="action-row">
<%= link_to t("scaffold.link_index", model: Project.model_name.human(count: 2)), projects_path %>
</div>

View file

@ -0,0 +1,9 @@
<h1><%= t("scaffold.pagetitle_show", model: @project.class.model_name.human) %></h1>
<%= render @project %>
<div class="action-row">
<%= link_to t("scaffold.link_edit", model: @project.model_name.human), edit_project_path(@project) %>
<%= link_to t("scaffold.link_index", model: @project.model_name.human(count: 2)), projects_path %>
<%= button_to t("scaffold.link_destroy", model: @project.model_name.human), @project, method: :delete, class: "btn btn-outline-danger" if @project.reports.none? %>
</div>

View file

@ -0,0 +1 @@
json.partial! "projects/project", project: @project