43 \Noalyss\Dbg::echo_file(__FILE__);
49 <
tr class=
"highlight">
51 <?php echo
_(
'Doc. n°')?>
59 <?php echo
_(
'Référence')?>
62 <?php echo $str_ag_ref;
68 <?php echo
_(
'Type')?>
71 <?php echo $str_doc_type;
79 <?php echo
_(
'Concerne')?>
82 <?php echo
$w->search().$w->input();
86 <
tr class=
"font-weight-bolder" style=
"background: lightsteelblue;color:navy">
87 <
td style=
"width: auto" colspan=
"2" >
93 <?php echo
_(
'Contact')?>
98 if (
$g_user->can_write_action($this->ag_id) ==
true ):
99 if ( $ag_contact->extra !=
"" ):
100 echo $ag_contact->search().$ag_contact->input();
102 echo
_(
'Pas de catégorie de contact');
109 <
tr class=
"font-weight-bolder" style=
"background: lightsteelblue;color:navy;opacity: 0.8">
110 <
td style=
"width: auto" colspan=
"2">
112 echo $spcontact->input();
121 <
td><?=
_(
"VideoConf")?></
td>
122 <
td><A href=
"<?=Document_Option::option_video_conf($this->dt_id)?>" target=
"_blank">
123 <?=
_(
"Salle de réunion")?>
129 <?php echo $spcontact->input(); ?>
138 <?php echo
_(
'Autres concernés')?>
141 <
span id=
"concerned_card_td">
145 echo $followup_other_concerned->display_linked_count();
146 if ($p_view !=
'READ' &&
$g_user->can_write_action($this->ag_id) ==
true ):
147 echo $followup_other_concerned->button_action_add_concerned_card();
153 http_build_query([
"gDossier"=>Dossier::id(),
154 "act"=>
"CSV:FollowUpContactOption",
156 echo HtmlInput::anchor(
_(
"Export CSV"),
$csv,
"",
' class="line" title="Export Contacts options"');
162 <?php
if ($p_view !=
'READ') echo $str_add_button;?>
171 <?php echo
_(
'Date')?>
174 <?php echo
$date->input();
180 <?php echo
_(
'Heure')?>
183 <?php echo $str_ag_hour;
190 <?php echo
_(
'Date limite')?>
193 <?php echo $remind_date->input();
199 <?php echo
_(
'Etat')?>
202 <?php echo $str_state;
209 <?php echo
_(
'Priorité')?>
212 <?php echo $str_ag_priority;
219 <?php echo
_(
'Groupe Gestion')?>
222 <?php echo $str_ag_dest;?>
224<?php
if ($this->
ag_id > 0 ): ?>
230 <
td id=
"action_tag_td" style=
"max-width:35rem">
232 $this->tag_cell($p_view);
241<div
id=
"choice_other_info_div" class=
"col-12 col-lg-6">
244 <ul
class=
"tabs noprint" >
245 <li
id=
"related_action_tab<?php echo $uniq?>" class=
"tabs_selected"><?php echo
_(
"Actions concernées")?></li>
246 <li
id=
"related_operation_tab<?php echo $uniq?>" class=
"tabs"><?php echo
_(
'Opérations concernées')?></li>
247 <li
id=
"dependant_action_tab<?php echo $uniq?>" class=
"tabs"><?php echo
_(
'Dépendant')?></li>
251 <div
id=
"related_operation_div<?php echo $uniq?>" style=
"display:none;" class=
"print concerned_action">
252 <?php
if ($p_view !=
'READ') echo
'<span class="noprint">'.$iconcerned->input().
'</span>';?>
258 if ( $p_view !=
'READ')
260 $js = HtmlInput::button_action_remove_operation(
$operation[$o][
'ago_id']);
261 echo
'<li id="op'.$operation[$o][
'ago_id'].
'">'.
$operation[$o][
'str_date'].
" "
268 echo
'<li >'.$operation[$o][
'str_date'].
" ".HtmlInput::detail_op(
$operation[$o][
'jr_id'],
$operation[$o][
'jr_internal']).
" ".
h(
$operation[$o][
'jr_comment']).
" "
279 <div
id=
"related_action_div<?php echo $uniq?>" class=
"print concerned_action" style=
"width: 95%" >
280 <div
class=
"" style=
"display:block">
283 <?php
if ( $p_view !=
'READ') echo $iaction->input();?>
284 <?=
\Icon_Action::detail(
'SmallDetailActionChildren'.
$uniq.
'_bt',
"$('related_action_div{$uniq}').addClassName('FullDetailActionChildren');$('FullDetailActionChildren{$uniq}_bt').show();$('SmallDetailActionChildren{$uniq}_bt').hide()")?>
286 echo \Icon_Action::hide_icon(
"FullDetailActionChildren{$uniq}_bt"
287 ,
"$('related_action_div{$uniq}').removeClassName('FullDetailActionChildren');$('FullDetailActionChildren{$uniq}_bt').hide();$('SmallDetailActionChildren{$uniq}_bt').show()");?>
290 $this->display_children($p_view,$p_base);
293 <script>$(
'FullDetailActionChildren<?=$uniq?>_bt').hide()</script>
296 <div
id=
"dependant_action_div<?php echo $uniq?>" style=
"display:none" class=
"print concerned_action">
299 $this->display_parent($p_view,$p_base);
307<div
style=
"clear: both"></div>
308<div
id=
"div_action_description">
311<script language=
"javascript">
312 function enlarge(p_id_textarea){
313 $(p_id_textarea).style.height=$(p_id_textarea).style.height+250+
'px';
314 $(
'bt_enlarge').style.display=
"none";
315 $(
'bt_small').style.display=
"inline";
317function small(p_id_textarea){
318 $(
'bt_enlarge').style.display=
"inline";
319 $(
'bt_small').style.display=
"none";
323 <
p style=
"margin-left:5%;">
324 <?php echo
$title->input();
327 <div
class=
"nicEdit-main">
334 $style_enl=
'style="display:inline"';
$style_small=
'style="display:none"';
344 if ( count($acomment)> 0) {
348 if ( $p_view !=
'READ' && $editable_description ==
true){
349 echo
h2(
_(
"Description"));
350 $itDescription=
new ITextarea(
"ag_description");
351 $itDescription->style=
'class="input_text field_follow_up" style="height:21rem;width:98%;margin-left:1em;"';
352 $itDescription->set_enrichText(
'enrich');
353 $ag_description_id= $acomment[0][
'agc_id'];
354 $itDescription->value=$acomment[0][
'agc_comment_raw'];
355 $itDescription->id=
"ag_description";
356 echo \HtmlInput::hidden(
"ag_description_id",$acomment[0][
'agc_id']);
358 echo $itDescription->input();
361 elseif ($p_view ==
'READ' || $editable_description ==
false)
363 echo
h2(
_(
"Description"));
364 echo
'<div class="nicEdit-main field_follow_up" style="margin-left:5%;margin-bottom:1rem;width:90%;">';
365 echo $acomment[0][
'agc_comment_raw'];
369 }
elseif ( count($acomment)> 0 && $p_view !=
'READ') {
371 echo
h2(
_(
"Description"));
374 echo
'<div class="textarea" style="margin-left:5%;margin-right:5%;margin-bottom:1rem;width:90%;">';
377 }
elseif ( $p_view !=
'READ' ) {
380 echo
h2(
_(
"Description"));
383 echo
'<div class="textarea" style="margin-left:5%;margin-right:5%;margin-bottom:1rem;width:90%;">';
388 if ( count($acomment) > 0 ) {
391 $aFile=$this->
db->get_array(
'select d_id,d_filename,d_description,d_mimetype
392 from action_comment_document
393 join document on (d_id=document_id) where action_gestion_comment_id=$1'
394 , array($acomment[0][
'agc_id']));
396 echo
'<div style="left:10%">';
397 echo
_(
"Fichiers :");
400 $url=
"export.php?".http_build_query(array(
"act"=>
'RAW:document'
402 ,
"d_id"=>
$file[
"d_id"]));
403 printf(
'<a class="print_line" href="%s" download>%s</a>',
416 if (count($acomment) > 1 ) {
417 echo
h2(
_(
"Commentaire"));
418 $comment=
new ITextarea(
"ag_comment_edit");
419 $comment->set_enrichText(
"plain");
420 $comment->style=
'class="input_text field_follow_up" style="height:21rem;width:98%;margin-left:5%;"';
422 $ag_comment_id= (count($acomment) > 1)?$acomment[1][
'agc_id']:-1;
423 $comment->value=(count($acomment) > 1 )?$acomment[1][
'agc_comment']:
'';
424 $comment->id=
"ag_comment_edit";
426 if ( $p_view !=
'READ') {
430 $editable_comment->add_json_param(
"op",
"followup_comment_oneedit");
431 $editable_comment->add_json_param(
"agc_id", $ag_comment_id);
432 $editable_comment->add_json_param(
"ag_id",
$ag_id);
433 $editable_comment->add_json_param(
"gDossier", Dossier::id());
434 $editable_comment->set_callback(
"ajax_misc.php");
436 echo $editable_comment->input();
439 echo $comment->display();
443 echo
'<span class="noprint">';
445 echo
h2(
_(
"Commentaire"));
456 if ( count($acomment) > 0
460 echo
h2(
_(
"Commentaire"));
462 for(
$c=1;
$c<count($acomment);
$c++){
463 $m_desc=
_(
'Commentaire');
465 $comment_style=
'style="margin-left:5%;margin-bottom:auto;width:90%;font-weight:bold"';
466 if ( $p_view !=
'READ' &&
$c > 0)
468 $rmComment=sprintf(
"return confirm_box(null,'".
_(
'Voulez-vous effacer ce commentaire').
469 " ?',function() {remove_comment('%s','%s');});",
471 $acomment[
$c][
'agc_id']);
473 $comment=
span(
h($m_desc.
' '.$acomment[
$c][
'agc_id'].
'('.$acomment[
$c][
'tech_user'].
" ".
474 $acomment[
$c][
'str_agc_date'].
')'),$comment_style).$js.
475 '<div class="nicEdit-main field_follow_up" style="margin-left:5%;margin-bottom:auto;width:90%" id="com'.$acomment[
$c][
'agc_id'].
'"> '.
476 " ".$acomment[
$c][
'agc_comment_raw'].
'</div>'
482 $comment=
span(
h($m_desc.
' '.$acomment[
$c][
'agc_id'].
'('.$acomment[
$c][
'tech_user'].
" ".
483 $acomment[
$c][
'str_agc_date'].
')'),$comment_style).
484 '<div class="field_follow_up" id="com'.$acomment[
$c][
'agc_id'].
'"> '.
485 " ".$acomment[
$c][
'agc_comment_raw'].
'</div>'
490 $comment=preg_replace(
'/ #([0-9]+)/',
' <a class="line" href="javascript:void()" onclick="view_action(\1,'.
491 Dossier::id().
',0)" >\1</a>',$comment);
495 $aFile=$this->
db->get_array(
'select d_id,d_filename,d_description,d_mimetype
496 from action_comment_document
497 join document on (d_id=document_id) where action_gestion_comment_id=$1'
498 , array( $acomment[
$c][
'agc_id']));
500 echo
'<div style="left:10%">';
501 echo
_(
"Fichiers :");
504 $url=
"export.php?".http_build_query(array(
"act"=>
'RAW:document'
506 ,
"d_id"=>
$file[
"d_id"]));
507 printf(
'<a class="print_line" href="%s">%s</a>',
516 echo
'<span class="noprint">';
517 echo
'<div style="margin-left:5%;margin-top:2.5rem">';
522 if ($p_view ==
'UPD') {
551<div
style=
"clear:both"></div>
552<?php
if ($p_view !=
'READ') : ?>
553 <div
class=
"noprint">
554 <h3 >Fichiers à ajouter: </h3>
557 <?php echo $upload->input();
561 $js=
"document.getElementById('add_file').removeChild(this.parentNode)";
567 <input
type=
"button" class=
"smallbutton" onclick=
"addFiles();" value=
"<?php echo _("Ajouter un fichier
")?>">
569<script language=
"javascript">
572 docAdded=document.getElementById(
'add_file');
573 new_element=document.createElement(
'li');
574 new_element.innerHTML=
'<input class="inp" type="file" value="" multiple name="file_upload[]"/>';
576 new_element.innerHTML+=
'<span id="<?=uniqid("file")?>" onclick="document.getElementById(\'add_file\').removeChild(this.parentNode)" class="icon"></span>';
580 docAdded.appendChild(new_element);
582catch(exception) {
alert(
'<?php echo j(_('Je ne peux pas ajouter de fichier
'))?>');
alert(exception.message);}
588<?php
if (($p_view !=
'READ' && $str_select_doc !=
'' )|| ! empty ($aAttachedFile)) : ?>
589<div
id=
"div_action_attached_doc">
590 <
h2 class=
"h-section" style=
"cursor:pointer" id=
"h2_action_attached<?=$uniq?>">
592 $a=
_(
'Pièces attachées');
594 $class=( count($aAttachedFile)>0)?
"cell highlight":
"";
595 printf(
'%s <span class="%s"> (%s)</span>',
$a,
$class,count($aAttachedFile));
601 $(
"h2_action_attached<?=$uniq?>").addEventListener(
'click',
function() {
602 $(
'all_attached_files_div<?=$uniq?>').show();
608 <div
class=
"noprint">
615 <?php
if ($p_view !=
'READ' && $str_select_doc !=
'') : ?>
616 <?php echo
_(
'Document à générer')?>
618 <?php echo $str_select_doc;
619 echo $str_submit_generate;
630 if ( ! empty ($aAttachedFile)) :
632 <div
id=
"icon_show_file_div_id<?=$uniq?>">
635 printf (
"Voir tous les fichiers");
637 echo \Icon_Action::show_icon(uniqid(),
"$('all_attached_files_div{$uniq}').show();$('icon_show_file_div_id{$uniq}').hide()");
640 <div
class=
"print" style=
"display: none" id=
"all_attached_files_div<?=$uniq?>">
642 echo
"Cacher les fichiers";
643 echo \Icon_Action::hide_icon(uniqid(),
"$('all_attached_files_div{$uniq}').hide();$('icon_show_file_div_id{$uniq}').show()")
647for (
$i=0;
$i<
sizeof($aAttachedFile);
$i++) :
652 <A class=
"print line" style=
"display:inline" id=
"<?php echo "doc
".$aAttachedFile[$i]['d_id'];?>" href=
"<?php echo $aAttachedFile[$i]['link']?>">
653 <?php echo $aAttachedFile[
$i][
'd_filename'];?> </a>
659 if ($p_view !=
'READ') :
664 $inplace_description->set_callback(
"ajax_misc.php");
665 $inplace_description->add_json_param(
"d_id", $aAttachedFile[
$i][
'd_id']);
666 $inplace_description->add_json_param(
"gDossier", Dossier::id());
667 $inplace_description->add_json_param(
"op",
"update_comment_followUp");
668 echo $inplace_description->input();
670 echo
h($aAttachedFile[
$i][
'd_description']);
673<?php $rmDoc=sprintf(
"return confirm_box(null,'".
_(
'Voulez-vous effacer le document').
" %s' , function(){remove_document('%s','%s');});",
674 $aAttachedFile[
$i][
'd_filename'],
676 $aAttachedFile[
$i][
'd_id']);
680 <?php
if ($p_view !=
'READ') : ?> <
span class=
"icon" id=
"<?php echo "ac
".$aAttachedFile[$i]['d_id'];?>" href=
"javascript:void(0)" onclick=
"<?php echo $rmDoc;?>"></
span><?php
endif;?>
693 $url=
"export.php?".http_build_query([
695 "act"=>
"RAW:document",
696 "gDossier"=>Dossier::id(),
698 "ag_id"=>$this->
ag_id,
707<?php
if ($p_view !=
'NEW') : ?>
708Document créé le <?php echo $this->ag_timestamp ?> par <?php echo $this->ag_owner?>
714 $(
'related_action_tab<?php echo $uniq?>').onclick=
function() {
715 $(
'related_action_tab<?php echo $uniq?>').className=
'tabs_selected';
716 $(
'related_operation_tab<?php echo $uniq?>').className=
'tabs';
717 $(
'dependant_action_tab<?php echo $uniq?>').className=
'tabs';
718 $(
'related_operation_div<?php echo $uniq?>').hide();
719 $(
'dependant_action_div<?php echo $uniq?>').hide();
720 $(
'related_action_div<?php echo $uniq?>').show();
722 $(
'related_operation_tab<?php echo $uniq?>').onclick=
function() {
723 $(
'related_operation_tab<?php echo $uniq?>').className=
'tabs_selected';
724 $(
'related_action_tab<?php echo $uniq?>').className=
'tabs';
725 $(
'dependant_action_tab<?php echo $uniq?>').className=
'tabs';
726 $(
'related_action_div<?php echo $uniq?>').hide();
727 $(
'dependant_action_div<?php echo $uniq?>').hide();
728 $(
'related_operation_div<?php echo $uniq?>').show();
730 $(
'dependant_action_tab<?php echo $uniq?>').onclick=
function() {
731 $(
'dependant_action_tab<?php echo $uniq?>').className=
'tabs_selected';
732 $(
'related_action_tab<?php echo $uniq?>').className=
'tabs';
733 $(
'related_operation_tab<?php echo $uniq?>').className=
'tabs';
734 $(
'related_operation_div<?php echo $uniq?>').hide();
735 $(
'related_action_div<?php echo $uniq?>').hide();
736 $(
'dependant_action_div<?php echo $uniq?>').show();
h2($p_string, $p_class="", $raw="")
span($p_string, $p_extra='')
tr($p_string, $p_extra='')
td($p_string='', $p_extra='')
surround the string with td
alert($p_msg, $buffer=false)
alert in javascript
global $g_user
if no group available , then stop
h( $row[ 'oa_description'])
foreach($array as $idx=> $m) $w
_("actif, passif,charge,...")
static is_enable_editable_description($p_document_type)
returns true if it is possible to edit the description , otherwise false
static can_add_comment($p_id)
Returns true if we can add a comment , or false if it is not possible.
static is_enable_video_conf($p_document_type)
returns true there is a videoconf enable
static is_enable_contact_multiple($p_document_type)
returns true if the operation_detail is enable, otherwise false
static option_comment($p_document_type)
returns option from the operation_detail
static is_enable_operation_detail($p_document_type)
returns true if the operation_detail is enable, otherwise false
Class Document corresponds to the table document.
static display(Follow_Up $p_follow_up, $p_view)
Others concerned card in an action.
Manage the TEXTAREA html element.
static detail($p_id, $p_javascript)
static trash($p_id, $p_javascript)
Display the icon of a trashbin.
Inplace_edit class for ajax update of HtmlInput object.
if(count($acomment)> 0) elseif(count( $acomment)> 0 &&$p_view !='READ') elseif( $p_view !='READ') $aFile
if( $delta< 0) elseif( $delta==0)