diff options
| author | Zog | 2018-03-08 15:07:41 +0100 |
|---|---|---|
| committer | Zog | 2018-03-12 12:00:15 +0100 |
| commit | 132db2e97fd6e28105e472ee562062b7ebc07b39 (patch) | |
| tree | 6a1e332e98abd011d0913044e75727ea11a4c3c6 /app/views/exports | |
| parent | a4a075f5eec935dd6a0dbf0a861b6ada13b1dcbc (diff) | |
| download | chouette-core-132db2e97fd6e28105e472ee562062b7ebc07b39.tar.bz2 | |
Refs #6133; Sample SimpeImporter Implementation
Still needs to be made asynchronous
Diffstat (limited to 'app/views/exports')
| -rw-r--r-- | app/views/exports/_form.html.slim | 2 | ||||
| -rw-r--r-- | app/views/exports/show.html.slim | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/views/exports/_form.html.slim b/app/views/exports/_form.html.slim index 68228d539..b8fe0f632 100644 --- a/app/views/exports/_form.html.slim +++ b/app/views/exports/_form.html.slim @@ -9,7 +9,7 @@ - Export::Base.user_visible_descendants.each do |child| .slave data-master="[name='export[type]']" data-value=child.name - child.options.each do |attr, option_def| - = form.input attr, required: option_def[:required], input_html: {value: @export.try(attr) || option_def[:default_value]}, as: option_def[:type] + = export_option_input form, export, attr, option_def = form.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'wb_export_form' diff --git a/app/views/exports/show.html.slim b/app/views/exports/show.html.slim index 1b193f795..0455fe375 100644 --- a/app/views/exports/show.html.slim +++ b/app/views/exports/show.html.slim @@ -7,7 +7,9 @@ .row .col-lg-6.col-md-6.col-sm-12.col-xs-12 - metadatas = { I18n.t("activerecord.attributes.export.type") => @export.object.class.human_name } - - metadatas = metadatas.update Hash[*@export.options.map{|k, v| [t("activerecord.attributes.export.#{@export.object.class.name.demodulize.tableize.singularize}.#{k}"), v]}.flatten] + - metadatas = metadatas.update({I18n.t("activerecord.attributes.export.status") => @export.status}) + - metadatas = metadatas.update Hash[*@export.options.map{|k, v| [t("activerecord.attributes.export.#{@export.object.class.name.demodulize.tableize.singularize}.#{k}"), @export.display_option_value(k, self)]}.flatten] + - metadatas = metadatas.update({I18n.t("activerecord.attributes.export.file") => link_to(t("actions.download"), @export.file.url)}) = definition_list t('metadatas'), metadatas .row |
