aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorZog2018-03-08 15:07:41 +0100
committerZog2018-03-12 12:00:15 +0100
commit132db2e97fd6e28105e472ee562062b7ebc07b39 (patch)
tree6a1e332e98abd011d0913044e75727ea11a4c3c6 /app/views
parenta4a075f5eec935dd6a0dbf0a861b6ada13b1dcbc (diff)
downloadchouette-core-132db2e97fd6e28105e472ee562062b7ebc07b39.tar.bz2
Refs #6133; Sample SimpeImporter Implementation
Still needs to be made asynchronous
Diffstat (limited to 'app/views')
-rw-r--r--app/views/exports/_form.html.slim2
-rw-r--r--app/views/exports/show.html.slim4
-rw-r--r--app/views/shared/iev_interfaces/_messages.html.slim13
3 files changed, 14 insertions, 5 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
diff --git a/app/views/shared/iev_interfaces/_messages.html.slim b/app/views/shared/iev_interfaces/_messages.html.slim
index bb6eea9f9..d65f006e6 100644
--- a/app/views/shared/iev_interfaces/_messages.html.slim
+++ b/app/views/shared/iev_interfaces/_messages.html.slim
@@ -2,6 +2,13 @@
ul.list-unstyled.import_message-list
- messages.each do | message |
li
- div(class="#{bootstrap_class_for_message_criticity message.criticity}")
- = t( [message.class.name.underscore.gsub('/', '_').pluralize,
- message.message_key].join('.'), message.message_attributes.symbolize_keys)
+ .row class=bootstrap_class_for_message_criticity(message.criticity)
+ - if message.message_attributes["line"]
+ .col-md-1= "L. #{message.message_attributes["line"]}"
+ .col-md-5= export_message_content message
+ - else
+ .col-md-6= export_message_content message
+ .col-md-6
+ - if message.criticity != "info"
+ pre
+ = JSON.pretty_generate message.resource_attributes