SD-29 fil ariane + ergo du checkfile + poss de retirer une commande
This commit is contained in:
parent
f16b444ca8
commit
ad2c17750e
@ -5,12 +5,15 @@ class EnvoiController extends Zend_Controller_Action
|
||||
public function init()
|
||||
{
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/css/enrichissement.css');
|
||||
$this->view->assign('request', $this->getRequest());
|
||||
}
|
||||
|
||||
/**
|
||||
* Enter description here ...
|
||||
*/
|
||||
public function indexAction(){}
|
||||
public function indexAction(){
|
||||
$this->redirect('/');
|
||||
}
|
||||
|
||||
public function fileformAction()
|
||||
{
|
||||
@ -59,6 +62,8 @@ class EnvoiController extends Zend_Controller_Action
|
||||
if(!in_array($extension, $extValide)){
|
||||
echo "Extension de fichier incorrect !";
|
||||
} elseif (move_uploaded_file($tmp_name, $path.'/'.$idClient.'-'.$name.'.'.$extension)){
|
||||
$url='/envoi/checkfile/file/'.$idClient.'-'.$name.'.'.$extension;
|
||||
$this->redirect($url);
|
||||
echo "Fichier envoyé, <a href=\"".
|
||||
$this->view->url(array(
|
||||
'controller' => 'envoi',
|
||||
|
@ -117,14 +117,24 @@ class IndexController extends Zend_Controller_Action
|
||||
'fichierOut' => '',
|
||||
);
|
||||
|
||||
}else{
|
||||
$data = array(
|
||||
}
|
||||
if($option=='zero'){
|
||||
$data = array(
|
||||
'nbLigneT' => 0,
|
||||
'error' => '',
|
||||
'dateStart' => '0000-00-00 00:00:00',
|
||||
'fichierOut' => '',
|
||||
);
|
||||
}
|
||||
if($option=='back'){
|
||||
$data = array(
|
||||
'nbLigneT' => 0,
|
||||
'error' => '',
|
||||
'dateStart' => '0000-00-00 00:00:00',
|
||||
'fichierOut' => '',
|
||||
'idProfil' => 0,
|
||||
);
|
||||
}
|
||||
$commandesM->update($data, "id=$id");
|
||||
}
|
||||
$this->view->request=$request;
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?php echo $this->partial('/index/ariane.phtml',array('request' => $this->request));?>
|
||||
<div>
|
||||
<?php if (count($this->errors)>0) {?>
|
||||
<?php foreach($this->errors as $error) {?>
|
||||
@ -12,5 +13,5 @@
|
||||
</div>
|
||||
<?php }?>
|
||||
<div>
|
||||
<a href="<?=$this->url(array('controller'=>'index', 'action'=>'index'), null, true)?>">Accueil</a>
|
||||
<a class="btn btn-sm btn-info" href="<?=$this->url(array('controller'=>'index', 'action'=>'index'), null, true)?>">Accueil</a>
|
||||
</div>
|
@ -1,3 +1,4 @@
|
||||
<?php echo $this->partial('/index/ariane.phtml',array('request' => $this->request));?>
|
||||
<div>
|
||||
|
||||
<h2>Intégration d'un fichier</h2>
|
||||
|
@ -70,6 +70,10 @@ Le séparateur utilisé est la virgule (,).
|
||||
<td><?=$file->nbLigne?></td>
|
||||
<td><?=$file->error?></td>
|
||||
<td>
|
||||
|
||||
<?php if ( $file->nbLigneT==0 ):?>
|
||||
<a class="restart btn btn-sm btn-danger" href="<?=$this->url(array('action'=>'restart', 'id'=>$file->id,'option' => 'back'))?>">Retirer de<br>la file</a>
|
||||
<?php else:?>
|
||||
<a class="restart btn btn-sm btn-danger" href="<?=$this->url(array('action'=>'restart', 'id'=>$file->id,'option' => 'zero'))?>">Relance<br>complet</a>
|
||||
<?php if ( empty($file->error ) ):?>
|
||||
<a class="restart btn btn-sm btn-warning" href="<?=$this->url(array('action'=>'restart', 'id'=>$file->id, 'option' => 'last'))?>">Reprise<br>derniere ligne</a>
|
||||
@ -77,6 +81,7 @@ Le séparateur utilisé est la virgule (,).
|
||||
<?php if ( !empty($file->error && $file->error!="Demande de reprise") ) :?>
|
||||
<a class="reprise btn btn-sm btn-warning" href="<?=$this->url(array('action'=>'reprise', 'id'=>$file->id))?>">Reprise<br>sur erreur</a>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
|
@ -26,7 +26,7 @@ $(document).ready(function(){
|
||||
$('a.restart').click(function(e){
|
||||
e.preventDefault();
|
||||
var href = $(this).attr('href');
|
||||
if (confirm("Attention en cliquant sur Ok l'enrichissement va être reinitialiser")) {
|
||||
if (confirm("Attention en cliquant sur Ok l'enrichissement va être reinitialisé")) {
|
||||
window.location = href;
|
||||
}
|
||||
});
|
||||
@ -50,7 +50,6 @@ $(document).ready(function(){
|
||||
$('#submitfileform').click(function(e){
|
||||
var reference=$('input[name=ref]').val();
|
||||
var fichier=$('input[name=fichier]').val();
|
||||
alert(fichier);
|
||||
if(reference.length==0){
|
||||
e.preventDefault();
|
||||
$('#output').html('<span class="alert alert-danger">Renseigner la reference</span>');
|
||||
|
Loading…
Reference in New Issue
Block a user