start of iteration 2
This commit is contained in:
parent
9fb87a74ce
commit
729ed13521
75 changed files with 705 additions and 170 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -42,3 +42,4 @@
|
|||
.~lock*
|
||||
.build_version
|
||||
/core*
|
||||
.ruby-lsp/*
|
||||
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
|
|
@ -10,7 +10,7 @@
|
|||
// "name": "Attach to a debuggee"
|
||||
// },
|
||||
{
|
||||
"type": "rdbg",
|
||||
"type": "ruby_lsp",
|
||||
"name": "Debug server",
|
||||
"request": "attach",
|
||||
"preLaunchTask": "dev"
|
||||
|
|
|
|||
1
.vscode/tasks.json
vendored
1
.vscode/tasks.json
vendored
|
|
@ -17,6 +17,7 @@
|
|||
"command": "dev",
|
||||
"label": "dev",
|
||||
"isBackground": true,
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
1
Gemfile
1
Gemfile
|
|
@ -77,6 +77,7 @@ group :development do
|
|||
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
|
||||
# gem "spring"
|
||||
gem "brakeman"
|
||||
gem "html2slim"
|
||||
gem "rubocop"
|
||||
gem "rubocop-capybara"
|
||||
gem "rubocop-rails"
|
||||
|
|
|
|||
20
Gemfile.lock
20
Gemfile.lock
|
|
@ -128,6 +128,9 @@ GEM
|
|||
ffi (1.17.0-x86_64-linux-gnu)
|
||||
globalid (1.2.1)
|
||||
activesupport (>= 6.1)
|
||||
hpricot (0.8.6)
|
||||
html2slim (0.2.0)
|
||||
hpricot
|
||||
htmlentities (4.3.4)
|
||||
i18n (1.14.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
|
|
@ -145,7 +148,7 @@ GEM
|
|||
railties (>= 6.0.0)
|
||||
json (2.7.2)
|
||||
language_server-protocol (3.17.0.3)
|
||||
logger (1.6.0)
|
||||
logger (1.6.1)
|
||||
loofah (2.22.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.12.0)
|
||||
|
|
@ -216,7 +219,7 @@ GEM
|
|||
prawn-table
|
||||
prawn-table (0.2.2)
|
||||
prawn (>= 1.3.0, < 3.0.0)
|
||||
prism (0.30.0)
|
||||
prism (1.2.0)
|
||||
psych (5.1.2)
|
||||
stringio
|
||||
public_suffix (6.0.0)
|
||||
|
|
@ -262,7 +265,7 @@ GEM
|
|||
zeitwerk (~> 2.6)
|
||||
rainbow (3.1.1)
|
||||
rake (13.2.1)
|
||||
rbs (3.5.2)
|
||||
rbs (3.6.1)
|
||||
logger
|
||||
rdoc (6.7.0)
|
||||
psych (>= 4.0.0)
|
||||
|
|
@ -317,13 +320,13 @@ GEM
|
|||
rubocop-minitest
|
||||
rubocop-performance
|
||||
rubocop-rails
|
||||
ruby-lsp (0.17.7)
|
||||
ruby-lsp (0.20.1)
|
||||
language_server-protocol (~> 3.17.0)
|
||||
prism (>= 0.29.0, < 0.31)
|
||||
prism (>= 1.2, < 2.0)
|
||||
rbs (>= 3, < 4)
|
||||
sorbet-runtime (>= 0.5.10782)
|
||||
ruby-lsp-rails (0.3.10)
|
||||
ruby-lsp (>= 0.17.2, < 0.18.0)
|
||||
ruby-lsp-rails (0.3.21)
|
||||
ruby-lsp (>= 0.20.0, < 0.21.0)
|
||||
ruby-progressbar (1.13.0)
|
||||
ruby-vips (2.2.1)
|
||||
ffi (~> 1.12)
|
||||
|
|
@ -347,7 +350,7 @@ GEM
|
|||
slim (5.2.1)
|
||||
temple (~> 0.10.0)
|
||||
tilt (>= 2.1.0)
|
||||
sorbet-runtime (0.5.11481)
|
||||
sorbet-runtime (0.5.11625)
|
||||
sprockets (4.2.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (>= 2.2.4, < 4)
|
||||
|
|
@ -411,6 +414,7 @@ DEPENDENCIES
|
|||
caxlsx_rails
|
||||
cssbundling-rails
|
||||
debug
|
||||
html2slim
|
||||
image_processing (~> 1.2)
|
||||
jbuilder
|
||||
jsbundling-rails
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ElementsController < ApplicationController
|
||||
before_action :set_page, only: %i[index new create]
|
||||
before_action :set_element, only: %i[show edit update destroy]
|
||||
|
||||
# GET /elements
|
||||
|
|
@ -13,7 +14,8 @@ class ElementsController < ApplicationController
|
|||
|
||||
# GET /elements/new
|
||||
def new
|
||||
@element = Element.new(report_id: params[:report_id])
|
||||
@element = Element.new(page_id: params[:page_id])
|
||||
@element.page = @page
|
||||
end
|
||||
|
||||
# GET /elements/1/edit
|
||||
|
|
@ -21,16 +23,20 @@ class ElementsController < ApplicationController
|
|||
|
||||
# POST /elements
|
||||
def create
|
||||
checklist_id = element_params.delete(:checklist_id)
|
||||
checklist = Checklist.find(checklist_id)
|
||||
# checklist_id = element_params.delete(:checklist_id)
|
||||
# checklist = Checklist.find(checklist_id)
|
||||
@element = Element.new(element_params)
|
||||
@element.title = checklist.name if @element.title.blank?
|
||||
@element.page = @page
|
||||
# @element.title = checklist.name if @element.title.blank?
|
||||
|
||||
if @element.save
|
||||
checklist.checks.each do |check|
|
||||
@element.success_criteria.create!(title: check.t_name, description_html: check.t_criterion,
|
||||
level: check.level)
|
||||
end
|
||||
# checklist.checks.each do |check|
|
||||
# @element.success_criteria.create!(
|
||||
# check:,
|
||||
# title: check.t_name,
|
||||
# level: check.conformity_level,
|
||||
# quick_criterion: check.t_quick_criterion)
|
||||
# end
|
||||
respond_to do |format|
|
||||
format.html { redirect_to @element.report, notice: "Element was successfully created." }
|
||||
format.turbo_stream
|
||||
|
|
@ -62,8 +68,12 @@ class ElementsController < ApplicationController
|
|||
@element = Element.find(params[:id])
|
||||
end
|
||||
|
||||
def set_page
|
||||
@page = Page.find(params[:page_id])
|
||||
end
|
||||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def element_params
|
||||
params.require(:element).permit(:report_id, :path, :title, :description_html, :checklist_id)
|
||||
params.require(:element).permit(:page_id, :title, :description)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
64
app/controllers/pages_controller.rb
Normal file
64
app/controllers/pages_controller.rb
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
class PagesController < ApplicationController
|
||||
before_action :set_page, only: %i[ show edit update destroy ]
|
||||
before_action :set_report, only: %i[ new create index ]
|
||||
|
||||
# GET /pages
|
||||
def index
|
||||
@pages = Page.all
|
||||
end
|
||||
|
||||
# GET /pages/1
|
||||
def show
|
||||
end
|
||||
|
||||
# GET /pages/new
|
||||
def new
|
||||
@page = Page.new
|
||||
@page.report = @report
|
||||
end
|
||||
|
||||
# GET /pages/1/edit
|
||||
def edit
|
||||
end
|
||||
|
||||
# POST /pages
|
||||
def create
|
||||
@page = Page.new(page_params)
|
||||
@page.report = @report
|
||||
if @page.save
|
||||
redirect_to [ @page.report, page_id: @page.id ], notice: "Page was successfully created."
|
||||
else
|
||||
render :new, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
||||
# PATCH/PUT /pages/1
|
||||
def update
|
||||
if @page.update(page_params)
|
||||
redirect_to @page, notice: "Page was successfully updated.", status: :see_other
|
||||
else
|
||||
render :edit, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
||||
# DELETE /pages/1
|
||||
def destroy
|
||||
@page.destroy!
|
||||
redirect_to pages_url, notice: "Page was successfully destroyed.", status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_page
|
||||
@page = Page.find(params[:id])
|
||||
end
|
||||
|
||||
def set_report
|
||||
@report = Report.find(params[:report_id])
|
||||
end
|
||||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def page_params
|
||||
params.require(:page).permit(:position, :path, :url, :report_id)
|
||||
end
|
||||
end
|
||||
|
|
@ -11,7 +11,9 @@ class ReportsController < ApplicationController
|
|||
# GET /reports/1
|
||||
def show
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.html do
|
||||
@current_page = page_param && @report.pages.find(page_param) || @report.pages.first
|
||||
end
|
||||
format.pdf
|
||||
format.xlsx do
|
||||
response.headers["Content-Disposition"] = %(attachment; filename="#{filename(@report, extension: 'xlsx')}")
|
||||
|
|
@ -35,7 +37,7 @@ class ReportsController < ApplicationController
|
|||
format.docx do
|
||||
send_file(Docx::Document.new.generate do |document|
|
||||
document.heading1(@report.name)
|
||||
document.paragraph(@report.comment_html)
|
||||
document.paragraph(@report.comment)
|
||||
# document.heading1("slfkj")
|
||||
# document.paragraph("sldkfj")
|
||||
@report.elements.each do |element|
|
||||
|
|
@ -127,10 +129,14 @@ class ReportsController < ApplicationController
|
|||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def report_params
|
||||
params.require(:report).permit(:name, :comment_html)
|
||||
params.require(:report).permit(:name, :comment)
|
||||
end
|
||||
|
||||
def filename(report, extension: "html")
|
||||
"#{report.name}-#{Time.current.strftime('%Y%m%d%H%M')}.#{extension}"
|
||||
end
|
||||
|
||||
def page_param
|
||||
params[:page_id]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class SuccessCriteriaController < ApplicationController
|
||||
before_action :set_element, only: %i[new create index new_from_checklist create_from_checklist]
|
||||
before_action :set_success_criterion, only: %i[show edit update destroy]
|
||||
|
||||
# GET /success_criteria
|
||||
|
|
@ -13,7 +14,7 @@ class SuccessCriteriaController < ApplicationController
|
|||
|
||||
# GET /success_criteria/new
|
||||
def new
|
||||
@success_criterion = SuccessCriterion.new
|
||||
@success_criterion = SuccessCriterion.new(element: @element)
|
||||
end
|
||||
|
||||
# GET /success_criteria/1/edit
|
||||
|
|
@ -21,11 +22,26 @@ class SuccessCriteriaController < ApplicationController
|
|||
|
||||
# POST /success_criteria
|
||||
def create
|
||||
@success_criterion = SuccessCriterion.new(success_criterion_params)
|
||||
check_id = success_criterion_params.delete(:check_id)
|
||||
check = Check.find(check_id)
|
||||
merge_params = {
|
||||
element: @element,
|
||||
title: check.name_de,
|
||||
quick_criterion: check.quick_criterion_de,
|
||||
quick_fail: check.quick_fail_de,
|
||||
quick_fix: check.quick_fix_de
|
||||
}
|
||||
@success_criterion = SuccessCriterion.new(success_criterion_params.merge(merge_params))
|
||||
|
||||
if @success_criterion.save
|
||||
redirect_to @success_criterion, notice: "Erfolgskriterium was successfully created."
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
redirect_to @success_criterion, notice: "Erfolgskriterium was successfully created."
|
||||
end
|
||||
format.turbo_stream
|
||||
end
|
||||
else
|
||||
Rails.logger.debug(@success_criterion.errors)
|
||||
render :new, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
|
@ -50,6 +66,38 @@ class SuccessCriteriaController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def new_from_checklist
|
||||
@success_criterion = SuccessCriterion.new(element: @element)
|
||||
end
|
||||
|
||||
def create_from_checklist
|
||||
checklist = Checklist.find(params[:checklist_id])
|
||||
success = false
|
||||
SuccessCriterion.transaction do
|
||||
@success_criteria = checklist.checks.map do |check|
|
||||
SuccessCriterion.create!(check:,
|
||||
element: @element,
|
||||
title: check.name_de,
|
||||
quick_criterion: check.quick_criterion_de,
|
||||
quick_fail: check.quick_fail_de,
|
||||
quick_fix: check.quick_fix_de,
|
||||
level: check.conformity_level)
|
||||
end
|
||||
success = true
|
||||
end
|
||||
if success
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
redirect_to @success_criteria.first.element, notice: "Erfolgskriterium was successfully created."
|
||||
end
|
||||
format.turbo_stream
|
||||
end
|
||||
else
|
||||
Rails.logger.debug(@success_criterion.errors)
|
||||
render :new, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
|
|
@ -59,6 +107,10 @@ class SuccessCriteriaController < ApplicationController
|
|||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def success_criterion_params
|
||||
params.require(:success_criterion).permit(:element_id, :title, :description_html, :level, :result, :comment_html)
|
||||
params.require(:success_criterion).permit(:element_id, :title, :quick_criterion, :quick_fail, :quick_fix, :priority, :level, :result, :test_comment, :check_id)
|
||||
end
|
||||
|
||||
def set_element
|
||||
@element = Element.find(params[:element_id])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
2
app/helpers/pages_helper.rb
Normal file
2
app/helpers/pages_helper.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
module PagesHelper
|
||||
end
|
||||
|
|
@ -1,14 +1,12 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Element < ApplicationRecord
|
||||
attr_accessor :checklist_id
|
||||
has_rich_text :description
|
||||
|
||||
has_rich_text :description_html
|
||||
|
||||
belongs_to :report, touch: true
|
||||
belongs_to :page, touch: true
|
||||
has_many :success_criteria, dependent: :destroy
|
||||
|
||||
validates :path, :title, presence: true
|
||||
delegate :report, to: :page
|
||||
|
||||
# Calculate actual conformity level:
|
||||
# - if a success_criterion has result :failed -> the confirmity_level
|
||||
|
|
|
|||
6
app/models/page.rb
Normal file
6
app/models/page.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class Page < ApplicationRecord
|
||||
belongs_to :report
|
||||
has_many :elements
|
||||
|
||||
has_rich_text :comment
|
||||
end
|
||||
|
|
@ -11,7 +11,7 @@ module PdfDocuments
|
|||
} ], align: :right
|
||||
|
||||
heading1 params.report.name
|
||||
rich_text params.report.comment_html
|
||||
rich_text params.report.comment
|
||||
|
||||
params.report.elements.each.with_index(1) do |element, element_index|
|
||||
heading2 "#{element_index} #{element.title}"
|
||||
|
|
@ -22,7 +22,7 @@ module PdfDocuments
|
|||
element.success_criteria.each.with_index(1) do |success_criterion, sc_index|
|
||||
heading3 "#{element_index}.#{sc_index} #{success_criterion.title}"
|
||||
rich_text success_criterion.description_html
|
||||
rich_text success_criterion.comment_html
|
||||
rich_text success_criterion.comment
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Report < ApplicationRecord
|
||||
has_rich_text :comment_html
|
||||
has_many :pages, dependent: :destroy
|
||||
has_many :elements, through: :pages, dependent: :destroy
|
||||
has_rich_text :comment
|
||||
|
||||
has_many :elements, dependent: :destroy
|
||||
|
||||
validates :name, presence: true
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,17 +1,26 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class SuccessCriterion < ApplicationRecord
|
||||
belongs_to :element, touch: true
|
||||
belongs_to :check, optional: true
|
||||
|
||||
has_rich_text :test_comment
|
||||
has_rich_text :quick_criterion
|
||||
has_rich_text :quick_fail
|
||||
has_rich_text :quick_fix
|
||||
|
||||
delegate :page, :report, to: :element
|
||||
|
||||
enum :result, %i[passed failed not_applicable]
|
||||
enum :level, %i[A AA AAA]
|
||||
|
||||
has_rich_text :comment_html
|
||||
has_rich_text :description_html
|
||||
|
||||
belongs_to :element, touch: true
|
||||
|
||||
def level_value
|
||||
return nil unless level
|
||||
|
||||
self.class.levels.values.index_of(level)
|
||||
end
|
||||
|
||||
def header
|
||||
"HEADER"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<h1><i class="bi bi-card-checklist me-2"></i><%= "#{@checklist.name}" %></h1>
|
||||
<h1><i class="bi bi-boxes me-2"></i><%= "#{@checklist.name}" %></h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-12 col-lg-8">
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
<div id="<%= dom_id element %>" class="mt-4 border-top pt-3">
|
||||
<div id="<%= dom_id element %>" class="<%= "mt-5" unless element == element.page.elements.first %>">
|
||||
<%= turbo_frame_tag dom_id(element, :frame) do %>
|
||||
<div class="d-flex">
|
||||
<h2 class="h4">
|
||||
<i class="bi bi-card-checklist">
|
||||
<i class="bi bi-boxes">
|
||||
</i>
|
||||
<%= element.title %>
|
||||
<div class="badge text-bg-secondary">
|
||||
<%= element.path %>
|
||||
</div>
|
||||
</h2>
|
||||
<%= link_to [:edit, element], class: "btn btn-link text-secondary" do %>
|
||||
<i class="bi bi-pencil">
|
||||
|
|
@ -16,17 +13,23 @@
|
|||
</div>
|
||||
<div class="">
|
||||
|
||||
<%= element.description_html %>
|
||||
<%= element.description %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% element.success_criteria.each do |sc| %>
|
||||
<%= turbo_frame_tag(dom_id(sc, :frame)) do %>
|
||||
<div id="<%= dom_id(element, :success_criteria_list) %>">
|
||||
<% element.success_criteria.each do |sc| %>
|
||||
<%= render sc %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if element.success_criteria.none? %>
|
||||
<p><i>Es sind (noch) keine Erfolgskriterien definiert.</i></p>
|
||||
<% end %>
|
||||
<% if element.success_criteria.none? %>
|
||||
<p><i>Es sind (noch) keine Erfolgskriterien definiert.</i></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="pt-3">
|
||||
<%= turbo_frame_tag dom_id(element, "new_success_criterion_frame") do %>
|
||||
<%= render partial: "elements/new_success_criterion_button", locals: { element: element } %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,7 @@
|
|||
<%= bootstrap_form_with(model: element, data: element.persisted? || { turbo_frame: "_top" }) do |form| %>
|
||||
<%= form.hidden_field :report_id %>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<%= form.text_field :path %>
|
||||
</div>
|
||||
<div class="col">
|
||||
<%= form.collection_select(:checklist_id, Checklist.all, :id, :name) %>
|
||||
</div>
|
||||
</div>
|
||||
<%= bootstrap_form_with(model: element.persisted? ? element : [:page, element], data: element.persisted? || { turbo_frame: "_top" }) do |form| %>
|
||||
<%= form.hidden_field :page_id %>
|
||||
<%= form.text_field :title %>
|
||||
<%= form.rich_text_area :description_html %>
|
||||
<%= form.rich_text_area :description %>
|
||||
<%= form.submit class: "btn btn-warning" %>
|
||||
<%= link_to("Abbrechen", element.report, class: "btn btn-outline-secondary") %>
|
||||
<%= link_to("Abbrechen", element.persisted? ? element : element.report, class: "btn btn-outline-secondary") %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Neue Checkliste".html_safe, new_from_checklist_element_success_criteria_path(element), class: "btn btn-primary" %>
|
||||
|
||||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Neues Erfolgskriterium".html_safe, new_element_success_criterion_path(element), class: "btn btn-primary" %>
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
<%= turbo_stream.update "new_element_frame", partial: "reports/new_element_button", locals: { report: @element.report } %>
|
||||
<%= turbo_stream.update "new_element_frame", partial: "pages/new_element_button", locals: { page: @element.page } %>
|
||||
<%= turbo_stream.append "element_list", @element %>
|
||||
|
|
@ -4,13 +4,9 @@
|
|||
<div>
|
||||
<div class="d-flex">
|
||||
<h2 class="h3">
|
||||
<i class="bi bi-card-checklist">
|
||||
<i class="bi bi-boxes">
|
||||
</i>
|
||||
<%= @element.title %>
|
||||
<div class="badge text-bg-secondary">
|
||||
<%= @element.path %>
|
||||
</div>
|
||||
</h2>
|
||||
<%= link_to(tag.i(class: "bi bi-pencil"), @element, class: "btn btn-link text-warning") %>
|
||||
</div>
|
||||
<%= render "form", element: @element %>
|
||||
|
|
@ -19,5 +15,5 @@
|
|||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_show", model: Element.model_name.human), @element %>
|
||||
<%= link_to t("scaffold.link_index", model: Element.model_name.human(count: 2)), elements_path %>
|
||||
<%= link_to t("scaffold.link_index", model: Element.model_name.human(count: 2)), page_elements_path(@element.page) %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,11 +2,10 @@
|
|||
|
||||
<%= turbo_frame_tag "new_element_frame" do %>
|
||||
<div class="border border-info p-3">
|
||||
<h2><i class="bi bi-card-checklist me-2"></i>Neues Element</h2>
|
||||
<%= render "form", element: @element %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_index", model: Element.model_name.human(count: 2)), elements_path %>
|
||||
<%= link_to t("scaffold.link_index", model: Element.model_name.human(count: 2)), page_elements_path %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_edit", model: @element.model_name.human), edit_element_path(@element) %>
|
||||
<%= link_to t("scaffold.link_index", model: @element.model_name.human(count: 2)), elements_path %>
|
||||
<%= link_to t("scaffold.link_index", model: @element.model_name.human(count: 2)), page_elements_path(@element.page) %>
|
||||
<%= button_to t("scaffold.link_destroy", model: @element.model_name.human), @element, method: :delete, class: "btn btn-outline-danger" %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -17,10 +17,13 @@
|
|||
<div class="row">
|
||||
<%= render partial: "layouts/sidebar" %>
|
||||
<main class="col ps-md-2 pt-2 <%= "border-start" if sidebar? %>">
|
||||
<div class="container">
|
||||
<div class="container-fluid">
|
||||
<%= render partial: "layouts/flash" %>
|
||||
<% if false && sidebar? %>
|
||||
<a href="#" data-bs-target="#sidebar" data-bs-toggle="collapse" class="p-1 text-decoration-none"><i class="bi bi-list bi-lg py-2 p-1"></i> Menu</a>
|
||||
<a href="#" data-bs-target="#sidebar" data-bs-toggle="collapse" class="p-1 text-decoration-none">
|
||||
<i class="bi bi-list bi-lg py-2 p-1"></i>
|
||||
Menu
|
||||
</a>
|
||||
<% end %>
|
||||
|
||||
<div id="main-content" data-controller="rich-text-link-targets">
|
||||
|
|
|
|||
6
app/views/pages/_form.html.erb
Normal file
6
app/views/pages/_form.html.erb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<%= bootstrap_form_with(model: [:report, page], data: { turbo: false }) do |form| %>
|
||||
<%= form.text_field :path %>
|
||||
<%= form.text_field :url %>
|
||||
<%# <%= form.rich_text_area :comment %>
|
||||
<%= form.submit %>
|
||||
<% end %>
|
||||
1
app/views/pages/_new_element_button.html.erb
Normal file
1
app/views/pages/_new_element_button.html.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Neues Element".html_safe, new_page_element_path(page_id: page.id), class: "btn btn-primary" %>
|
||||
13
app/views/pages/_page.html.erb
Normal file
13
app/views/pages/_page.html.erb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<div id="<%= dom_id page %>">
|
||||
<div id="element_list">
|
||||
<% page.elements.each do |element| %>
|
||||
<%= render element %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="pt-3">
|
||||
<%= turbo_frame_tag "new_element_frame" do %>
|
||||
<%= render partial: "pages/new_element_button", locals: { page: page } %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
2
app/views/pages/_page.json.jbuilder
Normal file
2
app/views/pages/_page.json.jbuilder
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
json.extract! page, :id, :position, :path, :url, :report_id, :created_at, :updated_at
|
||||
json.url page_url(page, format: :json)
|
||||
8
app/views/pages/edit.html.erb
Normal file
8
app/views/pages/edit.html.erb
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<h1><%= t("scaffold.pagetitle_edit", model: Page.model_name.human) %></h1>
|
||||
|
||||
<%= render "form", page: @page %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_show", model: Page.model_name.human), @page %>
|
||||
<%= link_to t("scaffold.link_index", model: Page.model_name.human(count: 2)), report_pages_path(@page.report) %>
|
||||
</div>
|
||||
37
app/views/pages/index.html.erb
Normal file
37
app/views/pages/index.html.erb
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<h1><%= t("scaffold.pagetitle_index", model: Page.model_name.human(count: 2)) %></h1>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= Page.human_attribute_name(:id) %></th>
|
||||
|
||||
<th><%= Page.human_attribute_name(:position) %></th>
|
||||
|
||||
<th><%= Page.human_attribute_name(:path) %></th>
|
||||
|
||||
<th><%= Page.human_attribute_name(:url) %></th>
|
||||
|
||||
<th><%= Page.human_attribute_name(:report_id) %></th>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @pages.each do |page| %>
|
||||
<tr>
|
||||
<td><%= link_to(page.id, url_for(page)) %></td>
|
||||
|
||||
<td><%= link_to(page.position, url_for(page)) %></td>
|
||||
|
||||
<td><%= link_to(page.path, url_for(page)) %></td>
|
||||
|
||||
<td><%= link_to(page.url, url_for(page)) %></td>
|
||||
|
||||
<td><%= link_to(page.report_id, url_for(page)) %></td>
|
||||
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_new", model: Page.model_name.human), new_report_page_path(@report) %>
|
||||
</div>
|
||||
1
app/views/pages/index.json.jbuilder
Normal file
1
app/views/pages/index.json.jbuilder
Normal file
|
|
@ -0,0 +1 @@
|
|||
json.array! @pages, partial: "pages/page", as: :page
|
||||
12
app/views/pages/new.html.erb
Normal file
12
app/views/pages/new.html.erb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<h1><%= t("scaffold.pagetitle_new", model: Page.model_name.human) %></h1>
|
||||
|
||||
<%= turbo_frame_tag "new_page_frame" do %>
|
||||
<div class="border border-info p-3">
|
||||
<%= render "form", page: @page %>
|
||||
<%= link_to "Abbrechen", report_path(@page.report) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_index", model: Page.model_name.human(count: 2)), report_pages_path(@page.report) %>
|
||||
</div>
|
||||
9
app/views/pages/show.html.erb
Normal file
9
app/views/pages/show.html.erb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<h1><%= t("scaffold.pagetitle_show", model: @page.class.model_name.human) %></h1>
|
||||
|
||||
<%= render @page %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_edit", model: @page.model_name.human), edit_page_path(@page) %>
|
||||
<%= link_to t("scaffold.link_index", model: @page.model_name.human(count: 2)), report_pages_path(@page.report) %>
|
||||
<%= button_to t("scaffold.link_destroy", model: @page.model_name.human), @page, method: :delete, class: "btn btn-outline-danger" %>
|
||||
</div>
|
||||
1
app/views/pages/show.json.jbuilder
Normal file
1
app/views/pages/show.json.jbuilder
Normal file
|
|
@ -0,0 +1 @@
|
|||
json.partial! "pages/page", page: @page
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<%= bootstrap_form_with(model: report) do |form| %>
|
||||
<%= form.text_field :name %>
|
||||
<%= form.rich_text_area :comment_html %>
|
||||
<%= form.rich_text_area :comment %>
|
||||
<%= form.submit %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Neues Element".html_safe, new_element_path(report_id: report.id), class: "btn btn-primary" %>
|
||||
1
app/views/reports/_new_page_button.html.erb
Normal file
1
app/views/reports/_new_page_button.html.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Neuer Pfad".html_safe, new_report_page_path(report), class: "btn btn-primary" %>
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<p>
|
||||
<strong>Comment:</strong>
|
||||
<%= report.comment_html %>
|
||||
<%= report.comment %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
json.extract! report, :id, :name, :comment_html, :created_at, :updated_at
|
||||
json.extract! report, :id, :name, :comment, :created_at, :updated_at
|
||||
json.url report_url(report, format: :json)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<th><%= Report.human_attribute_name(:name) %></th>
|
||||
|
||||
<th><%= Report.human_attribute_name(:comment_html) %></th>
|
||||
<th><%= Report.human_attribute_name(:comment) %></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</thead>
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<td><%= link_to(report.name, url_for(report)) %></td>
|
||||
|
||||
<td><%= link_to(truncate(report.comment_html.to_plain_text), url_for(report)) if report.comment_html %></td>
|
||||
<td><%= link_to(truncate(report.comment.to_plain_text), url_for(report)) if report.comment %></td>
|
||||
<td><%= l(report.created_at, format: :short) %></td>
|
||||
<td><%= l(report.updated_at, format: :short) %></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -4,22 +4,22 @@
|
|||
zuletzt bearbeitet am <%= l(@report.updated_at, format: :short) %>
|
||||
</p>
|
||||
|
||||
<% if @report.comment_html %>
|
||||
<% if @report.comment %>
|
||||
<div class="mt-2 mb-4 lead">
|
||||
<%= @report.comment_html %>
|
||||
<%= @report.comment %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="border-top pt-3">
|
||||
<%= turbo_frame_tag "new_element_frame" do %>
|
||||
<%= render partial: "reports/new_element_button", locals: { report: @report } %>
|
||||
<%= turbo_frame_tag "new_page_frame" do %>
|
||||
<%= render partial: "reports/new_page_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 %>
|
||||
<div id="page_list">
|
||||
<% @report.pages.each do |page| %>
|
||||
<%= turbo_frame_tag dom_id(page, :frame) do %>
|
||||
<%= render page %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
47
app/views/reports/show.html.slim
Normal file
47
app/views/reports/show.html.slim
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
h1
|
||||
i.bi.bi-journal-text.me-2
|
||||
= @report.name
|
||||
p.small
|
||||
| Erstellt am
|
||||
= l(@report.created_at, format: :short)
|
||||
| , zuletzt bearbeitet am
|
||||
= l(@report.updated_at, format: :short)
|
||||
- if @report.comment
|
||||
.mt-2.mb-4.lead
|
||||
= @report.comment
|
||||
= turbo_frame_tag "nav" do
|
||||
.row
|
||||
.col-lg-3.col-md-6.col-sm-12
|
||||
nav.nav.nav-pills.flex-column.mb-3#page_list
|
||||
- @report.pages.each do |page|
|
||||
= link_to(page.path, report_path(@report, page_id: page.id), class: "nav-link#{@current_page&.id == page.id ? " active" : nil }")
|
||||
= turbo_frame_tag "new_page_frame" do
|
||||
= render partial: "reports/new_page_button", locals: { report: @report }
|
||||
.col-lg-9.col-md-6.col-sm-12
|
||||
- if @current_page
|
||||
= render @current_page
|
||||
- else
|
||||
'Gehen Sie weiter, hier gibt es nichts zu sehen.
|
||||
.action-row
|
||||
= link_to report_path(@report, format: :pdf), class: "btn btn-secondary", target: "_blank" do
|
||||
i.bi.bi-filetype-pdf
|
||||
| PDF
|
||||
= link_to report_path(@report, format: :docx), class: "btn btn-secondary", target: "_blank" do
|
||||
i.bi.bi-filetype-docx
|
||||
| DOCX
|
||||
= link_to report_path(@report, format: :xlsx), class: "btn btn-secondary", target: "_blank" do
|
||||
i.bi.bi-filetype-xlsx
|
||||
| XLSX
|
||||
= link_to report_path(@report, format: :rtf), class: "btn btn-secondary", target: "_blank" do
|
||||
i.bi.bi-file-richtext
|
||||
| RTF
|
||||
= link_to report_path(@report, format: :xml), class: "btn btn-secondary", target: "_blank" do
|
||||
i.bi.bi-filetype-html
|
||||
| HTML
|
||||
= link_to report_path(@report, format: :odt), class: "btn btn-secondary", target: "_blank" do
|
||||
i.bi.bi-file-richtext
|
||||
| ODT
|
||||
.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"
|
||||
|
|
@ -8,9 +8,9 @@
|
|||
zuletzt bearbeitet am <%= l(@report.updated_at, format: :short) %>
|
||||
</small>
|
||||
|
||||
<% if @report.comment_html %>
|
||||
<% if @report.comment %>
|
||||
<div>
|
||||
<%= @report.comment_html %>
|
||||
<%= @report.comment %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
zuletzt bearbeitet am <%= l(@report.updated_at, format: :short) %>
|
||||
</p>
|
||||
|
||||
<% if @report.comment_html %>
|
||||
<% if @report.comment %>
|
||||
<div class="mt-2 mb-4 lead">
|
||||
<%= @report.comment_html %>
|
||||
<%= @report.comment %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="border-top pt-3">
|
||||
<div class="pt-3">
|
||||
<%= turbo_frame_tag "new_element_frame" do %>
|
||||
<%= render partial: "reports/new_element_button", locals: { report: @report } %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div class="collapse show" id="collapseSuccessCriterion_<%= success_criterion.id %>">
|
||||
<div class="card-body">
|
||||
<%= bootstrap_form_with(model: success_criterion) do |form| %>
|
||||
<%= bootstrap_form_with(model: success_criterion.persisted? ? success_criterion : [:element, success_criterion]) do |form| %>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="btn-group" role="group" aria-label="Resultat">
|
||||
|
|
@ -28,11 +28,13 @@
|
|||
<%= form.select :level, SuccessCriterion.levels.keys, hide_label: true %>
|
||||
</div>
|
||||
</div>
|
||||
<%= form.rich_text_area :comment_html %>
|
||||
<%= form.text_field :title %>
|
||||
<%= form.rich_text_area :description_html %>
|
||||
<%= form.rich_text_area :quick_criterion %>
|
||||
<%= form.rich_text_area :quick_fail %>
|
||||
<%= form.rich_text_area :quick_fix %>
|
||||
<%= form.rich_text_area :test_comment %>
|
||||
<%= form.submit class: "btn btn-warning" %>
|
||||
<%= link_to "Abbrechen", success_criterion, class: "btn btn-outline-secondary" %>
|
||||
<%= link_to "Abbrechen", success_criterion.persisted? ? success_criterion : success_criterion.element, class: "btn btn-outline-secondary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<span class="badge rounded-pill text-bg-secondary">
|
||||
<%= success_criterion.level %>
|
||||
</span>
|
||||
<% if success_criterion.comment_html.present? %>
|
||||
<% if success_criterion.test_comment.present? %>
|
||||
<i class="bi bi-chat"></i>
|
||||
<% end %>
|
||||
<% if false && action_name == "edit" %>
|
||||
|
|
|
|||
|
|
@ -1,35 +1,39 @@
|
|||
<% expanded = false unless defined?(expanded) %>
|
||||
<div id="<%= dom_id success_criterion %>" class="card mt-3">
|
||||
<%== render partial: "success_criteria/header", locals: {success_criterion: success_criterion } %>
|
||||
<%= turbo_frame_tag(dom_id(success_criterion, :frame)) do %>
|
||||
<% expanded = false unless defined?(expanded) %>
|
||||
<div id="<%= dom_id success_criterion %>" class="card mt-3">
|
||||
<%== render partial: "success_criteria/header", locals: {success_criterion: success_criterion } %>
|
||||
|
||||
<div class="collapse<%= " show" if expanded %>" id="collapseSuccessCriterion_<%= success_criterion.id %>">
|
||||
<div class="card-body">
|
||||
<%= bootstrap_form_with(model: success_criterion, data: { controller: "autosubmit" }) do |form| %>
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<div class="btn-group" role="group" aria-label="Resultat">
|
||||
<%= form.radio_button_without_bootstrap :result, :passed, class: "btn-check", autocomplete: "off", id: dom_id(success_criterion, :result_passed) %>
|
||||
<label class="btn btn-outline-success" for="<%= dom_id(success_criterion, :result_passed) %>">
|
||||
Bestanden
|
||||
</label>
|
||||
<%= form.radio_button_without_bootstrap :result, :failed, class: "btn-check", autocomplete: "off", id: dom_id(success_criterion, :result_failed) %>
|
||||
<label class="btn btn-outline-danger" for="<%= dom_id(success_criterion, :result_failed) %>">
|
||||
Durchgefallen
|
||||
</label>
|
||||
<%= form.radio_button_without_bootstrap :result, :not_applicable, class: "btn-check", autocomplete: "off", id: dom_id(success_criterion, :result_not_applicable) %>
|
||||
<label class="btn btn-outline-secondary" for="<%= dom_id(success_criterion, :result_not_applicable) %>">
|
||||
Nicht anwendbar
|
||||
</label>
|
||||
<div class="collapse<%= " show" if expanded %>" id="collapseSuccessCriterion_<%= success_criterion.id %>">
|
||||
<div class="card-body">
|
||||
<%= bootstrap_form_with(model: success_criterion, data: { controller: "autosubmit" }) do |form| %>
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<div class="btn-group" role="group" aria-label="Resultat">
|
||||
<%= form.radio_button_without_bootstrap :result, :passed, class: "btn-check", autocomplete: "off", id: dom_id(success_criterion, :result_passed) %>
|
||||
<label class="btn btn-outline-success" for="<%= dom_id(success_criterion, :result_passed) %>">
|
||||
Bestanden
|
||||
</label>
|
||||
<%= form.radio_button_without_bootstrap :result, :failed, class: "btn-check", autocomplete: "off", id: dom_id(success_criterion, :result_failed) %>
|
||||
<label class="btn btn-outline-danger" for="<%= dom_id(success_criterion, :result_failed) %>">
|
||||
Durchgefallen
|
||||
</label>
|
||||
<%= form.radio_button_without_bootstrap :result, :not_applicable, class: "btn-check", autocomplete: "off", id: dom_id(success_criterion, :result_not_applicable) %>
|
||||
<label class="btn btn-outline-secondary" for="<%= dom_id(success_criterion, :result_not_applicable) %>">
|
||||
Nicht anwendbar
|
||||
</label>
|
||||
</div>
|
||||
<%# form.collection_select :result, SuccessCriterion.results.map{ |k, v| [k, t("activerecord.attributes.success_criterion.results/#{k}")] }, :first, :second, include_blank: true, hide_label: true %>
|
||||
<%# form.select :category, SuccessCriterion.categories.keys %>
|
||||
</div>
|
||||
<%# form.collection_select :result, SuccessCriterion.results.map{ |k, v| [k, t("activerecord.attributes.success_criterion.results/#{k}")] }, :first, :second, include_blank: true, hide_label: true %>
|
||||
<%# form.select :category, SuccessCriterion.categories.keys %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= success_criterion.description_html %>
|
||||
<% if success_criterion.comment_html.present? %>
|
||||
<div class="comment mt-3"><%= success_criterion.comment_html %></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= success_criterion.quick_criterion %>
|
||||
<%= success_criterion.quick_fail %>
|
||||
<%= success_criterion.quick_fix %>
|
||||
<% if success_criterion.test_comment.present? %>
|
||||
<div class="comment mt-3"><%= success_criterion.test_comment %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
json.extract! success_criterion, :id, :element_id, :title, :description_html, :level, :result, :comment_html,
|
||||
json.extract! success_criterion, :id, :element_id, :title, :description_html, :level, :result, :comment,
|
||||
:created_at, :updated_at
|
||||
json.url success_criterion_url(success_criterion, format: :json)
|
||||
|
|
|
|||
2
app/views/success_criteria/create.turbo_stream.erb
Normal file
2
app/views/success_criteria/create.turbo_stream.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<%= turbo_stream.update dom_id(@success_criterion.element, "new_success_criterion_frame"), partial: "elements/new_success_criterion_button", locals: { element: @success_criterion.element } %>
|
||||
<%= turbo_stream.append dom_id(@success_criterion.element, "success_criteria_list"), @success_criterion %>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<%= turbo_stream.update dom_id(@success_criteria.first.element, "new_success_criterion_frame"), partial: "elements/new_success_criterion_button", locals: { element: @success_criteria.first.element } %>
|
||||
|
||||
<% @success_criteria.each do |success_criterion| %>
|
||||
<%= turbo_stream.append dom_id(success_criterion.element, "success_criteria_list"), success_criterion %>
|
||||
<% end %>
|
||||
|
|
@ -6,5 +6,5 @@
|
|||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_show", model: SuccessCriterion.model_name.human), @success_criterion %>
|
||||
<%= link_to t("scaffold.link_index", model: SuccessCriterion.model_name.human(count: 2)), success_criteria_path %>
|
||||
<%= link_to t("scaffold.link_index", model: SuccessCriterion.model_name.human(count: 2)), element_success_criteria_path(@success_criterion.element) %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,13 +9,11 @@
|
|||
|
||||
<th><%= SuccessCriterion.human_attribute_name(:title) %></th>
|
||||
|
||||
<th><%= SuccessCriterion.human_attribute_name(:description_html) %></th>
|
||||
|
||||
<th><%= SuccessCriterion.human_attribute_name(:level) %></th>
|
||||
|
||||
<th><%= SuccessCriterion.human_attribute_name(:result) %></th>
|
||||
|
||||
<th><%= SuccessCriterion.human_attribute_name(:comment_html) %></th>
|
||||
<th><%= SuccessCriterion.human_attribute_name(:test_comment) %></th>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -27,13 +25,11 @@
|
|||
|
||||
<td><%= link_to(success_criterion.title, url_for(success_criterion)) %></td>
|
||||
|
||||
<td><%= link_to(truncate(success_criterion.description_html.to_plain_text), url_for(success_criterion)) %></td>
|
||||
|
||||
<td><%= link_to(success_criterion.level, url_for(success_criterion)) %></td>
|
||||
|
||||
<td><%= link_to(success_criterion.result, url_for(success_criterion)) %></td>
|
||||
|
||||
<td><%= link_to(truncate(success_criterion.comment_html.to_plain_text), url_for(success_criterion)) %></td>
|
||||
<td><%= link_to(truncate(success_criterion.test_comment.to_plain_text), url_for(success_criterion)) %></td>
|
||||
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
@ -41,5 +37,5 @@
|
|||
</table>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_new", model: SuccessCriterion.model_name.human), new_success_criterion_path %>
|
||||
<%= link_to t("scaffold.link_new", model: SuccessCriterion.model_name.human), new_element_success_criterion_path(@element) %>
|
||||
</div>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<h1><%= t("scaffold.pagetitle_new", model: SuccessCriterion.model_name.human) %></h1>
|
||||
|
||||
<%= render "form", success_criterion: @success_criterion %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_index", model: SuccessCriterion.model_name.human(count: 2)), success_criteria_path %>
|
||||
</div>
|
||||
21
app/views/success_criteria/new.html.erb.old
Normal file
21
app/views/success_criteria/new.html.erb.old
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<h1><%= t("scaffold.pagetitle_new", model: SuccessCriterion.model_name.human) %></h1>
|
||||
|
||||
<%= turbo_frame_tag dom_id(@success_criterion.element, "new_success_criterion_frame") do %>
|
||||
<div id="<%= dom_id @success_criterion %>" class="card mt-3">
|
||||
<%== render partial: "success_criteria/header", locals: { success_criterion: @success_criterion.tap { _1.title = "Neu" } } %>
|
||||
|
||||
<div class="collapse show" id="collapseSuccessCriterion_<%= @success_criterion.id %>">
|
||||
<div class="card-body">
|
||||
<%= bootstrap_form_with(model: @success_criterion.persisted? ? @success_criterion : [:element, @success_criterion]) do |form| %>
|
||||
<%= form.collection_select :check_id, Check.all.order(:external_number), :id, :display_label %>
|
||||
<%= form.submit class: "btn btn-warning" %>
|
||||
<%= link_to "Abbrechen", @success_criterion.persisted? ? @success_criterion : @success_criterion.element, class: "btn btn-outline-secondary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%# <%= link_to "edit", url_for([:edit, success_criterion]) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_index", model: SuccessCriterion.model_name.human(count: 2)), element_success_criteria_path(@element) %>
|
||||
</div>
|
||||
11
app/views/success_criteria/new.html.slim
Normal file
11
app/views/success_criteria/new.html.slim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
h1
|
||||
= t("scaffold.pagetitle_new", model: SuccessCriterion.model_name.human)
|
||||
= turbo_frame_tag dom_id(@success_criterion.element, "new_success_criterion_frame") do
|
||||
.border.border-info.p-3
|
||||
= bootstrap_form_with(model: @success_criterion.persisted? ? @success_criterion : [:element, @success_criterion]) do |form|
|
||||
= form.collection_select :check_id, Check.all.order(:external_number), :id, :display_label
|
||||
= form.submit class: "btn btn-warning"
|
||||
= link_to "Abbrechen", @success_criterion.persisted? ? @success_criterion : @success_criterion.element, class: "btn btn-outline-secondary"
|
||||
|
||||
.action-row
|
||||
= link_to t("scaffold.link_index", model: SuccessCriterion.model_name.human(count: 2)), element_success_criteria_path(@element)
|
||||
8
app/views/success_criteria/new_from_checklist.html.slim
Normal file
8
app/views/success_criteria/new_from_checklist.html.slim
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
|
||||
= turbo_frame_tag dom_id(@success_criterion.element, :new_success_criterion_frame) do
|
||||
.border.border-info.p-3
|
||||
= bootstrap_form_with(url: create_from_checklist_element_success_criteria_path(@success_criterion.element), name: :new_from_checklist) do |form|
|
||||
= form.collection_select :checklist_id, Checklist.all.order(:name), :id, :name
|
||||
= form.submit class: "btn btn-warning"
|
||||
= link_to "Abbrechen", @success_criterion.persisted? ? @success_criterion : @success_criterion.element, class: "btn btn-outline-secondary"
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
<h1><%= t("scaffold.pagetitle_show", model: @success_criterion.class.model_name.human) %></h1>
|
||||
|
||||
<%= turbo_frame_tag(dom_id(@success_criterion, :frame)) do %>
|
||||
<% render partial: "success_criteria/success_criterion", locals: { success_criterion: @success_criterion, expanded: true } %>
|
||||
<% end %>
|
||||
<%= render partial: "success_criteria/success_criterion", locals: { success_criterion: @success_criterion, expanded: true } %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_edit", model: @success_criterion.model_name.human), edit_success_criterion_path(@success_criterion) %>
|
||||
<%= link_to t("scaffold.link_index", model: @success_criterion.model_name.human(count: 2)), success_criteria_path %>
|
||||
<%= link_to t("scaffold.link_index", model: @success_criterion.model_name.human(count: 2)), element_success_criteria_path(@success_criterion.element) %>
|
||||
<%= button_to t("scaffold.link_destroy", model: @success_criterion.model_name.human), @success_criterion, method: :delete, class: "btn btn-outline-danger" %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,3 +14,34 @@ rails g model sdfsdlfkjdfsfsdfsfddsfsdfdsfsdflkjdsfjefdfsdssadasddf
|
|||
# invoke test_unit
|
||||
# create test/models/sdfsdlfkjdfsfsdfsfddsfsdfdsfsdflkjdsfjefdfsdssadasddf_test.rb
|
||||
# create test/fixtures/sdfsdlfkjdfsfsdfsfddsfsdfdsfsdflkjdsfjefdfsdssadasddfs.yml
|
||||
# Thu Oct 31 00:08:05 CET 2024
|
||||
rails g scaffold page position:integer path:string url:string report:references
|
||||
# invoke active_record
|
||||
# create db/migrate/20241030230805_create_pages.rb
|
||||
# create app/models/page.rb
|
||||
# invoke test_unit
|
||||
# create test/models/page_test.rb
|
||||
# create test/fixtures/pages.yml
|
||||
# invoke resource_route
|
||||
# route resources :pages
|
||||
# invoke scaffold_controller
|
||||
# create app/controllers/pages_controller.rb
|
||||
# invoke erb
|
||||
# create app/views/pages
|
||||
# create app/views/pages/index.html.erb
|
||||
# create app/views/pages/edit.html.erb
|
||||
# create app/views/pages/show.html.erb
|
||||
# create app/views/pages/new.html.erb
|
||||
# create app/views/pages/_form.html.erb
|
||||
# create app/views/pages/_page.html.erb
|
||||
# invoke resource_route
|
||||
# invoke test_unit
|
||||
# create test/controllers/pages_controller_test.rb
|
||||
# create test/system/pages_test.rb
|
||||
# invoke helper
|
||||
# create app/helpers/pages_helper.rb
|
||||
# invoke test_unit
|
||||
# invoke jbuilder
|
||||
# create app/views/pages/index.json.jbuilder
|
||||
# create app/views/pages/show.json.jbuilder
|
||||
# create app/views/pages/_page.json.jbuilder
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ de-CH:
|
|||
success_criterion:
|
||||
title: Titel
|
||||
description_html: Richtlinie
|
||||
comment_html: Testkommentar
|
||||
comment: Testkommentar
|
||||
level: Stufe
|
||||
result: Testergebnis
|
||||
results/passed: Bestanden
|
||||
|
|
@ -71,7 +71,7 @@ de-CH:
|
|||
description_html: Beschreibung
|
||||
report:
|
||||
name: Bezeichnung
|
||||
comment_html: Projektbeschreibung
|
||||
comment: Projektbeschreibung
|
||||
models:
|
||||
account:
|
||||
one: Konto
|
||||
|
|
|
|||
|
|
@ -8,11 +8,23 @@ Rails.application.routes.draw do
|
|||
resources :checklist_entries
|
||||
resources :checklists
|
||||
resources :checks
|
||||
resources :elements
|
||||
resources :link_categories
|
||||
resources :links
|
||||
resources :reports
|
||||
resources :success_criteria
|
||||
resources :reports, shallow: true, except: %i[show] do
|
||||
resources :pages do
|
||||
resources :elements do
|
||||
resources :success_criteria do
|
||||
collection do
|
||||
get "from_checklist", action: :new_from_checklist, as: :new_from_checklist
|
||||
post "from_checklist", action: :create_from_checklist, as: :create_from_checklist
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
member do
|
||||
get "(-/:page_id)", action: :show, as: "", constraints: { id: /\d+/ }
|
||||
end
|
||||
end
|
||||
|
||||
get "backoffice/show", as: :backoffice
|
||||
|
||||
|
|
|
|||
12
db/migrate/20241030230805_create_pages.rb
Normal file
12
db/migrate/20241030230805_create_pages.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
class CreatePages < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :pages do |t|
|
||||
t.integer :position
|
||||
t.string :path
|
||||
t.string :url
|
||||
t.references :report, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
6
db/migrate/20241030231244_add_page_id_to_elements.rb
Normal file
6
db/migrate/20241030231244_add_page_id_to_elements.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class AddPageIdToElements < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_reference :elements, :page, null: false, foreign_key: true
|
||||
add_column :elements, :position, :integer, default: 0, null: false
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class RemoveReportIdFromElements < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
remove_reference :elements, :report, null: false, foreign_key: true
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class AddQuickFieldsToSuccessCriterion < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_reference :success_criteria, :check, null: true, foreign_key: true
|
||||
add_column :success_criteria, :priority, :integer
|
||||
end
|
||||
end
|
||||
5
db/migrate/20241031183755_remove_path_from_elements.rb
Normal file
5
db/migrate/20241031183755_remove_path_from_elements.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class RemovePathFromElements < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
remove_column :elements, :path, :string
|
||||
end
|
||||
end
|
||||
25
db/schema.rb
generated
25
db/schema.rb
generated
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2024_10_26_170258) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2024_10_31_183755) do
|
||||
create_table "account_remember_keys", force: :cascade do |t|
|
||||
t.string "key", null: false
|
||||
t.datetime "deadline", null: false
|
||||
|
|
@ -120,12 +120,12 @@ ActiveRecord::Schema[7.2].define(version: 2024_10_26_170258) do
|
|||
end
|
||||
|
||||
create_table "elements", force: :cascade do |t|
|
||||
t.integer "report_id", null: false
|
||||
t.string "path"
|
||||
t.string "title"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["report_id"], name: "index_elements_on_report_id"
|
||||
t.integer "page_id", null: false
|
||||
t.integer "position", default: 0, null: false
|
||||
t.index ["page_id"], name: "index_elements_on_page_id"
|
||||
end
|
||||
|
||||
create_table "link_categories", force: :cascade do |t|
|
||||
|
|
@ -146,6 +146,16 @@ ActiveRecord::Schema[7.2].define(version: 2024_10_26_170258) do
|
|||
t.index ["link_category_id"], name: "index_links_on_link_category_id"
|
||||
end
|
||||
|
||||
create_table "pages", force: :cascade do |t|
|
||||
t.integer "position"
|
||||
t.string "path"
|
||||
t.string "url"
|
||||
t.integer "report_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["report_id"], name: "index_pages_on_report_id"
|
||||
end
|
||||
|
||||
create_table "principles", force: :cascade do |t|
|
||||
t.string "name_de"
|
||||
t.string "name_en"
|
||||
|
|
@ -176,6 +186,9 @@ ActiveRecord::Schema[7.2].define(version: 2024_10_26_170258) do
|
|||
t.integer "result"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "check_id"
|
||||
t.integer "priority"
|
||||
t.index ["check_id"], name: "index_success_criteria_on_check_id"
|
||||
t.index ["element_id"], name: "index_success_criteria_on_element_id"
|
||||
end
|
||||
|
||||
|
|
@ -185,7 +198,9 @@ ActiveRecord::Schema[7.2].define(version: 2024_10_26_170258) do
|
|||
add_foreign_key "checklist_entries", "checklists"
|
||||
add_foreign_key "checklist_entries", "checks"
|
||||
add_foreign_key "checks", "principles"
|
||||
add_foreign_key "elements", "reports"
|
||||
add_foreign_key "elements", "pages"
|
||||
add_foreign_key "links", "link_categories"
|
||||
add_foreign_key "pages", "reports"
|
||||
add_foreign_key "success_criteria", "checks"
|
||||
add_foreign_key "success_criteria", "elements"
|
||||
end
|
||||
|
|
|
|||
48
test/controllers/pages_controller_test.rb
Normal file
48
test/controllers/pages_controller_test.rb
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
require "test_helper"
|
||||
|
||||
class PagesControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
@page = pages(:one)
|
||||
end
|
||||
|
||||
test "should get index" do
|
||||
get pages_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get new_page_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should create page" do
|
||||
assert_difference("Page.count") do
|
||||
post pages_url, params: { page: { path: @page.path, position: @page.position, report_id: @page.report_id, url: @page.url } }
|
||||
end
|
||||
|
||||
assert_redirected_to page_url(Page.last)
|
||||
end
|
||||
|
||||
test "should show page" do
|
||||
get page_url(@page)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get edit_page_url(@page)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should update page" do
|
||||
patch page_url(@page), params: { page: { path: @page.path, position: @page.position, report_id: @page.report_id, url: @page.url } }
|
||||
assert_redirected_to page_url(@page)
|
||||
end
|
||||
|
||||
test "should destroy page" do
|
||||
assert_difference("Page.count", -1) do
|
||||
delete page_url(@page)
|
||||
end
|
||||
|
||||
assert_redirected_to pages_url
|
||||
end
|
||||
end
|
||||
|
|
@ -35,7 +35,7 @@ class ReportsControllerTest < ActionDispatch::IntegrationTest
|
|||
|
||||
test "should create report" do
|
||||
assert_difference("Report.count") do
|
||||
post reports_url, params: { report: { comment_html: @report.comment_html, name: @report.name } }
|
||||
post reports_url, params: { report: { comment: @report.comment, name: @report.name } }
|
||||
end
|
||||
|
||||
assert_redirected_to report_url(Report.last)
|
||||
|
|
@ -52,7 +52,7 @@ class ReportsControllerTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
test "should update report" do
|
||||
patch report_url(@report), params: { report: { comment_html: @report.comment_html, name: @report.name } }
|
||||
patch report_url(@report), params: { report: { comment: @report.comment, name: @report.name } }
|
||||
assert_redirected_to report_url(@report)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class SuccessCriteriaControllerTest < ActionDispatch::IntegrationTest
|
|||
test "should create success_criterion" do
|
||||
assert_difference("SuccessCriterion.count") do
|
||||
post success_criteria_url,
|
||||
params: { success_criterion: { comment_html: @success_criterion.comment_html,
|
||||
params: { success_criterion: { comment: @success_criterion.comment,
|
||||
description_html: @success_criterion.description_html, element_id: @success_criterion.element_id, level: @success_criterion.level, result: @success_criterion.result, title: @success_criterion.title } }
|
||||
end
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ class SuccessCriteriaControllerTest < ActionDispatch::IntegrationTest
|
|||
|
||||
test "should update success_criterion" do
|
||||
patch success_criterion_url(@success_criterion),
|
||||
params: { success_criterion: { comment_html: @success_criterion.comment_html,
|
||||
params: { success_criterion: { comment: @success_criterion.comment,
|
||||
description_html: @success_criterion.description_html, element_id: @success_criterion.element_id, level: @success_criterion.level, result: @success_criterion.result, title: @success_criterion.title } }
|
||||
assert_redirected_to success_criterion_url(@success_criterion)
|
||||
end
|
||||
|
|
|
|||
13
test/fixtures/pages.yml
vendored
Normal file
13
test/fixtures/pages.yml
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
position: 1
|
||||
path: MyString
|
||||
url: MyString
|
||||
report: one
|
||||
|
||||
two:
|
||||
position: 1
|
||||
path: MyString
|
||||
url: MyString
|
||||
report: two
|
||||
7
test/models/page_test.rb
Normal file
7
test/models/page_test.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
require "test_helper"
|
||||
|
||||
class PageTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
47
test/system/pages_test.rb
Normal file
47
test/system/pages_test.rb
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
require "application_system_test_case"
|
||||
|
||||
class PagesTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@page = pages(:one)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
visit pages_url
|
||||
assert_selector "h1", text: "Pages"
|
||||
end
|
||||
|
||||
test "should create page" do
|
||||
visit pages_url
|
||||
click_on "New page"
|
||||
|
||||
fill_in "Path", with: @page.path
|
||||
fill_in "Position", with: @page.position
|
||||
fill_in "Report", with: @page.report_id
|
||||
fill_in "Url", with: @page.url
|
||||
click_on "Create Page"
|
||||
|
||||
assert_text "Page was successfully created"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should update Page" do
|
||||
visit page_url(@page)
|
||||
click_on "Edit this page", match: :first
|
||||
|
||||
fill_in "Path", with: @page.path
|
||||
fill_in "Position", with: @page.position
|
||||
fill_in "Report", with: @page.report_id
|
||||
fill_in "Url", with: @page.url
|
||||
click_on "Update Page"
|
||||
|
||||
assert_text "Page was successfully updated"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should destroy Page" do
|
||||
visit page_url(@page)
|
||||
click_on "Destroy this page", match: :first
|
||||
|
||||
assert_text "Page was successfully destroyed"
|
||||
end
|
||||
end
|
||||
|
|
@ -21,7 +21,7 @@ class ReportsTest < ApplicationSystemTestCase
|
|||
visit reports_url
|
||||
click_on "Prüfbericht hinzufügen"
|
||||
|
||||
fill_in_rich_text_area "Projektbeschreibung", with: @report.comment_html
|
||||
fill_in_rich_text_area "Projektbeschreibung", with: @report.comment
|
||||
fill_in "Bezeichnung", with: @report.name
|
||||
click_on "Prüfbericht erstellen"
|
||||
end
|
||||
|
|
@ -30,7 +30,7 @@ class ReportsTest < ApplicationSystemTestCase
|
|||
visit report_url(@report)
|
||||
click_on "Prüfbericht bearbeiten", match: :first
|
||||
|
||||
fill_in_rich_text_area "Projektbeschreibung", with: @report.comment_html
|
||||
fill_in_rich_text_area "Projektbeschreibung", with: @report.comment
|
||||
fill_in "Bezeichnung", with: @report.name
|
||||
click_on "Prüfbericht aktualisieren"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class SuccessCriteriaTest < ApplicationSystemTestCase
|
|||
visit success_criteria_url
|
||||
click_on "Erfolgskriterium hinzufügen"
|
||||
|
||||
fill_in_rich_text_area "Testkommentar", with: @success_criterion.comment_html
|
||||
fill_in_rich_text_area "Testkommentar", with: @success_criterion.comment
|
||||
fill_in_rich_text_area "Richtlinie", with: @success_criterion.description_html
|
||||
# fill_in 'Element', with: @success_criterion.element_id
|
||||
# fill_in 'Level', with: @success_criterion.level
|
||||
|
|
@ -34,7 +34,7 @@ class SuccessCriteriaTest < ApplicationSystemTestCase
|
|||
visit success_criterion_url(@success_criterion)
|
||||
click_on "Erfolgskriterium bearbeiten", match: :first
|
||||
|
||||
fill_in_rich_text_area "Testkommentar", with: @success_criterion.comment_html
|
||||
fill_in_rich_text_area "Testkommentar", with: @success_criterion.comment
|
||||
fill_in_rich_text_area "Richtlinie", with: @success_criterion.description_html
|
||||
find("label", text: "Bestanden", visible: true).click
|
||||
fill_in "Titel", with: "new"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue