Reprise sur erreur à partir de la ligne en erreur

This commit is contained in:
Michael RICOIS 2012-04-30 12:30:47 +00:00
parent f0e05f752c
commit 798c2defb2
3 changed files with 24 additions and 1 deletions

View File

@ -90,5 +90,20 @@ class IndexController extends Zend_Controller_Action
}
}
public function repriseAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$id = $request->getParam('id');
if (!empty($id)){
$commandesM = new Application_Model_Commandes();
$data = array(
'error' => '',
);
$commandesM->update($data, "id=$id");
}
exec("php ".APPLICATION_PATH."/../batch/enrichissement.php --reprise --id ".$id." &");
}
}

View File

@ -61,7 +61,9 @@
<td><?=$file->error?></td>
<td>
<a class="restart" href="<?=$this->url(array('action'=>'restart', 'id'=>$file->id))?>">Remise à zéro et redémarrage</a>
<?php if ( !empty($file->error) ) {?>
| <a class="reprise" href="<?=$this->url(array('action'=>'reprise', 'id'=>$file->id))?>">Reprise manuelle sur erreur</a>
<?php }?>
</td>
</tr>
<?php }?>

View File

@ -31,6 +31,12 @@ $(document).ready(function(){
}
});
$('a.reprise').click(function(e){
e.preventDefault();
var href = $(this).attr('href');
window.location = href;
});
//Focus entrant sur le document, on relance le script
$(document).focusin(function(){
updateInfo();