change searchbar from header to dashboard for user
This commit is contained in:
parent
12ebe1d1a6
commit
f762323017
3 changed files with 32 additions and 26 deletions
|
@ -60,16 +60,13 @@
|
||||||
|
|
||||||
|
|
||||||
- if params[:controller] == 'recherche'
|
- if params[:controller] == 'recherche'
|
||||||
= render partial: 'layouts/search_dossiers_form', locals: { search_endpoint: recherche_index_path }
|
= render partial: 'layouts/search_dossiers_form'
|
||||||
|
|
||||||
- if is_instructeur_context
|
- if is_instructeur_context
|
||||||
= render partial: 'layouts/search_dossiers_form', locals: { search_endpoint: recherche_index_path }
|
= render partial: 'layouts/search_dossiers_form'
|
||||||
|
|
||||||
- if is_expert_context
|
- if is_expert_context
|
||||||
= render partial: 'layouts/search_dossiers_form', locals: { search_endpoint: recherche_index_path }
|
= render partial: 'layouts/search_dossiers_form'
|
||||||
|
|
||||||
- if is_user_context && current_user.dossiers.count > 2
|
|
||||||
= render partial: 'layouts/search_dossiers_form', locals: { search_endpoint: recherche_dossiers_path }
|
|
||||||
|
|
||||||
- has_header = [is_instructeur_context, is_expert_context, is_user_context]
|
- has_header = [is_instructeur_context, is_expert_context, is_user_context]
|
||||||
#burger-menu.fr-header__menu.fr-modal
|
#burger-menu.fr-header__menu.fr-modal
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.fr-container.fr-container-lg--fluid
|
.fr-container.fr-container-lg--fluid
|
||||||
%button.fr-btn--close.fr-btn{ "aria-controls" => "search-modal", :title => t('close_modal', scope: [:layouts, :header]) }= t('close_modal', scope: [:layouts, :header])
|
%button.fr-btn--close.fr-btn{ "aria-controls" => "search-modal", :title => t('close_modal', scope: [:layouts, :header]) }= t('close_modal', scope: [:layouts, :header])
|
||||||
#search-473.fr-search-bar.fr-search-bar--lg
|
#search-473.fr-search-bar.fr-search-bar--lg
|
||||||
= form_tag "#{search_endpoint}", method: :get, :role => "search", class: "flex width-100" do
|
= form_tag recherche_index_path, method: :get, :role => "search", class: "flex width-100" do
|
||||||
= label_tag "q", t('views.users.dossiers.search.search_file'), class: 'fr-label'
|
= label_tag "q", t('views.users.dossiers.search.search_file'), class: 'fr-label'
|
||||||
= text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: t('views.users.dossiers.search.search_file'), class: "fr-input"
|
= text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: t('views.users.dossiers.search.search_file'), class: "fr-input"
|
||||||
%button.fr-btn
|
%button.fr-btn
|
||||||
|
|
|
@ -8,12 +8,16 @@
|
||||||
|
|
||||||
.dossiers-headers.sub-header
|
.dossiers-headers.sub-header
|
||||||
.container
|
.container
|
||||||
- if @search_terms.present?
|
%h1.page-title= t('views.users.dossiers.index.dossiers')
|
||||||
%h1.page-title Résultat de la recherche pour « #{@search_terms} »
|
- if current_user.dossiers.count > 2
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers }
|
#search-2.fr-search-bar.fr-search-bar--lg{ role: "search", "aria-label": t('views.users.dossiers.search.search_file') }
|
||||||
|
= form_tag recherche_dossiers_path, method: :get, :role => "search", class: "flex width-100 fr-mb-5w" do
|
||||||
|
= label_tag "q", t('views.users.dossiers.search.search_file'), class: 'fr-label'
|
||||||
|
= text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: t('views.users.dossiers.search.search_file'), class: "fr-input"
|
||||||
|
%button.fr-btn
|
||||||
|
= t('views.users.dossiers.search.simple')
|
||||||
|
|
||||||
- else
|
- if @search_terms.blank?
|
||||||
%h1.page-title= t('views.users.dossiers.index.dossiers')
|
|
||||||
%nav.tabs{ role: 'navigation', 'aria-label': t('views.users.dossiers.secondary_menu') }
|
%nav.tabs{ role: 'navigation', 'aria-label': t('views.users.dossiers.secondary_menu') }
|
||||||
%ul
|
%ul
|
||||||
- if @user_dossiers.present?
|
- if @user_dossiers.present?
|
||||||
|
@ -59,23 +63,28 @@
|
||||||
badge: number_with_html_delimiter(@dossier_transfers.count))
|
badge: number_with_html_delimiter(@dossier_transfers.count))
|
||||||
|
|
||||||
.container
|
.container
|
||||||
- if @statut == "en-cours"
|
- if @search_terms.present?
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @user_dossiers }
|
%h2.page-title Résultat de la recherche pour « #{@search_terms} »
|
||||||
|
= render partial: "dossiers_list", locals: { dossiers: @dossiers }
|
||||||
|
|
||||||
- if @statut == "traites"
|
- else
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers_traites }
|
- if @statut == "en-cours"
|
||||||
|
= render partial: "dossiers_list", locals: { dossiers: @user_dossiers }
|
||||||
|
|
||||||
- if @statut == "dossiers-invites"
|
- if @statut == "traites"
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers_invites }
|
= render partial: "dossiers_list", locals: { dossiers: @dossiers_traites }
|
||||||
|
|
||||||
- if @statut == "dossiers-supprimes-recemment"
|
- if @statut == "dossiers-invites"
|
||||||
= render partial: "hidden_dossiers_list", locals: { hidden_dossiers: @dossiers_supprimes_recemment }
|
= render partial: "dossiers_list", locals: { dossiers: @dossiers_invites }
|
||||||
|
|
||||||
- if @statut == "dossiers-supprimes-definitivement"
|
- if @statut == "dossiers-supprimes-recemment"
|
||||||
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers_supprimes_definitivement }
|
= render partial: "hidden_dossiers_list", locals: { hidden_dossiers: @dossiers_supprimes_recemment }
|
||||||
|
|
||||||
- if @statut == "dossiers-transferes"
|
- if @statut == "dossiers-supprimes-definitivement"
|
||||||
= render partial: "transfered_dossiers_list", locals: { dossier_transfers: @dossier_transfers }
|
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers_supprimes_definitivement }
|
||||||
|
|
||||||
- if @statut == "dossiers-expirant"
|
- if @statut == "dossiers-transferes"
|
||||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers_close_to_expiration }
|
= render partial: "transfered_dossiers_list", locals: { dossier_transfers: @dossier_transfers }
|
||||||
|
|
||||||
|
- if @statut == "dossiers-expirant"
|
||||||
|
= render partial: "dossiers_list", locals: { dossiers: @dossiers_close_to_expiration }
|
||||||
|
|
Loading…
Reference in a new issue