views: remove old design's leftbars
This commit is contained in:
parent
334e50d4f8
commit
0d101f3f1a
16 changed files with 0 additions and 182 deletions
|
@ -1,36 +0,0 @@
|
||||||
class RenderPartialService
|
|
||||||
attr_accessor :controller, :method
|
|
||||||
|
|
||||||
def initialize(controller, method)
|
|
||||||
@controller = controller
|
|
||||||
@method = method
|
|
||||||
end
|
|
||||||
|
|
||||||
def navbar
|
|
||||||
retrieve_navbar
|
|
||||||
end
|
|
||||||
|
|
||||||
def left_panel
|
|
||||||
retrieve_left_panel
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.left_panel_exist?(left_panel_url)
|
|
||||||
file = left_panel_url.split('/').last
|
|
||||||
|
|
||||||
File.exist?(Rails.root.join('app', 'views', 'layouts', 'left_panels', "_#{file}.html.haml"))
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def retrieve_navbar
|
|
||||||
"layouts/navbars/navbar_#{retrieve_name}"
|
|
||||||
end
|
|
||||||
|
|
||||||
def retrieve_left_panel
|
|
||||||
"layouts/left_panels/left_panel_#{retrieve_name}"
|
|
||||||
end
|
|
||||||
|
|
||||||
def retrieve_name
|
|
||||||
"#{controller.to_s.parameterize.underscore}_#{method}"
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: { active: 'Instructeurs' }
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: { active: 'Attestation' }
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: { active: 'E-mails' }
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: { active: 'E-mails' }
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_index'
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_index'
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: { active: 'Description' }
|
|
|
@ -1,34 +0,0 @@
|
||||||
#first-block
|
|
||||||
.en-cours
|
|
||||||
%b
|
|
||||||
= dossier_count = current_administrateur.procedures.count
|
|
||||||
= "Démarche".pluralize(dossier_count)
|
|
||||||
|
|
||||||
#action-block
|
|
||||||
|
|
||||||
#menu-block
|
|
||||||
.split-hr-left
|
|
||||||
#procedure-list
|
|
||||||
%a#draft-procedures{ :href => "#{url_for :admin_procedures_draft}" }
|
|
||||||
.procedure-list-element{ class: @draft_class }
|
|
||||||
En test
|
|
||||||
.badge.progress-bar-default
|
|
||||||
= current_administrateur.procedures.brouillons.count
|
|
||||||
|
|
||||||
%a#active-procedures{ :href => "#{url_for :admin_procedures}" }
|
|
||||||
.procedure-list-element{ class: @active_class }
|
|
||||||
Publiées
|
|
||||||
.badge.progress-bar-success
|
|
||||||
= current_administrateur.procedures.publiees.count
|
|
||||||
|
|
||||||
%a#archived-procedures{ :href => "#{url_for :admin_procedures_archived}" }
|
|
||||||
.procedure-list-element{ class: @archived_class }
|
|
||||||
Closes
|
|
||||||
.badge.progress-bar-purple
|
|
||||||
= current_administrateur.procedures.closes.count
|
|
||||||
|
|
||||||
.split-hr-left
|
|
||||||
= render partial: 'layouts/switch_devise_profile_module'
|
|
||||||
|
|
||||||
|
|
||||||
#infos-block
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: { active: 'MonAvis' }
|
|
|
@ -1,82 +0,0 @@
|
||||||
#first-block
|
|
||||||
.en-cours
|
|
||||||
= image_tag @procedure.logo_url, style: 'width: 30px;'
|
|
||||||
%b
|
|
||||||
= @procedure.libelle
|
|
||||||
|
|
||||||
#action-block
|
|
||||||
|
|
||||||
#menu-block
|
|
||||||
.split-hr-left
|
|
||||||
#procedure-list
|
|
||||||
%a#onglet-infos{ href: url_for(admin_procedure_path(@procedure)) }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'Informations') }
|
|
||||||
- if @procedure.brouillon?
|
|
||||||
Test et publication
|
|
||||||
- else
|
|
||||||
Publication
|
|
||||||
|
|
||||||
%a#onglet-description{ href: url_for(edit_admin_procedure_path(@procedure)) }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'Description') }
|
|
||||||
Description
|
|
||||||
|
|
||||||
%a#onglet-services{ href: (@procedure.service.present? || current_administrateur.services.present?) ? url_for(admin_services_path(procedure_id: @procedure.id)) : url_for(new_admin_service_path(procedure_id: @procedure.id)) }
|
|
||||||
.procedure-list-element
|
|
||||||
Service
|
|
||||||
- if @procedure.missing_steps.include?(:service)
|
|
||||||
%p.missing-steps (à compléter)
|
|
||||||
|
|
||||||
%a#onglet-administrateurs{ href: url_for(admin_procedure_administrateurs_path(@procedure)) }
|
|
||||||
.procedure-list-element
|
|
||||||
Administrateurs
|
|
||||||
|
|
||||||
- if !feature_enabled?(:administrateur_routage)
|
|
||||||
%a#onglet-instructeurs{ href: url_for(admin_procedure_groupe_instructeur_path(@procedure, @procedure.defaut_groupe_instructeur)) }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'Instructeurs') }
|
|
||||||
Instructeurs
|
|
||||||
- if @procedure.missing_steps.include?(:instructeurs)
|
|
||||||
%p.missing-steps (à compléter)
|
|
||||||
|
|
||||||
- if feature_enabled?(:administrateur_routage)
|
|
||||||
%a#onglet-instructeurs{ href: url_for(admin_procedure_groupe_instructeurs_path(@procedure)) }
|
|
||||||
.procedure-list-element
|
|
||||||
Groupe d'instructeurs
|
|
||||||
|
|
||||||
- if !@procedure.locked?
|
|
||||||
%a#onglet-champs{ href: champs_admin_procedure_path(@procedure) }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'Champs') }
|
|
||||||
Champs
|
|
||||||
|
|
||||||
- if !@procedure.locked?
|
|
||||||
%a#onglet-private-champs{ href: annotations_admin_procedure_path(@procedure) }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'Annotations privées') }
|
|
||||||
Annotations privées
|
|
||||||
|
|
||||||
%a#onglet-preview{ href: url_for(apercu_admin_procedure_path(@procedure)), target: "_blank", rel: "noopener" }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'Prévisualisation') }
|
|
||||||
Prévisualisation
|
|
||||||
|
|
||||||
%a#onglet-inemailsfos{ href: url_for(admin_procedure_mail_templates_path(@procedure)) }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'E-mails') }
|
|
||||||
E-mails
|
|
||||||
|
|
||||||
%a#onglet-attestation{ href: url_for(edit_admin_procedure_attestation_template_path(@procedure)) }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'Attestation') }
|
|
||||||
Attestation
|
|
||||||
|
|
||||||
%a#onglet-description{ href: url_for(monavis_admin_procedure_path(@procedure)) }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'MonAvis') }
|
|
||||||
MonAvis
|
|
||||||
|
|
||||||
%a#onglet-description{ href: url_for(jeton_admin_procedure_path(@procedure)) }
|
|
||||||
.procedure-list-element
|
|
||||||
Jeton
|
|
||||||
|
|
||||||
%a#onglet-description{ href: url_for(admin_procedures_path()) }
|
|
||||||
.procedure-list-element
|
|
||||||
Sortir
|
|
||||||
|
|
||||||
.split-hr-left
|
|
||||||
|
|
||||||
|
|
||||||
#infos-block
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: { active: 'Informations' }
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: { active: 'Description' }
|
|
|
@ -1 +0,0 @@
|
||||||
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: { active: 'MonAvis' }
|
|
|
@ -1,2 +0,0 @@
|
||||||
%div
|
|
||||||
Default Left Panel
|
|
|
@ -1,17 +0,0 @@
|
||||||
describe RenderPartialService do
|
|
||||||
let(:service) { RenderPartialService.new(controller, method) }
|
|
||||||
let(:controller) { ApplicationController }
|
|
||||||
let(:method) { :index }
|
|
||||||
|
|
||||||
describe 'navbar' do
|
|
||||||
subject { service.navbar }
|
|
||||||
|
|
||||||
it { is_expected.to eq "layouts/navbars/navbar_#{controller.to_s.parameterize}_#{method}" }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'left_panel' do
|
|
||||||
subject { service.left_panel }
|
|
||||||
|
|
||||||
it { is_expected.to eq "layouts/left_panels/left_panel_#{controller.to_s.parameterize}_#{method}" }
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in a new issue