Commit 4dd5a472 authored by Mat's avatar Mat

corrections

parent 547acb07
......@@ -3,32 +3,10 @@
namespace PotageBundle\Controller;
use APIBundle\Form\OffreLegumesAPIType;
class OffreLegumesController extends MasterController
{
/**
* @param $id
* @return \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpKernel\Exception\NotFoundHttpException
* @throws \Doctrine\ORM\NonUniqueResultException
*/
public function ajaxDisplayAction($id)
{
$offre = $this->getDoctrine()->getManager()
->getRepository('PotageBundle:Offre')->findOneForAPIRead($id);
if ($offre === null) {
return $this->createNotFoundException('Non trouvé');
}
$form = $this->createForm(OffreLegumesAPIType::class);
return $this->render('@Potage/OffreLegumes/ajaxDisplay.html.twig', array(
'id' => $id,
'offre' => $offre,
'formOffreLegumes' => $form->createView()
));
}
}
......@@ -256,12 +256,8 @@
let referenceBtn = document.createElement('a');
let href = Routing.generate('potage_offre_legumes_ajax_display', {'id': jsonRow.id });
referenceBtn.setAttribute('href', href);
<<<<<<< Updated upstream
referenceBtn.setAttribute('title', 'Éditer');
referenceBtn.classList.add('btn', 'btn-outline-dark', 'btn-sm', 'mb-2', 'mr-2');
=======
referenceBtn.classList.add('btn', 'btn-outline-dark', 'btn-sm');
>>>>>>> Stashed changes
referenceBtn.textContent = jsonRow.reference;
td6.appendChild(referenceBtn);
if (jsonRow.status === 'draft')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment