Extract id attributes from HAML tag attributes

This commit is contained in:
gregoirenovel 2017-04-26 14:55:14 +02:00
parent e9d32541ce
commit 7ddcb9aedc
13 changed files with 35 additions and 35 deletions

View file

@ -2,11 +2,11 @@
#procedure_show #procedure_show
- unless @facade.procedure.published? - unless @facade.procedure.published?
- if @facade.procedure.gestionnaires.size == 0 - if @facade.procedure.gestionnaires.size == 0
%a.action_button.btn.btn-success{ style: 'float: right; margin-top: 10px;', disabled: 'disabled', 'data-toggle' => :tooltip, title: 'Vous ne pouvez pas publier une procédure sans qu\'aucun accompagnateur ne soit affecté à celle-ci.', id: 'publish-procedure' } %a.action_button.btn.btn-success#publish-procedure{ style: 'float: right; margin-top: 10px;', disabled: 'disabled', 'data-toggle' => :tooltip, title: 'Vous ne pouvez pas publier une procédure sans qu\'aucun accompagnateur ne soit affecté à celle-ci.' }
%i.fa.fa-eraser %i.fa.fa-eraser
Publier Publier
- else - else
%a.btn.btn-success{ "data-target" => "#publish-modal", "data-toggle" => "modal", :type => "button", style: 'float: right; margin-top: 10px;', id: 'publish-procedure' } %a.btn.btn-success#publish-procedure{ "data-target" => "#publish-modal", "data-toggle" => "modal", :type => "button", style: 'float: right; margin-top: 10px;' }
%i.fa.fa-eraser %i.fa.fa-eraser
Publier Publier

View file

@ -44,9 +44,9 @@
CARTOGRAPHIE CARTOGRAPHIE
= render partial: '/dossiers/edit_carto' = render partial: '/dossiers/edit_carto'
.body.display-block-on-print .body.display-block-on-print
%input{ id: 'json_latlngs', type: 'hidden', value: "#{@facade.dossier.json_latlngs}", name: 'json_latlngs' } %input#json_latlngs{ type: 'hidden', value: "#{@facade.dossier.json_latlngs}", name: 'json_latlngs' }
%input{ id: 'quartier_prioritaires', type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}" } %input#quartier_prioritaires{ type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}" }
%input{ id: 'cadastres', type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}" } %input#cadastres{ type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}" }
= render partial: '/users/carte/map', locals: { dossier: @facade.dossier } = render partial: '/users/carte/map', locals: { dossier: @facade.dossier }
= render partial: 'users/carte/init_carto', locals: { dossier: @facade.dossier } = render partial: 'users/carte/init_carto', locals: { dossier: @facade.dossier }

View file

@ -2,9 +2,9 @@
.col-xs-12 .col-xs-12
#map.mini{ class: @facade.dossier.procedure.module_api_carto.classes } #map.mini{ class: @facade.dossier.procedure.module_api_carto.classes }
%input{ id: 'json_latlngs', type: 'hidden', value: "#{@facade.dossier.json_latlngs}" } %input#json_latlngs{ type: 'hidden', value: "#{@facade.dossier.json_latlngs}" }
%input{ id: 'quartier_prioritaires', type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}" } %input#quartier_prioritaires{ type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}" }
%input{ id: 'cadastres', type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}" } %input#cadastres{ type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}" }
%script{ type: 'text/javascript' } %script{ type: 'text/javascript' }
= "var dossier_id =#{@facade.dossier.id}" = "var dossier_id =#{@facade.dossier.id}"

View file

@ -1,7 +1,7 @@
#pieces-justificatives #pieces-justificatives
%table.table %table.table
- if @facade.procedure.cerfa_flag? - if @facade.procedure.cerfa_flag?
%tr{ id: "piece_justificative_0" } %tr#piece_justificative_0
%th.col-lg-6 %th.col-lg-6
Formulaire Formulaire
%td.col-lg-6.col-md-6.col-sm-6.col-xs-6 %td.col-lg-6.col-md-6.col-sm-6.col-xs-6

View file

@ -1,6 +1,6 @@
= form_tag(url_for({ controller: 'commentaires', action: :create, dossier_id: dossier_facade.dossier.id, champ_id: dossier_facade.champ_id }), class: 'form-inline', method: 'POST', multipart: true) do = form_tag(url_for({ controller: 'commentaires', action: :create, dossier_id: dossier_facade.dossier.id, champ_id: dossier_facade.champ_id }), class: 'form-inline', method: 'POST', multipart: true) do
%textarea.form-control.wysihtml5{ id: 'texte_commentaire', name: 'texte_commentaire', style: 'width: 100%; margin-bottom: 2%;', rows: '5', placeholder: "Commentaire" } %textarea.form-control.wysihtml5#texte_commentaire{ name: 'texte_commentaire', style: 'width: 100%; margin-bottom: 2%;', rows: '5', placeholder: "Commentaire" }
.row .row
.col-md-6 .col-md-6

View file

@ -9,19 +9,19 @@
#menu-block #menu-block
.split-hr-left .split-hr-left
#procedure-list #procedure-list
%a{ :href => "#{url_for :admin_procedures_draft}", id: "draft-procedures" } %a#draft-procedures{ :href => "#{url_for :admin_procedures_draft}" }
.procedure-list-element{ class: @draft_class } .procedure-list-element{ class: @draft_class }
Brouillons Brouillons
.badge.progress-bar-default .badge.progress-bar-default
= current_administrateur.procedures.where(published: false, archived: false).count = current_administrateur.procedures.where(published: false, archived: false).count
%a{ :href => "#{url_for :admin_procedures}", id: "active-procedures" } %a#active-procedures{ :href => "#{url_for :admin_procedures}" }
.procedure-list-element{ class: @active_class } .procedure-list-element{ class: @active_class }
Actives Actives
.badge.progress-bar-success .badge.progress-bar-success
= current_administrateur.procedures.where(published: true, archived: false).count = current_administrateur.procedures.where(published: true, archived: false).count
%a{ :href => "#{url_for :admin_procedures_archived}", id: "archived-procedures" } %a#archived-procedures{ :href => "#{url_for :admin_procedures_archived}" }
.procedure-list-element{ class: @archived_class } .procedure-list-element{ class: @archived_class }
Archivées Archivées
.badge.progress-bar-purple .badge.progress-bar-purple

View file

@ -10,38 +10,38 @@
#menu-block #menu-block
.split-hr-left .split-hr-left
#procedure-list #procedure-list
%a{ :href => "#{url_for admin_procedure_path(@procedure)}", id: 'onglet-infos' } %a#onglet-infos{ :href => "#{url_for admin_procedure_path(@procedure)}" }
.procedure-list-element{ class: ('active' if active == 'Informations') } .procedure-list-element{ class: ('active' if active == 'Informations') }
Informations Informations
%a{ :href => "#{url_for admin_procedure_accompagnateurs_path(@procedure)}", id: 'onglet-accompagnateurs' } %a#onglet-accompagnateurs{ :href => "#{url_for admin_procedure_accompagnateurs_path(@procedure)}" }
.procedure-list-element{ class: ('active' if active == 'Accompagnateurs') } .procedure-list-element{ class: ('active' if active == 'Accompagnateurs') }
= t('dynamics.admin.procedure.onglets.accompagnateurs') = t('dynamics.admin.procedure.onglets.accompagnateurs')
%a{ :href => "#{url_for edit_admin_procedure_path(@procedure)}", id: 'onglet-description' } %a#onglet-description{ :href => "#{url_for edit_admin_procedure_path(@procedure)}" }
.procedure-list-element{ class: ('active' if active == 'Description') } .procedure-list-element{ class: ('active' if active == 'Description') }
Description Description
- unless @procedure.locked? - unless @procedure.locked?
%a{ :href => "#{url_for admin_procedure_types_de_champ_path(@procedure)}", id: 'onglet-champs' } %a#onglet-champs{ :href => "#{url_for admin_procedure_types_de_champ_path(@procedure)}" }
.procedure-list-element{ class: ('active' if active == 'Champs') } .procedure-list-element{ class: ('active' if active == 'Champs') }
Champs Champs
- unless @procedure.locked? - unless @procedure.locked?
%a{ :href => "#{url_for admin_procedure_pieces_justificatives_path(@procedure)}", id: 'onglet-pieces' } %a#onglet-pieces{ :href => "#{url_for admin_procedure_pieces_justificatives_path(@procedure)}" }
.procedure-list-element{ class: ('active' if active == 'Pieces') } .procedure-list-element{ class: ('active' if active == 'Pieces') }
Pièces jointes Pièces jointes
- unless @procedure.locked? - unless @procedure.locked?
%a{ :href => "#{url_for admin_procedure_types_de_champ_private_path(@procedure)}", id: 'onglet-private-champs' } %a#onglet-private-champs{ :href => "#{url_for admin_procedure_types_de_champ_private_path(@procedure)}" }
.procedure-list-element{ class: ('active' if active == 'Champs privés') } .procedure-list-element{ class: ('active' if active == 'Champs privés') }
Champs privés Champs privés
%a{ :href => "#{url_for admin_procedure_mail_templates_path(@procedure)}", id: 'onglet-inemailsfos' } %a#onglet-inemailsfos{ :href => "#{url_for admin_procedure_mail_templates_path(@procedure)}" }
.procedure-list-element{ class: ('active' if active == 'E-mails') } .procedure-list-element{ class: ('active' if active == 'E-mails') }
E-mails E-mails
%a{ :href => "#{url_for admin_procedure_previsualisation_path(@procedure)}", id: 'onglet-preview' } %a#onglet-preview{ :href => "#{url_for admin_procedure_previsualisation_path(@procedure)}" }
.procedure-list-element{ class: ('active' if active == 'Prévisualisation') } .procedure-list-element{ class: ('active' if active == 'Prévisualisation') }
Prévisualisation Prévisualisation

View file

@ -12,31 +12,31 @@
#procedure-list #procedure-list
- unless current_user.dossiers.count == 0 - unless current_user.dossiers.count == 0
%a{ :href => "#{url_for users_dossiers_path(liste: 'brouillon')}", 'data-toggle' => :tooltip, title: 'Les dossiers jamais proposés à la relecture.' } %a{ :href => "#{url_for users_dossiers_path(liste: 'brouillon')}", 'data-toggle' => :tooltip, title: 'Les dossiers jamais proposés à la relecture.' }
.procedure-list-element{ class: ('active' if @liste == 'brouillon'), id: 'brouillon' } .procedure-list-element#brouillon{ class: ('active' if @liste == 'brouillon') }
Brouillons Brouillons
.badge.progress-bar-default .badge.progress-bar-default
= @user_dossiers.brouillon.count = @user_dossiers.brouillon.count
%a{ :href => "#{url_for users_dossiers_path(liste: 'a_traiter')}", 'data-toggle' => :tooltip, title: 'Les dossiers qui requièrent une action de votre part.' } %a{ :href => "#{url_for users_dossiers_path(liste: 'a_traiter')}", 'data-toggle' => :tooltip, title: 'Les dossiers qui requièrent une action de votre part.' }
.procedure-list-element{ class: ('active' if @liste == 'a_traiter'), id: 'a_traiter' } .procedure-list-element#a_traiter{ class: ('active' if @liste == 'a_traiter') }
En construction En construction
.badge.progress-bar-danger .badge.progress-bar-danger
= @user_dossiers.en_construction.count = @user_dossiers.en_construction.count
%a{ :href => "#{url_for users_dossiers_path(liste: 'en_instruction')}", 'data-toggle' => :tooltip, title: 'Les dossiers en cours d\'examen par l\'administration compétante.' } %a{ :href => "#{url_for users_dossiers_path(liste: 'en_instruction')}", 'data-toggle' => :tooltip, title: 'Les dossiers en cours d\'examen par l\'administration compétante.' }
.procedure-list-element{ class: ('active' if @liste == 'en_instruction'), id: 'en_instruction' } .procedure-list-element#en_instruction{ class: ('active' if @liste == 'en_instruction') }
En instruction En instruction
.badge.progress-bar-default .badge.progress-bar-default
= @user_dossiers.en_instruction.count = @user_dossiers.en_instruction.count
%a{ :href => "#{url_for users_dossiers_path(liste: 'termine')}", 'data-toggle' => :tooltip, title: 'Les dossiers cloturés qui peuvent être "Accepté", "Refusé" ou "Sans suite".' } %a{ :href => "#{url_for users_dossiers_path(liste: 'termine')}", 'data-toggle' => :tooltip, title: 'Les dossiers cloturés qui peuvent être "Accepté", "Refusé" ou "Sans suite".' }
.procedure-list-element{ class: ('active' if @liste == 'termine'), id: 'termine' } .procedure-list-element#termine{ class: ('active' if @liste == 'termine') }
Terminé Terminé
.badge.progress-bar-success .badge.progress-bar-success
= @user_dossiers.termine.count = @user_dossiers.termine.count
%a{ :href => "#{url_for users_dossiers_path(liste: 'invite')}" } %a{ :href => "#{url_for users_dossiers_path(liste: 'invite')}" }
.procedure-list-element{ class: ('active' if @liste == 'invite'), id: 'invite' } .procedure-list-element#invite{ class: ('active' if @liste == 'invite') }
Invitation Invitation
.badge.progress-bar-warning .badge.progress-bar-warning
= current_user.invites.count = current_user.invites.count

View file

@ -3,5 +3,5 @@
.input-group .input-group
= text_field_tag('q', "#{@search_terms unless @search_terms.nil?}", id: 'q', placeholder: "Recherchez parmi tous vos dossiers", class: 'form-control') = text_field_tag('q', "#{@search_terms unless @search_terms.nil?}", id: 'q', placeholder: "Recherchez parmi tous vos dossiers", class: 'form-control')
%span.input-group-btn %span.input-group-btn
%button.btn.btn-default{ id: 'search-button' } %button.btn.btn-default#search-button
%i.fa.fa-search %i.fa.fa-search

View file

@ -1,5 +1,5 @@
- if current_user.loged_in_with_france_connect? - if current_user.loged_in_with_france_connect?
%div{ id: "fconnect-profile", "data-fc-logout-url" => '/users/sign_out" data-method="delete' } #fconnect-profile{ "data-fc-logout-url" => '/users/sign_out" data-method="delete' }
%a.text-info{ href: "#" } %a.text-info{ href: "#" }
= "#{current_user.given_name} #{current_user.family_name}" = "#{current_user.given_name} #{current_user.family_name}"
= link_to "", "/users/sign_out", method: :delete, class: "btn fa fa-power-off off-fc-link" = link_to "", "/users/sign_out", method: :delete, class: "btn fa fa-power-off off-fc-link"

View file

@ -20,9 +20,9 @@
= form_tag(url_for({ controller: :carte, action: :save, dossier_id: @dossier.id }), class: 'form-inline', method: 'POST') do = form_tag(url_for({ controller: :carte, action: :save, dossier_id: @dossier.id }), class: 'form-inline', method: 'POST') do
%br %br
%input{ type: 'hidden', value: "#{@dossier.json_latlngs}", name: 'json_latlngs', id: 'json_latlngs' } %input#json_latlngs{ type: 'hidden', value: "#{@dossier.json_latlngs}", name: 'json_latlngs' }
%input{ id: 'quartier_prioritaires', type: 'hidden', value: "#{@dossier.quartier_prioritaires.to_json}" } %input#quartier_prioritaires{ type: 'hidden', value: "#{@dossier.quartier_prioritaires.to_json}" }
%input{ id: 'cadastres', type: 'hidden', value: "#{@dossier.cadastres.to_json}" } %input#cadastres{ type: 'hidden', value: "#{@dossier.cadastres.to_json}" }
- if @dossier.draft? - if @dossier.draft?
= render partial: '/layouts/etape_suivante' = render partial: '/layouts/etape_suivante'

View file

@ -8,15 +8,15 @@
%em %em
Récupérer le formulaire de demande ou CERFA vierge pour mon dossier : Récupérer le formulaire de demande ou CERFA vierge pour mon dossier :
= link_to "Télécharger", "#{dossier.procedure.lien_demarche}", target: :blank, id: :lien_cerfa = link_to "Télécharger", "#{dossier.procedure.lien_demarche}", target: :blank, id: :lien_cerfa
-# %a{ id: 'lien_cerfa', href: "#{dossier.procedure.lien_demarche}", target: '_blank' } Télécharger -# %a#lien_cerfa{ href: "#{dossier.procedure.lien_demarche}", target: '_blank' } Télécharger
%td %td
- if dossier.cerfa_available? - if dossier.cerfa_available?
%span.btn.btn-sm.btn-file.btn-success %span.btn.btn-sm.btn-file.btn-success
Modifier Modifier
%input{ type: 'file', name: 'cerfa_pdf', id: 'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes } %input#cerfa_pdf{ type: 'file', name: 'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
- else - else
%input{ type: 'file', name: 'cerfa_pdf', id: 'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes } %input#cerfa_pdf{ type: 'file', name: 'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
- dossier.types_de_piece_justificative.order('order_place ASC').each do |tpj| - dossier.types_de_piece_justificative.order('order_place ASC').each do |tpj|
%tr %tr

View file

@ -1,4 +1,4 @@
%p.lead{ id: 'pro_section' } %p.lead#pro_section
.flag .flag
= image_tag(image_url(LOGO_NAME)) = image_tag(image_url(LOGO_NAME))
%br %br