Refactorings and gui improvements
This commit is contained in:
parent
c965e03e5a
commit
d1294c2fc4
46 changed files with 358 additions and 128020 deletions
|
|
@ -7,7 +7,7 @@ class ChecksController < ApplicationController
|
|||
|
||||
# GET /checks or /checks.json
|
||||
def index
|
||||
@pagy, @checks = pagy(Check.filter_by(filter_params).order(:external_number))
|
||||
@pagy, @checks = pagy(Check.filter_by(filter_params).order(:external_number_1, :external_number_2, :external_number_3))
|
||||
end
|
||||
|
||||
# GET /checks/1 or /checks/1.json
|
||||
|
|
@ -69,7 +69,7 @@ class ChecksController < ApplicationController
|
|||
end
|
||||
|
||||
def filter_params
|
||||
@filter_params ||= params.permit(filter: [ :s, priority: [], conformity_level: [], standard_ids: [], principle_id: [], target_disabilities: []])[:filter] || {}
|
||||
@filter_params ||= params.permit(filter: [ :s, priority: [], conformity_level: [], standard_ids: [], principle_id: [], target_disabilities: [] ])[:filter] || {}
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class ElementsController < ApplicationController
|
|||
# DELETE /elements/1
|
||||
def destroy
|
||||
@element.destroy!
|
||||
redirect_to elements_url, notice: "Element was successfully destroyed.", status: :see_other
|
||||
redirect_to page_elements_url(@element.page), notice: "Element was successfully destroyed.", status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class PagesController < ApplicationController
|
|||
# DELETE /pages/1
|
||||
def destroy
|
||||
@page.destroy!
|
||||
redirect_to pages_url, notice: "Page was successfully destroyed.", status: :see_other
|
||||
redirect_to report_pages_url(@page.report), notice: "Page was successfully destroyed.", status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class SuccessCriteriaController < ApplicationController
|
|||
@success_criterion.destroy!
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
redirect_to success_criteria_url, notice: "Erfolgskriterium was successfully destroyed.", status: :see_other
|
||||
redirect_to element_success_criteria_url(@success_criterion.element), notice: "Erfolgskriterium was successfully destroyed.", status: :see_other
|
||||
end
|
||||
format.turbo_stream
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue