diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/compliance_check_sets/_filters.html.slim | 24 | ||||
| -rw-r--r-- | app/views/compliance_check_sets/index.html.slim | 54 | ||||
| -rw-r--r-- | app/views/compliance_check_sets/show.html.slim | 11 | ||||
| -rw-r--r-- | app/views/compliance_control_sets/index.html.slim | 10 | ||||
| -rw-r--r-- | app/views/layouts/navigation/_main_nav_left.html.slim | 2 |
5 files changed, 95 insertions, 6 deletions
diff --git a/app/views/compliance_check_sets/_filters.html.slim b/app/views/compliance_check_sets/_filters.html.slim new file mode 100644 index 000000000..609754eec --- /dev/null +++ b/app/views/compliance_check_sets/_filters.html.slim @@ -0,0 +1,24 @@ += search_form_for @q_for_form, url: workbench_compliance_check_sets_path(current_offer_workbench), builder: SimpleForm::FormBuilder, class: 'form form-filter' do |f| + .ffg-row + .input-group.search_bar + = f.search_field :referential_name_cont, class: 'form-control', placeholder: t('compliance_check_sets.filters.name') + span.input-group-btn + button.btn.btn-default type='submit' + span.fa.fa-search + + .ffg-row + .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 :begin, 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, as: :date, label: false, wrapper_html: {class: 'date smart_date filter_menu-item'}, default: @end_range, include_blank: @end_range ? false : true + + .actions + = link_to t('actions.erase'), @compliance_checks_sets, class: 'btn btn-link' + = f.submit t('actions.filter'), class: 'btn btn-default', id: 'referential_filter_btn' + diff --git a/app/views/compliance_check_sets/index.html.slim b/app/views/compliance_check_sets/index.html.slim new file mode 100644 index 000000000..38c4babcf --- /dev/null +++ b/app/views/compliance_check_sets/index.html.slim @@ -0,0 +1,54 @@ +/ PageHeader +- header_params = ['jeux-de-donnees', + t('compliance_check_sets.index.title'), + ''] += pageheader(*header_params) do + + / Below is secundary actions & optional contents (filters, ...) + .row.mb-sm + .col-lg-12.text-right + +/ PageContent +.page_content + .container-fluid + .row + .col-lg-12 + = render 'filters' + .row + .col-lg-12 + .select_table + = table_builder_2 @compliance_check_sets, + [ \ + TableBuilderHelper::Column.new( \ + key: :ref, \ + attribute: 'referential_id' \ + ), \ + TableBuilderHelper::Column.new( \ + key: :creation_date, \ + attribute: Proc.new { |n| l(n.created_at, format: :long) if n.created_at } \ + ), \ + TableBuilderHelper::Column.new( \ + key: :associated_object, \ + attribute: Proc.new{|n| n.referential.name}, \ + link_to: lambda do |referential| \ + referential_path(referential, current_workbench_id: params[:id]) \ + end \ + ), \ + TableBuilderHelper::Column.new( \ + key: :assigned_to, \ + attribute: 'parent_type' \ + ), \ + TableBuilderHelper::Column.new(\ + key: :compliance_control_set, \ + attribute: Proc.new{ |n| (n.compliance_control_set.name) if n.compliance_control_set} \ + ), \ + ], + sortable: true, + links: [:show], + cls: 'table has-filter has-search' + - unless @compliance_check_sets.any? + .row.mt-xs + .col-lg-12 + = replacement_msg t('compliance_check_sets.search_no_results') + + diff --git a/app/views/compliance_check_sets/show.html.slim b/app/views/compliance_check_sets/show.html.slim new file mode 100644 index 000000000..4e965947d --- /dev/null +++ b/app/views/compliance_check_sets/show.html.slim @@ -0,0 +1,11 @@ +/ PageHeader += pageheader 'jeux-de-donnees', + @compliance_check_set.referential.name +/ PageContent +.page_content + .container-fluid + .row + .col-lg-6.col-md-6.col-sm-12.col-xs-12 + = definition_list t('metadatas'), + ComplianceCheckSet.human_attribute_name(:id) => @compliance_check_set.referential.id, + ComplianceCheckSet.human_attribute_name(:name) => @compliance_check_set.referential.name
\ No newline at end of file diff --git a/app/views/compliance_control_sets/index.html.slim b/app/views/compliance_control_sets/index.html.slim index aee1595ef..ecb4eb75b 100644 --- a/app/views/compliance_control_sets/index.html.slim +++ b/app/views/compliance_control_sets/index.html.slim @@ -19,7 +19,7 @@ .col-lg-12 .select_table = table_builder_2 @compliance_control_sets, - [ \ + [ \ TableBuilderHelper::Column.new( \ key: :name, \ attribute: 'name', \ @@ -28,7 +28,7 @@ end \ ), \ TableBuilderHelper::Column.new( \ - key: :assignment, \ + key: :assigned_to, \ attribute: 'assignment' \ ), \ TableBuilderHelper::Column.new( \ @@ -44,9 +44,9 @@ attribute: Proc.new { |n| l(n.updated_at, format: :long) if n.updated_at }, \ ) \ ], - sortable: true, - links: [:show], - cls: 'table has-filter has-search' + sortable: true, + links: [:show], + cls: 'table has-filter has-search' - unless @compliance_control_sets.any? .row.mt-xs .col-lg-12 diff --git a/app/views/layouts/navigation/_main_nav_left.html.slim b/app/views/layouts/navigation/_main_nav_left.html.slim index 12139c93b..062c9383c 100644 --- a/app/views/layouts/navigation/_main_nav_left.html.slim +++ b/app/views/layouts/navigation/_main_nav_left.html.slim @@ -37,7 +37,7 @@ span Import = link_to calendars_path, class: 'list-group-item' do span Modèles de calendrier - = link_to '#', class: 'list-group-item' do + = link_to workbench_compliance_check_sets_path(current_offer_workbench), class: 'list-group-item' do span Rapport de contrôle = link_to compliance_control_sets_path, class: 'list-group-item' do span Jeux de contrôle |
