diff -r 38dcd2db04e4 -r 6c87166b819c Controller/WikiTagController.php --- a/Controller/WikiTagController.php Thu Nov 10 12:40:22 2011 +0100 +++ b/Controller/WikiTagController.php Tue Nov 15 12:27:02 2011 +0100 @@ -59,7 +59,20 @@ } // ... so we create is json like {"":""},{"Créateur":"Créateur"},{"Datation":"Datation"},... $categories = json_encode($ar); - return $this->render('WikiTagBundle:WikiTag:javascript.html.twig', array('categories' => $categories,'tags_list' => $tags_list)); + return $this->render('WikiTagBundle:WikiTag:javascript.html.twig', array('categories' => $categories, 'tags_list' => $tags_list)); + } + + /** + * Renders the little html to add the javascript for context search + */ + public function addJavascriptForContextSearchAction($context_name) + { + // WARNING : PREREQUISITE : the request to add a tag needs the external document id, + // which is gotten by the jQuery call $('#wikitag_document_id').val() in the page. + // So the page holding this context search MUST have a input value with this id. + // We add the reactive selectors + $reactive_selectors = $this->container->getParameter("wiki_tag.reactive_selectors"); + return $this->render('WikiTagBundle:WikiTag:javascriptForContextSearch.html.twig', array('reactive_selectors' => $reactive_selectors)); } /**