initial commit

This commit is contained in:
Stefan Tollkühn
2025-07-21 12:14:42 +02:00
parent a77fc87832
commit 3735122750
156 changed files with 3862 additions and 1 deletions

View File

@@ -0,0 +1,42 @@
<%= form_with(model: subproject) do |form| %>
<% if subproject.errors.any? %>
<div style="color: red">
<h2><%= pluralize(subproject.errors.count, "error") %> prohibited this subproject from being saved:</h2>
<ul>
<% subproject.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
</div>
<% end %>
<div>
<%= form.label :subproject_name, style: "display: block" %>
<%= form.text_field :subproject_name %>
</div>
<div>
<%= form.label :project_id, style: "display: block" %>
<%= form.text_field :project_id %>
</div>
<div>
<%= form.label :client_id, style: "display: block" %>
<%= form.text_field :client_id %>
</div>
<div>
<%= form.label :owner_id, style: "display: block" %>
<%= form.text_field :owner_id %>
</div>
<div>
<%= form.label :builder_id, style: "display: block" %>
<%= form.text_field :builder_id %>
</div>
<div>
<%= form.submit %>
</div>
<% end %>

View File

@@ -0,0 +1,27 @@
<div id="<%= dom_id subproject %>">
<p>
<strong>Subproject name:</strong>
<%= subproject.subproject_name %>
</p>
<p>
<strong>Project:</strong>
<%= subproject.project_id %>
</p>
<p>
<strong>Client:</strong>
<%= subproject.client_id %>
</p>
<p>
<strong>Owner:</strong>
<%= subproject.owner_id %>
</p>
<p>
<strong>Builder:</strong>
<%= subproject.builder_id %>
</p>
</div>

View File

@@ -0,0 +1,2 @@
json.extract! subproject, :id, :subproject_name, :project_id, :client_id, :owner_id, :builder_id, :created_at, :updated_at
json.url subproject_url(subproject, format: :json)

View File

@@ -0,0 +1,12 @@
<% content_for :title, "Editing subproject" %>
<h1>Editing subproject</h1>
<%= render "form", subproject: @subproject %>
<br>
<div>
<%= link_to "Show this subproject", @subproject %> |
<%= link_to "Back to subprojects", subprojects_path %>
</div>

View File

@@ -0,0 +1,16 @@
<p style="color: green"><%= notice %></p>
<% content_for :title, "Subprojects" %>
<h1>Subprojects</h1>
<div id="subprojects">
<% @subprojects.each do |subproject| %>
<%= render subproject %>
<p>
<%= link_to "Show this subproject", subproject %>
</p>
<% end %>
</div>
<%= link_to "New subproject", new_subproject_path %>

View File

@@ -0,0 +1 @@
json.array! @subprojects, partial: "subprojects/subproject", as: :subproject

View File

@@ -0,0 +1,11 @@
<% content_for :title, "New subproject" %>
<h1>New subproject</h1>
<%= render "form", subproject: @subproject %>
<br>
<div>
<%= link_to "Back to subprojects", subprojects_path %>
</div>

View File

@@ -0,0 +1,10 @@
<p style="color: green"><%= notice %></p>
<%= render @subproject %>
<div>
<%= link_to "Edit this subproject", edit_subproject_path(@subproject) %> |
<%= link_to "Back to subprojects", subprojects_path %>
<%= button_to "Destroy this subproject", @subproject, method: :delete %>
</div>

View File

@@ -0,0 +1 @@
json.partial! "subprojects/subproject", subproject: @subproject