--- a/Controller/WikiTagController.php Wed May 16 18:17:19 2012 +0200
+++ b/Controller/WikiTagController.php Mon Jul 16 12:12:56 2012 +0200
@@ -50,7 +50,7 @@
* @param unknown_type $tags_list
* @return \Symfony\Bundle\FrameworkBundle\Controller\Response
*/
- public function addJavascriptAction($tags_list=false, $profile_name=null)
+ public function addJavascriptAction($tags_list=false, $profile_name=null, $read_only="false")
{
$cats = $this->getDoctrine()->getRepository('WikiTagBundle:Category')->findOrderedCategories();
// $cats is {"Label":"Créateur"},{"Label":"Datation"},...
@@ -68,7 +68,14 @@
if($profile_array!=null && $profile_name!=null && $profile_name!=""){
$columns_array = $profile_array[$profile_name];
}
- return $this->render('WikiTagBundle:WikiTag:javascript.html.twig', array('categories' => $categories, 'tags_list' => $tags_list, 'columns' => $columns_array));
+ // Set read_only if asked
+ if(strtolower($read_only)=="true"){
+ $read_only = true;
+ }
+ else{
+ $read_only = false;
+ }
+ return $this->render('WikiTagBundle:WikiTag:javascript.html.twig', array('categories' => $categories, 'tags_list' => $tags_list, 'columns' => $columns_array, 'read_only' => $read_only));
}
/**