Dossier content displayed by default on dossiers#show
This commit is contained in:
parent
dddb8c193d
commit
3772fee85f
4 changed files with 20 additions and 17 deletions
|
@ -2,12 +2,14 @@ $(document).on('page:load', init_default_data_block);
|
|||
$(document).ready(init_default_data_block);
|
||||
|
||||
function init_default_data_block() {
|
||||
$('.default_data_block #dossier .body').toggle();
|
||||
|
||||
$('.default_data_block .title').click(function () {
|
||||
toggle_default_data_bloc(this, 400);
|
||||
});
|
||||
|
||||
$('.new-action').click(function () {
|
||||
var messages_block = $(this).parents().closest(".default_data_block").find(".title")
|
||||
var messages_block = $(this).parents().closest('.default_data_block').find('.title')
|
||||
toggle_default_data_bloc(messages_block, 400);
|
||||
});
|
||||
|
||||
|
@ -17,13 +19,13 @@ function init_default_data_block() {
|
|||
|
||||
function toggle_default_data_bloc(element, duration){
|
||||
var block = $(element).parents('.show-block');
|
||||
if (block.attr("id") == "messages") {
|
||||
block.children(".last-commentaire").toggle();
|
||||
if (block.attr('id') == 'messages') {
|
||||
block.children('.last-commentaire').toggle();
|
||||
}
|
||||
|
||||
block.children(".body").slideToggle(duration);
|
||||
block.children('.body').slideToggle(duration);
|
||||
|
||||
block.find(".carret-right").toggle();
|
||||
block.find(".carret-down").toggle();
|
||||
block.find('.carret-right').toggle();
|
||||
block.find('.carret-down').toggle();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,4 +13,4 @@ function init_modal_commentaire() {
|
|||
$("#modalCommentairesDossierParChamp").on("hidden.bs.modal", function (e) {
|
||||
body.html(originalBody);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,6 +75,9 @@
|
|||
}
|
||||
.depositaire-info {
|
||||
}
|
||||
.comments {
|
||||
margin-right: -10px;
|
||||
}
|
||||
.dossier-title {
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
|
|
|
@ -28,23 +28,21 @@
|
|||
-@facade.champs.each do |champ|
|
||||
.row
|
||||
%div.col-md-6.col-lg-6.depositaire-label= champ.libelle
|
||||
%div.col-md-1.col-lg-1.depositaire-info
|
||||
-if gestionnaire_signed_in?
|
||||
= link_to "COM", "", "data-href" => backoffice_dossier_commentaires_path(@facade.dossier, champs_id: champ.id),
|
||||
"data-toggle" => "modal", "data-target" => "#modalCommentairesDossierParChamp"
|
||||
-else
|
||||
= link_to "COM", "", "data-href" => users_dossier_commentaires_path(@facade.dossier, champs_id: champ.id),
|
||||
"data-toggle" => "modal", "data-target" => "#modalCommentairesDossierParChamp"
|
||||
%div.col-md-1.col-lg-1.comments
|
||||
- if gestionnaire_signed_in?
|
||||
= link_to "", "data-href" => backoffice_dossier_commentaires_path(@facade.dossier, champs_id: champ.id), "data-toggle" => "modal", "data-target" => "#modalCommentairesDossierParChamp" do
|
||||
%i.fa.fa-comment-o
|
||||
- else
|
||||
= link_to "", "data-href" => users_dossier_commentaires_path(@facade.dossier, champs_id: champ.id), "data-toggle" => "modal", "data-target" => "#modalCommentairesDossierParChamp" do
|
||||
%i.fa.fa-commenting-o
|
||||
%div.col-md-5.col-lg-5.depositaire-info
|
||||
-unless champ.decorate.value.blank?
|
||||
- unless champ.decorate.value.blank?
|
||||
= champ.decorate.value.html_safe
|
||||
|
||||
.row
|
||||
.col-lg-12.col-md-12
|
||||
=render partial: '/dossiers/pieces_justificatives'
|
||||
|
||||
|
||||
|
||||
- if @facade.dossier.mandataire_social && gestionnaire_signed_in?
|
||||
.mandataire_social.text-success.center
|
||||
%br
|
||||
|
|
Loading…
Reference in a new issue