diff options
| author | Xinhui | 2017-05-19 17:05:59 +0200 | 
|---|---|---|
| committer | Xinhui | 2017-05-19 17:06:05 +0200 | 
| commit | 730dcc8c0676be0c9dbbaa89ff7fc9f38f9c0d73 (patch) | |
| tree | 7049979c10d2043db40d676709c6746b4486f5d0 /app/views | |
| parent | 716504283fb537c172dad318ee3d75c33e42f128 (diff) | |
| download | chouette-core-730dcc8c0676be0c9dbbaa89ff7fc9f38f9c0d73.tar.bz2 | |
Edit select2 templateResult for Calendar & TimeTable
Refs #3431
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/autocomplete_calendars/autocomplete.rabl | 2 | ||||
| -rw-r--r-- | app/views/autocomplete_time_tables/index.rabl | 2 | ||||
| -rw-r--r-- | app/views/time_table_combinations/_form.html.slim | 4 | 
3 files changed, 4 insertions, 4 deletions
| diff --git a/app/views/autocomplete_calendars/autocomplete.rabl b/app/views/autocomplete_calendars/autocomplete.rabl index 199195f31..9aba2c37b 100644 --- a/app/views/autocomplete_calendars/autocomplete.rabl +++ b/app/views/autocomplete_calendars/autocomplete.rabl @@ -1,5 +1,5 @@  collection @calendars, :object_root => false  attribute :id, :name, :short_name, :shared  node :text do |cal| -  cal.name +  "#{cal.id} - #{cal.name}"  end diff --git a/app/views/autocomplete_time_tables/index.rabl b/app/views/autocomplete_time_tables/index.rabl index bd478301d..f52429e9d 100644 --- a/app/views/autocomplete_time_tables/index.rabl +++ b/app/views/autocomplete_time_tables/index.rabl @@ -5,7 +5,7 @@ node do |time_table|      :time_table_bounding => time_table.presenter.time_table_bounding,      :composition_info => time_table.presenter.composition_info,      :tags => time_table.tags.join(','), -    :text => time_table.comment, +    :text => "#{time_table.objectid.parts.try(:third)} - #{time_table.comment}",      :day_types => %w(monday tuesday wednesday thursday friday saturday sunday).select{ |d| time_table.send(d) }.map{ |d| time_table.human_attribute_name(d).first(2)}.join('')}  end diff --git a/app/views/time_table_combinations/_form.html.slim b/app/views/time_table_combinations/_form.html.slim index ef6a1b56b..1cda41597 100644 --- a/app/views/time_table_combinations/_form.html.slim +++ b/app/views/time_table_combinations/_form.html.slim @@ -5,8 +5,8 @@ h1 = @time_table.comment        = form.input :combined_type, as: :select, collection: ['time_table', 'calendar']        = form.input :operation, as: :select, collection: TimeTableCombination.operations -      = form.input :time_table_id, as: :select, input_html: {class: 'tt_combination_target', data: { select2_ajax: 'true', term: 'comment_cont', url: referential_autocomplete_time_tables_path(@referential, format: :json), formater: 'select2_time_table'}}, disabled: @combination.combined_type != 'time_table', wrapper_html: {class: @combination.combined_type != 'time_table' ? 'hidden' : ''} +      = form.input :time_table_id, as: :select, input_html: {class: 'tt_combination_target', data: { select2_ajax: 'true', term: 'comment_cont', url: referential_autocomplete_time_tables_path(@referential, format: :json)}}, disabled: @combination.combined_type != 'time_table', wrapper_html: {class: @combination.combined_type != 'time_table' ? 'hidden' : ''} -      = form.input :calendar_id, as: :select, input_html: { class: 'tt_combination_target', data: { select2_ajax: 'true', term: 'name_cont', url: autocomplete_calendars_path, formater: 'select2_calendar'}}, disabled: @combination.combined_type != 'calendar', wrapper_html: {class: @combination.combined_type != 'calendar' ? 'hidden' : ''} +      = form.input :calendar_id, as: :select, input_html: { class: 'tt_combination_target', data: { select2_ajax: 'true', term: 'name_cont', url: autocomplete_calendars_path}}, disabled: @combination.combined_type != 'calendar', wrapper_html: {class: @combination.combined_type != 'calendar' ? 'hidden' : ''}        = form.button :submit, t('actions.submit') | 
