Task #1127 - Ajout évenement depuis tableau de bord ou agenda
Zoom on last actions and allows to go directly to FOLLOW
This commit is contained in:
parent
14f46d9408
commit
e01ea09556
5 changed files with 130 additions and 1 deletions
|
|
@ -720,7 +720,10 @@ EOF;
|
|||
case 'modele_modify':
|
||||
require_once NOALYSS_INCLUDE.'/ajax_admin.php';
|
||||
break;
|
||||
|
||||
// From dashboard, display detail about last operation
|
||||
case 'action_show':
|
||||
require_once NOALYSS_INCLUDE.'/ajax_gestion.php';
|
||||
break;
|
||||
default:
|
||||
var_dump($_GET);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,3 +265,27 @@ function successRemoveStock(request,json)
|
|||
alert("success_box"+e.message);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @brief display details of the last actions in management
|
||||
* called from dashboard
|
||||
* @param p_dossier : dossier id
|
||||
*/
|
||||
function action_show(p_dossier)
|
||||
{
|
||||
try {
|
||||
waiting_box();
|
||||
var action = new Ajax.Request('ajax_misc.php',
|
||||
{
|
||||
method:'get',
|
||||
parameters : {gDossier:p_dossier,'op':'action_show'},
|
||||
onSuccess : function(p_xml, p_text) {
|
||||
remove_waiting_box();
|
||||
add_div({id: 'action_list_div', style:"top:1%;width:90%;margin-left:5%" , cssclass: 'inner_box'});
|
||||
$('action_list_div').innerHTML=p_xml.responseText;
|
||||
}
|
||||
});
|
||||
} catch (e)
|
||||
{
|
||||
alert('action_show '+e.message);
|
||||
}
|
||||
}
|
||||
|
|
@ -1951,3 +1951,12 @@ ul.aligned-block li {
|
|||
background: snow;
|
||||
margin-top: 50px;
|
||||
}
|
||||
td.cut {
|
||||
max-width: 25%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
td.box {
|
||||
border-left: #9999ff solid 1px;
|
||||
}
|
||||
36
include/ajax_gestion.php
Normal file
36
include/ajax_gestion.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/*
|
||||
* This file is part of NOALYSS.
|
||||
*
|
||||
* NOALYSS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* NOALYSS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with NOALYSS; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
// Copyright 2015 Author Dany De Bontridder danydb@aevalys.eu
|
||||
/**
|
||||
* @file
|
||||
* @brief display a box containing last actions
|
||||
*/
|
||||
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
|
||||
if ( $op == 'action_show')
|
||||
{
|
||||
/**
|
||||
* display action
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE.'/class_follow_up.php';
|
||||
$gestion=new Follow_Up($cn);
|
||||
$array=$gestion->get_last(25);
|
||||
$len_array=count($array);
|
||||
require_once NOALYSS_INCLUDE.'/template/action_show.php';
|
||||
}
|
||||
57
include/template/action_show.php
Normal file
57
include/template/action_show.php
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
/*
|
||||
* * Copyright (C) 2015 Dany De Bontridder <dany@alchimerys.be>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief display the last action
|
||||
* inherited parameter : $cn database connection, $array
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE.'/class_default_menu.php';
|
||||
$a_default=new Default_Menu();
|
||||
|
||||
echo HtmlInput::title_box(_('Suivi'), 'action_list_div');
|
||||
?>
|
||||
<table style="width: 100%">
|
||||
<?php
|
||||
for ($i=0;$i < $len_array;$i++) :
|
||||
?>
|
||||
<tr class=" <?php echo ($i%2==0)?'even':'odd'?>">
|
||||
<td class="box">
|
||||
<?php echo smaller_date($array[$i]['ag_timestamp_fmt']) ;?>
|
||||
</td>
|
||||
<td class="box">
|
||||
<?php echo HtmlInput::detail_action($array[$i]['ag_id'], $array[$i]['ag_ref'], 1) ?>
|
||||
</td>
|
||||
<td class="box">
|
||||
<?php echo mb_substr(h($array[$i]['vw_name']),0,15)?>
|
||||
</td>
|
||||
<td class="box cut">
|
||||
<?php echo h($array[$i]['ag_title'])?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endfor;
|
||||
?>
|
||||
</table>
|
||||
<p style="text-align: center">
|
||||
<a class="smallbutton" target="_blank" href="?gDossier=<?php echo Dossier::id()?>&ac=<?php echo $a_default->get('code_follow')?>"><?php echo _('Gestion')?></a>
|
||||
</p>
|
||||
Loading…
Add table
Add a link
Reference in a new issue