diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/time_tables_controller.rb | 3 | ||||
| -rw-r--r-- | app/views/time_tables/_filter.html.slim | 4 | ||||
| -rw-r--r-- | app/views/time_tables/time_tables.json.rabl | 2 | 
3 files changed, 3 insertions, 6 deletions
| diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb index edeb5a32f..6849b1592 100644 --- a/app/controllers/time_tables_controller.rb +++ b/app/controllers/time_tables_controller.rb @@ -115,7 +115,8 @@ class TimeTablesController < ChouetteController    end    def tags -    @tags = ActsAsTaggableOn::Tag.where("tags.name = ?", "%#{params[:tag]}%") +    # @tags = ActsAsTaggableOn::Tag.where("tags.name = ?", "%#{params[:tag]}%") +    @tags = Chouette::TimeTable.tags_on(:tags)      respond_to do |format|        format.json { render :json => @tags.map{|t| {:id => t.id, :name => t.name }} }      end diff --git a/app/views/time_tables/_filter.html.slim b/app/views/time_tables/_filter.html.slim index 1015eca31..392dc4f50 100644 --- a/app/views/time_tables/_filter.html.slim +++ b/app/views/time_tables/_filter.html.slim @@ -7,10 +7,6 @@            span.fa.fa-search    .ffg-row -    / .form-group.togglable -      / = f.label Chouette::TimeTable.human_attribute_name(:color), required: false, class: 'control-label' -      / = f.input :color_cont_any, collection: ["#9B9B9B", "#FFA070", "#C67300", "#7F551B", "#41CCE3", "#09B09C", "#3655D7",   "#6321A0", "#E796C6", "#DD2DAA"], as: :check_boxes, label: false, label_method: lambda{|tt| ("<span style='height:19px;'><span class='fa fa-circle' style='position:relative;top:0;margin-top:0;color:" + tt + "'></span></span>").html_safe }, required: false, wrapper_html: { class: 'checkbox_list' } -      .form-group        = f.label Chouette::TimeTable.human_attribute_name(:tag_search), required: false, class: 'control-label'        = f.input :tag_search, as: :tags, collection: Chouette::TimeTable.tags_on(:tags).pluck(:name), label: false, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Indiquez une étiquette...' }, wrapper_html: { class: 'select2ed'}, include_blank: false diff --git a/app/views/time_tables/time_tables.json.rabl b/app/views/time_tables/time_tables.json.rabl index dec29cb69..b91ca9ae9 100644 --- a/app/views/time_tables/time_tables.json.rabl +++ b/app/views/time_tables/time_tables.json.rabl @@ -2,4 +2,4 @@ collection @time_tables, :object_root => false  node do |time_table|    { :id => time_table.id, :comment => time_table.comment, :time_table_bounding => time_table_bounding( time_table), :composition_info => composition_info(time_table) } -end                      +end | 
