diff --git a/app/assets/stylesheets/application.bootstrap.scss b/app/assets/stylesheets/application.bootstrap.scss index 727a354..c8cc19c 100644 --- a/app/assets/stylesheets/application.bootstrap.scss +++ b/app/assets/stylesheets/application.bootstrap.scss @@ -110,6 +110,32 @@ $enable-rounded: false; } +trix-toolbar .trix-dialog { + background: var(--bs-secondary-bg) !important; + background-color: var(--bs-secondary-bg) !important; + color: var(--bs-secondary-color) !important; + border: var(--bs-border-width) solid var(--bs-border-color) !important; + border-radius: 0 !important; + box-shadow: none; + font-size: 1.1rem; +} + +trix-toolbar .trix-button { + background: var(--bs-secondary-bg) !important; + background-color: var(--bs-secondary-bg) !important; + color: var(--bs-secondary-color) !important; + border: var(--bs-border-width) solid var(--bs-border-color) !important; + border-radius: 0 !important; + +} + +trix-toolbar .trix-input--dialog { + background: var(--bs-secondary-bg) !important; + background-color: var(--bs-secondary-bg) !important; + color: var(--bs-secondary-color) !important; + border: var(--bs-border-width) solid var(--bs-border-color) !important; + border-radius: 0 !important; +} /* trix-editor.trix-content { min-height: 350px; overflow-y: auto; diff --git a/app/models/check.rb b/app/models/check.rb index e2de0f8..a532a95 100644 --- a/app/models/check.rb +++ b/app/models/check.rb @@ -99,4 +99,8 @@ class Check < ApplicationRecord def display_applicabilities %i[applicable_to_analogue applicable_to_app applicable_to_document applicable_to_non_web applicable_to_web].select { |a| send(:"#{a}?") }.map { |a| I18n.t("applicability.#{a}") }.join(", ") end + + def display_label + "#{name_de} (#{[number, external_number].compact_blank.join("/")})" + end end diff --git a/app/views/checklist_entries/_checklist_entry.html.erb b/app/views/checklist_entries/_checklist_entry.html.erb index b8633ae..96f2cc8 100644 --- a/app/views/checklist_entries/_checklist_entry.html.erb +++ b/app/views/checklist_entries/_checklist_entry.html.erb @@ -9,7 +9,7 @@
<%# checklist_entry.position %> - <%= link_to([checklist_entry.position, checklist_entry.check.number, checklist_entry.check.name_de].join(" "), checklist_entry.check, data: { turbo_frame: "_top" }, class: "flex-grow-1") %> + <%= link_to([checklist_entry.position, checklist_entry.check.display_label].join(" "), checklist_entry.check, data: { turbo_frame: "_top" }, class: "flex-grow-1") %> <%= button_to tag.i(class: "bi bi-trash"), checklist_entry_path(checklist_entry), method: :delete, class: "btn btn-link" %> <%= link_to tag.i(class: "bi bi-pencil"), edit_checklist_entry_path(checklist_entry), class: "btn btn-link" %>
diff --git a/app/views/checklists/show.html.erb b/app/views/checklists/show.html.erb index 74eccd2..987a7a3 100644 --- a/app/views/checklists/show.html.erb +++ b/app/views/checklists/show.html.erb @@ -19,7 +19,7 @@ <%= render entry %> <% end %> <% end %> - <%= tag.i "Es sind (noch) keine Checks definiert." if @checklist.empty? %> + <%= tag.i "Es sind keine Checks zugewiesen." if @checklist.empty? %> <% end %> diff --git a/app/views/checks/index.html.slim b/app/views/checks/index.html.slim index c66ccda..2ef03f7 100644 --- a/app/views/checks/index.html.slim +++ b/app/views/checks/index.html.slim @@ -43,37 +43,27 @@ h1 table.table.table-striped thead tr - th ID - th - = Check.human_attribute_name(:number) th = Check.human_attribute_name(:name) th = Check.human_attribute_name(:standard_ids) th - = Check.human_attribute_name(:target_disability) + = Check.human_attribute_name(:target_disabilities) th = Check.human_attribute_name(:applicability) - th - = Check.human_attribute_name(:external_number) th = Check.human_attribute_name(:conformity_level) tbody - @checks.each do |check| tr - td = link_to check.id, check td - = link_to(check.number, check) - td - = link_to check.t_name&.truncate(64), check + = link_to check.display_label&.truncate(64), check td = link_to check.standards.map(&:t_name).join(", "), check td = link_to check.display_target_disabilities, check td = link_to check.display_applicabilities, check - td - = link_to check.external_number, check td = safe_display(check.conformity_level) { link_to _1, check } .my-3 diff --git a/config/locales/activerecord.yml b/config/locales/activerecord.yml index ae79f6f..0abcc8c 100644 --- a/config/locales/activerecord.yml +++ b/config/locales/activerecord.yml @@ -16,32 +16,32 @@ de-CH: external_number: WCAG Nummer conformity_level: Konformitätsstufe position: Position - conformity_notice_de: Anmerkungen zur Konformität (de) - conformity_notice_en: Anmerkungen zur Konformität (eng) + conformity_notice_de: Anmerkungen zur Konformität + conformity_notice_en: Anmerkungen zur Konformität standard_ids: Standards - name_de: Name (de) - name_en: Name (eng) + name_de: Name + name_en: Name principle_id: Prinzip priority: Priorität - quick_criterion_de: Quick Kriterium (de) - quick_criterion_en: Quick Kriterium (eng) - quick_fix_de: Quick Fix (de) - quick_fix_en: Quick Fix (eng) - quick_fail_de: Quick Fail (de) - quick_fail_en: Quick Fail (eng) - criterion_de: Kriterium/Grundlage (de) - criterion_en: Kriterium/Grundlage (eng) - criterion_details_de: Verstehen (de) - criterion_details_en: Verstehen (eng) - example_de: Beispiel (de) - example_en: Beispiel (eng) - exemption_details_de: Ausnahme (de) - exemption_details_en: Ausnahme (eng) - standard_text_de: WCAG-Text (de) - standard_text_en: WCAG-Text (eng) + quick_criterion_de: Quick Kriterium + quick_criterion_en: Quick Kriterium + quick_fix_de: Quick Fix + quick_fix_en: Quick Fix + quick_fail_de: Quick Fail + quick_fail_en: Quick Fail + criterion_de: Kriterium/Grundlage + criterion_en: Kriterium/Grundlage + criterion_details_de: Verstehen + criterion_details_en: Verstehen + example_de: Beispiel + example_en: Beispiel + exemption_details_de: Ausnahme + exemption_details_en: Ausnahme + standard_text_de: WCAG-Text + standard_text_en: WCAG-Text test_instructions: Testanleitung - powerpoint_text_de: Powerpoint Text (de) - powerpoint_text_en: Powerpoint Text (eng) + powerpoint_text_de: Powerpoint Text + powerpoint_text_en: Powerpoint Text comment: Kommentar target_disabilities: Einschränkung/Zugänglichkeit applicability: Anwendbarkeit