diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/shared/custom_fields/_attachment.html.slim | 5 | ||||
| -rw-r--r-- | app/views/stop_areas/_form.html.slim | 7 | ||||
| -rw-r--r-- | app/views/stop_areas/show.html.slim | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/app/views/shared/custom_fields/_attachment.html.slim b/app/views/shared/custom_fields/_attachment.html.slim index 2f25b396a..32d0fda4d 100644 --- a/app/views/shared/custom_fields/_attachment.html.slim +++ b/app/views/shared/custom_fields/_attachment.html.slim @@ -1 +1,4 @@ -= link_to I18n.t("custom_fields.#{field.owner.class.name.demodulize.underscore}.#{field.code}.link"), field.value.url +- if field.value.present? + = link_to I18n.t("custom_fields.#{field.owner.class.name.demodulize.underscore}.#{field.code}.link"), field.value.url +- else + = "-" diff --git a/app/views/stop_areas/_form.html.slim b/app/views/stop_areas/_form.html.slim index 20bdc289f..90dd187ee 100644 --- a/app/views/stop_areas/_form.html.slim +++ b/app/views/stop_areas/_form.html.slim @@ -62,6 +62,13 @@ = f.input :stairs_availability, as: :select, :collection => [[t("true"), true], [t("false"), false]], :include_blank => true = f.input :lift_availability, as: :select, :collection => [[t("true"), true], [t("false"), false]], :include_blank => true + // XXX filter on the workgroup + - if resource.custom_fields.any? + .custom_fields + h3 = t("stop_areas.stop_area.custom_fields") + - resource.custom_fields.each do |code, field| + = field.input(f).to_s + .separator = f.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'stop_area_form' diff --git a/app/views/stop_areas/show.html.slim b/app/views/stop_areas/show.html.slim index a6147b86d..851bd9b82 100644 --- a/app/views/stop_areas/show.html.slim +++ b/app/views/stop_areas/show.html.slim @@ -23,4 +23,6 @@ t('activerecord.attributes.stop_area.state') => stop_area_status(@stop_area), @stop_area.human_attribute_name(:comment) => @stop_area.try(:comment), }) + - @stop_area.custom_fields.each do |code, field| + - attributes.merge!(field.name => field.display_value) = definition_list t('metadatas'), attributes |
