67 $columns_array = null; |
67 $columns_array = null; |
68 if($profile_array!=null && $profile_name!=null && $profile_name!=""){ |
68 if($profile_array!=null && $profile_name!=null && $profile_name!=""){ |
69 $columns_array = $profile_array[$profile_name]; |
69 $columns_array = $profile_array[$profile_name]; |
70 } |
70 } |
71 |
71 |
72 return $this->render('WikiTagBundle:WikiTag:javascript.html.twig', array('categories' => $categories, 'tags_list' => $tags_list, 'columns' => $columns_array, 'read_only' => $read_only)); |
72 return $this->render('WikiTagBundle:WikiTag:javascript.html.twig', |
|
73 array('wikipedia_api_url' => $this->container->getParameter("wiki_tag.url_templates")["wikipedia_api"], |
|
74 'categories' => $categories, |
|
75 'tags_list' => $tags_list, |
|
76 'columns' => $columns_array, |
|
77 'read_only' => $read_only)); |
73 } |
78 } |
74 |
79 |
75 /** |
80 /** |
76 * Renders the little html to add the javascript for context search |
81 * Renders the little html to add the javascript for context search |
77 */ |
82 */ |
107 $columns_array = $profile_array[$profile_name]; |
112 $columns_array = $profile_array[$profile_name]; |
108 } |
113 } |
109 |
114 |
110 $ordered_tags = $this->getDoctrine()->getRepository('WikiTagBundle:DocumentTag')->findOrderedTagsForDoc($id_doc); |
115 $ordered_tags = $this->getDoctrine()->getRepository('WikiTagBundle:DocumentTag')->findOrderedTagsForDoc($id_doc); |
111 //$ordered_tags = null; |
116 //$ordered_tags = null; |
112 return $this->render('WikiTagBundle:WikiTag:documentTags.html.twig', array('ordered_tags' => $ordered_tags, 'doc_id' => $id_doc, 'columns' => $columns_array, 'profile_name' => $profile_name)); |
117 return $this->render('WikiTagBundle:WikiTag:documentTags.html.twig', |
|
118 array('ordered_tags' => $ordered_tags, |
|
119 'doc_id' => $id_doc, |
|
120 'columns' => $columns_array, |
|
121 'profile_name' => $profile_name, |
|
122 'wikipedia_opensearch_url' => $this->container->getParameter("wiki_tag.url_templates")["wikipedia_opensearch"])); |
113 } |
123 } |
114 |
124 |
115 /** |
125 /** |
116 * |
126 * |
117 * The action called when a tag is moved in a document tag list. |
127 * The action called when a tag is moved in a document tag list. |
396 $columns_array = null; |
406 $columns_array = null; |
397 if($profile_array!=null && $profile_name!=null && $profile_name!=""){ |
407 if($profile_array!=null && $profile_name!=null && $profile_name!=""){ |
398 $columns_array = $profile_array[$profile_name]; |
408 $columns_array = $profile_array[$profile_name]; |
399 } |
409 } |
400 $ordered_tags = $this->getDoctrine()->getRepository('WikiTagBundle:DocumentTag')->findOrderedTagsForDoc($id_doc); |
410 $ordered_tags = $this->getDoctrine()->getRepository('WikiTagBundle:DocumentTag')->findOrderedTagsForDoc($id_doc); |
401 return $this->render('WikiTagBundle:WikiTag:tagTable.html.twig', array('ordered_tags' => $ordered_tags, 'doc_id' => $id_doc, 'columns' => $columns_array, 'profile_name' => $profile_name)); |
411 return $this->render('WikiTagBundle:WikiTag:tagTable.html.twig', |
|
412 array('ordered_tags' => $ordered_tags, |
|
413 'doc_id' => $id_doc, |
|
414 'columns' => $columns_array, |
|
415 'profile_name' => $profile_name, |
|
416 'wikipedia_opensearch_url' => $this->container->getParameter("wiki_tag.url_templates")["wikipedia_opensearch"])); |
402 } |
417 } |
403 |
418 |
404 |
419 |
405 /** |
420 /** |
406 * Action to update the tag alias. |
421 * Action to update the tag alias. |
491 foreach ($letters as $l){ |
506 foreach ($letters as $l){ |
492 $search_def[$l[0]] = $l[0].WikiTagController::$SEARCH_STAR_CHARACTER; |
507 $search_def[$l[0]] = $l[0].WikiTagController::$SEARCH_STAR_CHARACTER; |
493 } |
508 } |
494 |
509 |
495 return $this->render('WikiTagBundle:WikiTag:TagList.html.twig', |
510 return $this->render('WikiTagBundle:WikiTag:TagList.html.twig', |
496 array('tags' => $tags, 'searched' => $searched, 'search_def' => $search_def, 'nb_by_page' => $nb_by_page, 'sort' => $sort, |
511 array('tags' => $tags, |
497 'start_index' => $start_index, 'end_index' => $end_index, 'nb_total' => $nb_total, 'num_page' => $num_page, 'last_page' => $last_page, |
512 'searched' => $searched, |
498 'prev_page' => $prev_page, 'next_page' => $next_page, 'reverse_sort' => $reverse_sort, 'route_for_documents_by_tag' => $this->container->getParameter("wiki_tag.route_for_documents_by_tag"))); |
513 'search_def' => $search_def, |
|
514 'nb_by_page' => $nb_by_page, |
|
515 'sort' => $sort, |
|
516 'start_index' => $start_index, |
|
517 'end_index' => $end_index, |
|
518 'nb_total' => $nb_total, |
|
519 'num_page' => $num_page, |
|
520 'last_page' => $last_page, |
|
521 'prev_page' => $prev_page, |
|
522 'next_page' => $next_page, |
|
523 'reverse_sort' => $reverse_sort, |
|
524 'route_for_documents_by_tag' => $this->container->getParameter("wiki_tag.route_for_documents_by_tag"), |
|
525 'wikipedia_opensearch_url' => $this->container->getParameter("wiki_tag.url_templates")["wikipedia_opensearch"])); |
499 } |
526 } |
500 |
527 |
501 /** |
528 /** |
502 * Modify the tag in the context of all tags list. |
529 * Modify the tag in the context of all tags list. |
503 */ |
530 */ |
603 $searched = $ar[3]; |
630 $searched = $ar[3]; |
604 $sort = $ar[4]; |
631 $sort = $ar[4]; |
605 $reverse_sort = $ar[5]; |
632 $reverse_sort = $ar[5]; |
606 |
633 |
607 return $this->render('WikiTagBundle:WikiTag:TagListTable.html.twig', |
634 return $this->render('WikiTagBundle:WikiTag:TagListTable.html.twig', |
608 array('tags' => $tags, 'searched' => $searched, 'nb_by_page' => $nb_by_page, 'sort' => $sort, 'num_page' => $num_page, |
635 array('tags' => $tags, |
609 'reverse_sort' => $reverse_sort, 'route_for_documents_by_tag' => $this->container->getParameter("wiki_tag.route_for_documents_by_tag"))); |
636 'searched' => $searched, |
|
637 'nb_by_page' => $nb_by_page, |
|
638 'sort' => $sort, |
|
639 'num_page' => $num_page, |
|
640 'reverse_sort' => $reverse_sort, |
|
641 'route_for_documents_by_tag' => $this->container->getParameter("wiki_tag.route_for_documents_by_tag"), |
|
642 'wikipedia_opensearch_url' => $this->container->getParameter("wiki_tag.url_templates")["wikipedia_opensearch"])); |
610 } |
643 } |
611 |
644 |
612 /** |
645 /** |
613 * Generic to get all tags with the context (pagination number, nb by page, searched string, sort) |
646 * Generic to get all tags with the context (pagination number, nb by page, searched string, sort) |
614 */ |
647 */ |