diff --git a/app/views/error_templates/show.html.slim b/app/views/error_templates/show.html.slim index 21843b14..373aa615 100644 --- a/app/views/error_templates/show.html.slim +++ b/app/views/error_templates/show.html.slim @@ -7,4 +7,25 @@ h1 - [:signature, :description, :hint].each do |attribute| = row(label: "error_template.#{attribute}", value: @error_template.send(attribute)) -//todo: list attributes \ No newline at end of file +h3 + = t 'error_templates.attributes' + +.table-responsive + table.sortable.table + thead + tr + th + th = t('activerecord.attributes.error_template_attributes.key') + th = t('activerecord.attributes.error_template_attributes.description') + th = t('activerecord.attributes.error_template_attributes.regex') + tbody + - @error_template.error_template_attributes.order(:important).each do |attribute| + tr + td + - if attribute.important + span class="fa fa-star" aria-hidden="true" + - else + span class="fa fa-star-o" aria-hidden="true" + td = attribute.key + td = attribute.description + td = attribute.regex diff --git a/config/locales/de.yml b/config/locales/de.yml index d37992c9..ab4f835d 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -114,6 +114,11 @@ de: signature: Regulärer Ausdruck description: Beschreibung hint: Hinweis + error_template_attributes: + important: "Wichtig" + key: "Name" + description: "Beschreibung" + regex: "Regulärer Ausdruck" models: code_harbor_link: one: CodeHarbor-Link @@ -588,3 +593,4 @@ de: error_templates: hints: signature: "Ein regulärer Ausdruck in Ruby-Syntax und ohne führende und schließende \"/\"" + attributes: "Attribute" diff --git a/config/locales/en.yml b/config/locales/en.yml index 17427a5f..cd61a066 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -135,6 +135,11 @@ en: signature: Signature Regular Expression description: Description hint: Hint + error_template_attributes: + important: "Important" + key: "Identifier" + description: "Description" + regex: "Regular Expression" models: code_harbor_link: one: CodeHarbor Link @@ -609,3 +614,4 @@ en: error_templates: hints: signature: "A regular expression in Ruby syntax without leading and trailing \"/\"" + attributes: "Attributes"