aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorcedricnjanga2017-09-04 09:34:30 +0200
committercedricnjanga2017-09-04 09:34:47 +0200
commitf846b41c7e1570f3047e71fc74cbe1b2f9e13fc6 (patch)
treeec8870b17baea02fd163516f98ed8e23a97df7aa /app/views
parentadee10292855612808a8e6d1c764a148f68eb69f (diff)
downloadchouette-core-f846b41c7e1570f3047e71fc74cbe1b2f9e13fc6.tar.bz2
add some change for the Referential#new_from to only have a line collection regarding the functional scope of the current organozation
Diffstat (limited to 'app/views')
-rw-r--r--app/views/referentials/_form.html.slim2
-rw-r--r--app/views/workbenches/index.html.slim6
2 files changed, 4 insertions, 4 deletions
diff --git a/app/views/referentials/_form.html.slim b/app/views/referentials/_form.html.slim
index a9e308699..6f7da84c7 100644
--- a/app/views/referentials/_form.html.slim
+++ b/app/views/referentials/_form.html.slim
@@ -46,7 +46,7 @@
.separator
- = subform.input :lines, as: :select, collection: @referential.workbench.lines.includes(:company).order(:name), selected: subform.object.line_ids, label_method: :display_name, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': t('simple_form.labels.referential.placeholders.select_lines'), 'multiple': 'multiple', style: 'width: 100%' }
+ = subform.input :lines, as: :select, collection: Chouette::Line.includes(:company).order(:name).where(objectid: current_functional_scope), selected: subform.object.line_ids, label_method: :display_name, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': t('simple_form.labels.referential.placeholders.select_lines'), 'multiple': 'multiple', style: 'width: 100%' }
.hidden = form.input :workbench_id, as: :hidden
diff --git a/app/views/workbenches/index.html.slim b/app/views/workbenches/index.html.slim
index 54d50d114..d57f579ff 100644
--- a/app/views/workbenches/index.html.slim
+++ b/app/views/workbenches/index.html.slim
@@ -34,7 +34,7 @@
div
= t('.offers.referentials')
span.badge.ml-xs = @referentials.count if @referentials.any?
-
+
div
= link_to '', workbench_path(@workbench), class: ' fa fa-chevron-right pull-right', title: t('.offers.see')
@@ -42,7 +42,7 @@
.list-group
- @referentials.each_with_index do |referential, i|
= link_to referential.name, referential_path(referential), class: 'list-group-item' if i < 6
-
+
- else
.panel-body
em.small.text-muted = t('.offers.no_content')
@@ -61,7 +61,7 @@
.list-group
- @calendars.each_with_index do |calendar, i|
= link_to calendar.name, calendar_path(calendar), class: 'list-group-item' if i < 6
-
+
- else
.panel-body
em.small.text-muted = t('.offers.no_content')