wip: wcag structure
This commit is contained in:
parent
4c31dbbed0
commit
4dd445be57
48 changed files with 461 additions and 137 deletions
|
|
@ -25,10 +25,6 @@ class ApplicationController < ActionController::Base
|
|||
label: Project.model_name.human(count: 2),
|
||||
icon: :'folder',
|
||||
path: :projects },
|
||||
# {
|
||||
# label: Report.model_name.human(count: 2),
|
||||
# icon: :'journal-text',
|
||||
# path: :reports },
|
||||
{
|
||||
label: I18n.t("backoffice"),
|
||||
icon: :gear,
|
||||
|
|
@ -36,7 +32,8 @@ class ApplicationController < ActionController::Base
|
|||
active: %w[backoffice checklists checks links link_categories].include?(controller_name) },
|
||||
{
|
||||
label: "Konto",
|
||||
path: profile_path
|
||||
path: profile_path,
|
||||
icon: "person-circle"
|
||||
}
|
||||
]
|
||||
else
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class ChecksController < ApplicationController
|
|||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def check_params
|
||||
params.require(:check).permit(:principle_id,
|
||||
params.require(:check).permit(:guideline_id,
|
||||
:number,
|
||||
:name_de,
|
||||
:name_en,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ module BackofficeMenu
|
|||
[
|
||||
{ label: "Einstellungen", icon: :sliders, path: :backoffice },
|
||||
{ label: Checklist.model_name.human(count: 2), icon: :'list-check', path: :checklists },
|
||||
{ label: Guideline.model_name.human(count: 2), icon: :'rulers', path: :guidelines },
|
||||
{ label: Check.model_name.human(count: 2), icon: :check2, path: :checks },
|
||||
{ label: Link.model_name.human(count: 2), icon: :link, path: :links },
|
||||
{ label: LinkCategory.model_name.human(count: 2), icon: :folder, path: :link_categories } ]
|
||||
|
|
|
|||
58
app/controllers/guidelines_controller.rb
Normal file
58
app/controllers/guidelines_controller.rb
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
class GuidelinesController < BackofficeController
|
||||
before_action :set_guideline, only: %i[ show edit update destroy ]
|
||||
|
||||
# GET /guidelines
|
||||
def index
|
||||
@guidelines = Guideline.all
|
||||
end
|
||||
|
||||
# GET /guidelines/1
|
||||
def show
|
||||
end
|
||||
|
||||
# GET /guidelines/new
|
||||
def new
|
||||
@guideline = Guideline.new
|
||||
end
|
||||
|
||||
# GET /guidelines/1/edit
|
||||
def edit
|
||||
end
|
||||
|
||||
# POST /guidelines
|
||||
def create
|
||||
@guideline = Guideline.new(guideline_params)
|
||||
|
||||
if @guideline.save
|
||||
redirect_to @guideline, notice: "Guideline was successfully created."
|
||||
else
|
||||
render :new, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
||||
# PATCH/PUT /guidelines/1
|
||||
def update
|
||||
if @guideline.update(guideline_params)
|
||||
redirect_to @guideline, notice: "Guideline was successfully updated.", status: :see_other
|
||||
else
|
||||
render :edit, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
||||
# DELETE /guidelines/1
|
||||
def destroy
|
||||
@guideline.destroy!
|
||||
redirect_to guidelines_url, notice: "Guideline was successfully destroyed.", status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_guideline
|
||||
@guideline = Guideline.find(params[:id])
|
||||
end
|
||||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def guideline_params
|
||||
params.require(:guideline).permit(:principle_id, :number, :name_de, :name_en, :description_de, :description_en)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue