diff options
| author | Guillaume | 2017-11-17 17:02:54 +0100 | 
|---|---|---|
| committer | Guillaume | 2017-11-17 17:02:54 +0100 | 
| commit | 6676460eedb0d45938f67e2f8fe760a8e7001623 (patch) | |
| tree | 13a05f00f44994733170b60fa2c2f335e934d288 | |
| parent | 1261698d213964a3391fe1880198da00e7ac9831 (diff) | |
| download | chouette-core-6676460eedb0d45938f67e2f8fe760a8e7001623.tar.bz2 | |
Refs #4986 Add new filer by compliance control set name, add new styles for display input search inside a form-group filter layout4986-compliance_control_sets_fix
| -rw-r--r-- | app/assets/stylesheets/components/_forms.sass | 6 | ||||
| -rw-r--r-- | app/views/compliance_check_sets/_filters.html.slim | 8 | ||||
| -rw-r--r-- | config/locales/compliance_check_sets.en.yml | 1 | ||||
| -rw-r--r-- | config/locales/compliance_check_sets.fr.yml | 1 | ||||
| -rw-r--r-- | db/schema.rb | 6 | 
5 files changed, 19 insertions, 3 deletions
| diff --git a/app/assets/stylesheets/components/_forms.sass b/app/assets/stylesheets/components/_forms.sass index 2b715d669..9a363ab97 100644 --- a/app/assets/stylesheets/components/_forms.sass +++ b/app/assets/stylesheets/components/_forms.sass @@ -531,6 +531,12 @@ table, .table        &.open > .control-label + *          display: block +    &.search +      width: 30% +      > .search_bar +        padding: 0 15px +        > .input-group-btn +          right: 5%      > .filter_menu        margin: 0 diff --git a/app/views/compliance_check_sets/_filters.html.slim b/app/views/compliance_check_sets/_filters.html.slim index 3051bda64..bf929bc08 100644 --- a/app/views/compliance_check_sets/_filters.html.slim +++ b/app/views/compliance_check_sets/_filters.html.slim @@ -10,14 +10,18 @@      .form-group.togglable        = f.label t('activerecord.attributes.compliance_check_set.assigned_to'), required: false, class: 'control-label'        = f.input :parent_type_eq_any, collection: ComplianceCheckSet.order('parent_type'), as: :check_boxes, label: false, label_method: lambda {|w| ("<span>#{w}</span>").html_safe}, required: false, wrapper_html: {class: 'checkbox_list'} -      .form-group.togglable        = f.label Import.human_attribute_name(:created_at), required: false, class: 'control-label'        .filter_menu          = f.simple_fields_for :created_at do |p|            = p.input :start_date, as: :date, label: false, wrapper_html: {class: 'date smart_date filter_menu-item'}, default: @begin_range, include_blank: @begin_range ? false : true            = p.input :end_date, as: :date, label: false, wrapper_html: {class: 'date smart_date filter_menu-item'}, default: @end_range, include_blank: @end_range ? false : true - +    .form-group.search +      .input-group.search_bar +        = f.search_field :compliance_control_set_name_cont, class: 'form-control', placeholder: t('compliance_check_sets.filters.name_compliance_control_set') +        span.input-group-btn +          button.btn.btn-default type='submit' +            span.fa.fa-search    .actions      = link_to t('actions.erase'), @compliance_checks_sets, class: 'btn btn-link'      = f.submit t('actions.filter'), class: 'btn btn-default', id: 'compliance_check_set_filter_btn' diff --git a/config/locales/compliance_check_sets.en.yml b/config/locales/compliance_check_sets.en.yml index 89c142a49..5a641f4e2 100644 --- a/config/locales/compliance_check_sets.en.yml +++ b/config/locales/compliance_check_sets.en.yml @@ -11,6 +11,7 @@ en:            destroy_confirm: Are you sure you want to delete this control report?      filters:            name: Specify a control report name... +          name_compliance_control_set: Specify a compliance control set name...            error_period_filter: End date must be greater than or equal to begin date      search_no_results: No control reports match your search    activerecord: diff --git a/config/locales/compliance_check_sets.fr.yml b/config/locales/compliance_check_sets.fr.yml index 8c21f33fd..402300ebb 100644 --- a/config/locales/compliance_check_sets.fr.yml +++ b/config/locales/compliance_check_sets.fr.yml @@ -11,6 +11,7 @@ fr:            destroy_confirm: Etes vous sûr de supprimer ce rapport de contrôle ?      filters:            name: Indiquez un nom d'un objet associé... +          name_compliance_control_set: Indiquez le nom d'un jeu de contrôle            error_period_filter: La date de fin doit être supérieure ou égale à la date de début0      search_no_results: Aucun rapport de contrôle ne correspond à votre recherche    activerecord: diff --git a/db/schema.rb b/db/schema.rb index af6a51f7a..9803bb5b5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -491,7 +491,8 @@ ActiveRecord::Schema.define(version: 20171114102438) do      t.string   "name"      t.datetime "created_at"      t.datetime "updated_at" -    t.integer  "sync_interval", default: 1 +    t.integer  "sync_interval",   default: 1 +    t.string   "objectid_format"    end    create_table "lines", id: :bigserial, force: :cascade do |t| @@ -635,6 +636,7 @@ ActiveRecord::Schema.define(version: 20171114102438) do      t.integer  "created_from_id",          limit: 8      t.boolean  "ready",                              default: false      t.integer  "referential_suite_id",     limit: 8 +    t.string   "objectid_format"    end    add_index "referentials", ["created_from_id"], name: "index_referentials_on_created_from_id", using: :btree @@ -712,6 +714,7 @@ ActiveRecord::Schema.define(version: 20171114102438) do      t.string   "name"      t.datetime "created_at"      t.datetime "updated_at" +    t.string   "objectid_format"    end    create_table "stop_areas", id: :bigserial, force: :cascade do |t| @@ -950,6 +953,7 @@ ActiveRecord::Schema.define(version: 20171114102438) do      t.integer  "line_referential_id",      limit: 8      t.integer  "stop_area_referential_id", limit: 8      t.integer  "output_id",                limit: 8 +    t.string   "objectid_format"    end    add_index "workbenches", ["line_referential_id"], name: "index_workbenches_on_line_referential_id", using: :btree | 
