wip: wcag structure
Some checks failed
/ Run tests (push) Successful in 7m57s
/ Run system tests (push) Failing after 4m18s
/ Build, push and deploy image (push) Failing after 59s

This commit is contained in:
david 2025-05-16 19:02:33 +02:00
parent 4c31dbbed0
commit 4dd445be57
48 changed files with 461 additions and 137 deletions

View file

@ -0,0 +1,7 @@
<%= bootstrap_form_with(model: guideline) do |form| %>
<%= form.collection_select :principle_id, Principle.all.sort_by(&:id), :id, :t_name %>
<%= form.number_field :number %>
<%= form.text_field :name_de %>
<%= form.rich_text_area :description_de %>
<%= form.submit %>
<% end %>

View file

@ -0,0 +1,15 @@
<div id="<%= dom_id guideline %>">
<p>
<strong>Principle:</strong>
<%= guideline.principle.t_name %>
</p>
<%= guideline.description_de %>
<h2 class="mt-4">Richtlinien</h2>
<% guideline.checks.each do |check| %>
<section class="pt-3">
<h3 class="fs-5"><%= link_to check %></h3>
<%= check.t_criterion %>
</section>
<% end %>
</div>

View file

@ -0,0 +1,2 @@
json.extract! guideline, :id, :principle_id, :number, :name_de, :created_at, :updated_at
json.url guideline_url(guideline, format: :json)

View file

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

View file

@ -0,0 +1,28 @@
<h1><%= t("scaffold.pagetitle_index", model: Guideline.model_name.human(count: 2)) %></h1>
<table class="table table-striped">
<thead>
<tr>
<th><%= Guideline.human_attribute_name(:name_de) %></th>
<th><%= Guideline.human_attribute_name(:description_de) %></th>
</thead>
<tbody>
<% @guidelines.each do |guideline| %>
<tr>
<td><%= link_to(guideline, url_for(guideline)) %></td>
<td><%= link_to(guideline.description_de, url_for(guideline)) %></td>
</tr>
<% end %>
</tbody>
</table>
<div class="action-row">
<%= link_to t("scaffold.link_new", model: Guideline.model_name.human), new_guideline_path %>
</div>

View file

@ -0,0 +1 @@
json.array! @guidelines, partial: "guidelines/guideline", as: :guideline

View file

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

View file

@ -0,0 +1,9 @@
<h1><%= @guideline %></h1>
<%= render @guideline %>
<div class="action-row">
<%= link_to t("scaffold.link_edit", model: @guideline.model_name.human), edit_guideline_path(@guideline) %>
<%= link_to t("scaffold.link_index", model: @guideline.model_name.human(count: 2)), guidelines_path %>
<%= button_to t("scaffold.link_destroy", model: @guideline.model_name.human), @guideline, method: :delete, class: "btn btn-outline-danger" %>
</div>

View file

@ -0,0 +1 @@
json.partial! "guidelines/guideline", guideline: @guideline