Lien edition du cutoff
This commit is contained in:
parent
15759b99e6
commit
ea3f8b9c62
@ -201,39 +201,51 @@ class Legal_EvaluationController extends Zend_Controller_Action
|
||||
*/
|
||||
public function indiscoreAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/evaluation.js', 'text/javascript');
|
||||
$this->view->InputLinks = array();
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP'))
|
||||
if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP')) {
|
||||
$this->forward('perms', 'error');
|
||||
}
|
||||
|
||||
$request = $this->getRequest();
|
||||
$autrePage = $request->getParam('apage');
|
||||
$request = $this->getRequest();
|
||||
$autrePage = $request->getParam('apage');
|
||||
|
||||
// --- Récupération des informations
|
||||
if ( empty($autrePage) ) {
|
||||
$this->view->headTitle()->prepend('IndiScore');
|
||||
$this->view->headTitle()->prepend('Siret '.$this->siret);
|
||||
$plus = false;
|
||||
if ($user->checkPerm('indiscorep')){
|
||||
$plus = true;
|
||||
}
|
||||
$ref = $request->getParam('ref', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$email = $request->getParam('email', '');
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getIndiScore(substr($this->siret, 0,9), 0, 1, $plus, $ref, $encours, $email);
|
||||
if ($infos === false) $this->forward('soap', 'error');
|
||||
} else {
|
||||
$infos = $this->getRequest()->getParam('infos');
|
||||
// --- Récupération des informations
|
||||
if ( empty($autrePage) ) {
|
||||
$this->view->headTitle()->prepend('IndiScore');
|
||||
$this->view->headTitle()->prepend('Siret '.$this->siret);
|
||||
$plus = false;
|
||||
if ($user->checkPerm('indiscorep')){
|
||||
$plus = true;
|
||||
}
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('typeScore', $user->getTypeScore());
|
||||
$this->view->assign('indiscore', $infos);
|
||||
$this->view->assign('AutrePage', $autrePage);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$ref = $request->getParam('ref', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$email = $request->getParam('email', '');
|
||||
|
||||
$this->view->assign('aviscredit', $user->checkPerm('aviscredit'));
|
||||
$this->view->assign('surveillance', $user->checkPerm('survscore'));
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getIndiScore(substr($this->siret, 0,9), 0, 1, $plus, $ref, $encours, $email);
|
||||
if ($infos === false) $this->forward('soap', 'error');
|
||||
} else {
|
||||
$infos = $this->getRequest()->getParam('infos');
|
||||
}
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('typeScore', $user->getTypeScore());
|
||||
$this->view->assign('indiscore', $infos);
|
||||
$this->view->assign('AutrePage', $autrePage);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
|
||||
// Lien Scores Cutoff
|
||||
$this->view->InputLinks[] = array(
|
||||
'class' => 'dialog',
|
||||
'title' => 'Cut Off',
|
||||
'label' => '<span class="glyphicon glyphicon-scissors"></span> Cut Off',
|
||||
'href' => $this->view->url(array('module'=>'input', 'controller'=>'index',
|
||||
'action'=>'scorecutoff','siren'=>substr($this->siret, 0,9)), 'default', true),
|
||||
);
|
||||
|
||||
$this->view->assign('aviscredit', $user->checkPerm('aviscredit'));
|
||||
$this->view->assign('surveillance', $user->checkPerm('survscore'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,7 +28,7 @@
|
||||
<td width="30"> </td>
|
||||
<td width="200"></td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php echo $this->action('scorecutoff', 'index', 'input', array('siren'=>$this->indiscore->Siren)); ?>
|
||||
<?php //$this->action('scorecutoff', 'index', 'input', array('siren'=>$this->indiscore->Siren)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
|
@ -1,5 +1,4 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(function(){
|
||||
$('#customRapport').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var url = $(this).attr('href');
|
||||
@ -18,6 +17,25 @@ $(document).ready(function()
|
||||
};
|
||||
$('<div id="dialogcustomrapport"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
$('a.dialog').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var title = $(this).attr('title');
|
||||
var href = $(this).attr('href');
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 710,
|
||||
height: 530,
|
||||
modal: true,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...');
|
||||
$(this).load(href);
|
||||
},
|
||||
buttons: {"Fermer": function() { $(this).dialog('close'); }},
|
||||
close: function() { $('#dialog').remove(); }};
|
||||
$('<div id="dialog"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user