Change some wordings and clean some templates

This commit is contained in:
Mathieu Magnin 2017-01-31 10:46:20 +01:00
parent 4880101202
commit 38e8acf285
6 changed files with 78 additions and 74 deletions

1
.gitignore vendored
View file

@ -34,3 +34,4 @@ config/fog_credentials.yml
uploads/* uploads/*
coverage/**/* coverage/**/*
.DS_Store .DS_Store
.byebug_history

View file

@ -8,4 +8,12 @@
#individual_with_siret { #individual_with_siret {
display: none; display: none;
} }
.procedure {
&-description {
img {
max-width: 100%;
}
}
}

View file

@ -50,7 +50,7 @@
%b %b
Cette procédure a été archivée et n'est plus accessible par le public. Cette procédure a été archivée et n'est plus accessible par le public.
- elsif @facade.procedure.published? - elsif @facade.procedure.published?
= @facade.procedure.lien = link_to @facade.procedure.lien, @facade.procedure.lien, target: '_blank'
- else - else
%b %b
Cette procédure n'a pas encore été publiée et n'est donc pas accessible par le public. Cette procédure n'a pas encore été publiée et n'est donc pas accessible par le public.
@ -59,12 +59,13 @@
%h3 Détails %h3 Détails
.row{style:'margin-right:3%; margin-left:3%;'} .row{style:'margin-right:3%; margin-left:3%;'}
.description.col-md-3.col-sm-3.col-xs-3.col-lg-3 .description.col-xs-6.col-md-3.procedure-description
%h4.text-info %h4.text-info
= @facade.procedure.libelle = @facade.procedure.libelle
= h @facade.procedure.description.html_safe = h @facade.procedure.description.html_safe
.champs.col-md-3.col-sm-3.col-xs-3.col-lg-3
.champs.col-xs-6.col-md-3
%h4.text-info %h4.text-info
Champs Champs
.badge.progress-bar-info .badge.progress-bar-info
@ -73,7 +74,7 @@
= champ.libelle = champ.libelle
%br %br
.champs_private.col-md-3.col-sm-3.col-xs-3.col-lg-3 .champs_private.col-xs-6.col-md-3
%h4.text-info %h4.text-info
Champs privés Champs privés
.badge.progress-bar-info .badge.progress-bar-info
@ -82,7 +83,7 @@
= champ.libelle = champ.libelle
%br %br
.pieces_justificatives.col-md-3.col-sm-3.col-xs-3.col-lg-3 .pieces_justificatives.col-xs-6.col-md-3
%h4.text-info %h4.text-info
Pièces justificatives Pièces justificatives
.badge.progress-bar-info .badge.progress-bar-info

View file

@ -1,57 +1,4 @@
.default_data_block{style:'margin-top: 40px'} = render partial: 'dossiers/messagerie', locals: { dossier_facade: @facade }
.row.show-block#messages
%div.header
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
.carret-right
.carret-down
MESSAGERIE avec votre
- if user_signed_in?
Administration
- elsif gestionnaire_signed_in?
Usager
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count
- message_count = @facade.commentaires.count
= (message_count == 1) ? "1 message" : "#{message_count} messages"
%div.body
- unless @facade.commentaires.empty?
%div.commentaires
- @facade.commentaires.object.sort.each do |commentaire|
= render partial: 'dossiers/commentaire', locals: {commentaire: commentaire}
.row
.col-lg-12.col-md-12.col-sm-12.col-xs-12
%div.split-hr
.row
%div.col-lg-12.col-md-12.col-sm-12.col-xs-12#new-commentaire
= form_tag(url_for({ controller: 'commentaires', action: :create, dossier_id: @facade.dossier.id, champ_id: @facade.champ_id }), class: 'form-inline', method: 'POST', multipart: true) do
%textarea.form-control{id: 'texte_commentaire', class: 'wysihtml5', name: 'texte_commentaire', style: 'width: 100%; margin-bottom:2%', rows: '5', placeholder:"Commentaire"}
%h4.text-primary{style: 'margin-top: 0px'} Ajouter un fichier
= file_field_tag "piece_justificative[content]", accept: PieceJustificative.accept_format, style: 'float: left; margin-left: 20px'
%input#save-message.form-control.btn.btn-send{ type: 'submit', value: 'ENVOYER' }
- if last_comment = @facade.commentaires.first
%div.last-commentaire
.row
%div.col-lg-12.col-md-12.col-sm-12.col-xs-12.comment-header
= "DERNIER MESSAGE (#{last_comment.header})"
.row
%div.col-lg-12.col-md-12.col-sm-12.col-xs-12.content
= last_comment.body.html_safe
- if file = last_comment.piece_justificative
.row
%div.col-lg-12.col-md-12.col-sm-12.col-xs-12.file
= link_to file.content_url, class: 'link', target: '_blank' do
%span.fa.fa-file
%div
= file.original_filename
.row
.col-lg-12.col-md-12.col-sm-12.col-xs-12
%div#open-message.new-action
ENVOYER UN MESSAGE
- else
.last-commentaire
.row
.col-lg-12.col-md-12.col-sm-12.col-xs-12
%div#open-message.new-action
ENVOYER UN MESSAGE
- if @facade.procedure.individual_with_siret - if @facade.procedure.individual_with_siret
.default_data_block .default_data_block
@ -59,7 +6,7 @@
%div.header %div.header
%div.col-lg-8.col-md-8.col-sm-8.col-xs-8.title-no-expanse %div.col-lg-8.col-md-8.col-sm-8.col-xs-8.title-no-expanse
%div.carret-right %div.carret-right
INFORMATIONS ENTREPRISE / ASSOCIATION INFORMATIONS DU DEMANDEUR
- if !@current_gestionnaire && ["draft", "updated", "replied", "initiated"].include?(@facade.dossier.state) - if !@current_gestionnaire && ["draft", "updated", "replied", "initiated"].include?(@facade.dossier.state)
%a#add_siret.action{href: users_dossier_add_siret_path(dossier_id: @facade.dossier.id)} %a#add_siret.action{href: users_dossier_add_siret_path(dossier_id: @facade.dossier.id)}
%div.col-lg-4.col-md-4.col-sm-4.col-xs-4.action %div.col-lg-4.col-md-4.col-sm-4.col-xs-4.action
@ -72,7 +19,7 @@
%div.col-lg-12.col-md-12.col-sm-12.col-xs-12.title %div.col-lg-12.col-md-12.col-sm-12.col-xs-12.title
%div.carret-right %div.carret-right
%div.carret-down %div.carret-down
INFORMATIONS ENTREPRISE / ASSOCIATION INFORMATIONS DU DEMANDEUR
%div.body %div.body
= render partial: '/dossiers/infos_entreprise' = render partial: '/dossiers/infos_entreprise'
@ -118,4 +65,3 @@
= (private_fields_count == 1) ? "1 champ" : "#{private_fields_count} champs" = (private_fields_count == 1) ? "1 champ" : "#{private_fields_count} champs"
%div.body %div.body
= render partial: '/dossiers/infos_private_fields' = render partial: '/dossiers/infos_private_fields'

View file

@ -0,0 +1,47 @@
.default_data_block{style:'margin-top: 40px'}
.row.show-block.clearfix#messages
.header
.col-xs-10.title
.carret-right
.carret-down
MESSAGERIE
.col-xs-2.count
- message_count = dossier_facade.commentaires.count
= (message_count == 1) ? "1 message" : "#{message_count} messages"
.alert.alert-info
Cette messagerie permet d'échanger entre le demandeur et le service instructeur.
.body
- if dossier_facade.commentaires.any?
.commentaires
= render partial: 'dossiers/commentaire', collection: dossier_facade.commentaires.object.sort
.split-hr
#new-commentaire
= 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{id: 'texte_commentaire', class: 'wysihtml5', name: 'texte_commentaire', style: 'width: 100%; margin-bottom:2%', rows: '5', placeholder:"Commentaire"}
.row
.col-md-6
%h4.text-primary{style: 'margin-top: 0px'} Ajouter un fichier
= file_field_tag "piece_justificative[content]", accept: PieceJustificative.accept_format, style: 'float: left; margin-left: 20px'
.col-md-6
%input#save-message.form-control.btn.btn-send{ type: 'submit', value: 'ENVOYER' }
.last-commentaire.clearfix
- if last_comment = dossier_facade.commentaires.first
%div
DERNIER MESSAGE
= render partial: 'dossiers/commentaire', object: last_comment
-# = "DERNIER MESSAGE (#{last_comment.header})"
-# .content
-# = last_comment.body.html_safe
-# - if file = last_comment.piece_justificative
-# .file
-# = link_to file.content_url, class: 'link', target: '_blank' do
-# %span.fa.fa-file
-# = file.original_filename
#open-message.new-action
ENVOYER UN MESSAGE

View file

@ -1,19 +1,20 @@
- if @dossier - if @dossier
= link_to 'X', users_no_procedure_url, class: 'btn btn-xs', style:'float: right' .panel.panel-default
.panel-body
= link_to 'X', users_no_procedure_url, class: 'btn btn-xs', style:'float: right'
- if @dossier.procedure.euro_flag - if @dossier.procedure.euro_flag
#euro_flag.flag #euro_flag.flag
=image_tag('drapeau_europe.png') =image_tag('drapeau_europe.png')
#logo_procedure.flag #logo_procedure.flag
=image_tag( @dossier.procedure.decorate.logo_img ) =image_tag( @dossier.procedure.decorate.logo_img )
%h2#titre_procedure.text-info %h2#titre_procedure.text-info
= @dossier.procedure.libelle = @dossier.procedure.libelle
%p %p.procedure-description
= h @dossier.procedure.description.html_safe = h @dossier.procedure.description.html_safe
- else - else
#logo_procedure.flag #logo_procedure.flag
= image_tag(image_url(LOGO_NAME), {id: 'logo_tps'}) = image_tag(image_url(LOGO_NAME), {id: 'logo_tps'})
%br