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 $url_templates = $this->container->getParameter("wiki_tag.url_templates"); |
72 return $this->render('WikiTagBundle:WikiTag:javascript.html.twig', |
73 return $this->render('WikiTagBundle:WikiTag:javascript.html.twig', |
73 array('wikipedia_api_url' => $this->container->getParameter("wiki_tag.url_templates")["wikipedia_api"], |
74 array('wikipedia_api_url' => $url_templates["wikipedia_api"], |
74 'categories' => $categories, |
75 'categories' => $categories, |
75 'tags_list' => $tags_list, |
76 'tags_list' => $tags_list, |
76 'columns' => $columns_array, |
77 'columns' => $columns_array, |
77 'read_only' => $read_only)); |
78 'read_only' => $read_only)); |
78 } |
79 } |
111 if($profile_array!=null && $profile_name!=null && $profile_name!=""){ |
112 if($profile_array!=null && $profile_name!=null && $profile_name!=""){ |
112 $columns_array = $profile_array[$profile_name]; |
113 $columns_array = $profile_array[$profile_name]; |
113 } |
114 } |
114 |
115 |
115 $ordered_tags = $this->getDoctrine()->getRepository('WikiTagBundle:DocumentTag')->findOrderedTagsForDoc($id_doc); |
116 $ordered_tags = $this->getDoctrine()->getRepository('WikiTagBundle:DocumentTag')->findOrderedTagsForDoc($id_doc); |
|
117 $url_templates = $this->container->getParameter("wiki_tag.url_templates"); |
116 //$ordered_tags = null; |
118 //$ordered_tags = null; |
117 return $this->render('WikiTagBundle:WikiTag:documentTags.html.twig', |
119 return $this->render('WikiTagBundle:WikiTag:documentTags.html.twig', |
118 array('ordered_tags' => $ordered_tags, |
120 array('ordered_tags' => $ordered_tags, |
119 'doc_id' => $id_doc, |
121 'doc_id' => $id_doc, |
120 'columns' => $columns_array, |
122 'columns' => $columns_array, |
121 'profile_name' => $profile_name, |
123 'profile_name' => $profile_name, |
122 'wikipedia_opensearch_url' => $this->container->getParameter("wiki_tag.url_templates")["wikipedia_opensearch"])); |
124 'wikipedia_opensearch_url' => $url_templates["wikipedia_opensearch"])); |
123 } |
125 } |
124 |
126 |
125 /** |
127 /** |
126 * |
128 * |
127 * The action called when a tag is moved in a document tag list. |
129 * The action called when a tag is moved in a document tag list. |
406 $columns_array = null; |
408 $columns_array = null; |
407 if($profile_array!=null && $profile_name!=null && $profile_name!=""){ |
409 if($profile_array!=null && $profile_name!=null && $profile_name!=""){ |
408 $columns_array = $profile_array[$profile_name]; |
410 $columns_array = $profile_array[$profile_name]; |
409 } |
411 } |
410 $ordered_tags = $this->getDoctrine()->getRepository('WikiTagBundle:DocumentTag')->findOrderedTagsForDoc($id_doc); |
412 $ordered_tags = $this->getDoctrine()->getRepository('WikiTagBundle:DocumentTag')->findOrderedTagsForDoc($id_doc); |
|
413 $url_templates = $this->container->getParameter("wiki_tag.url_templates"); |
411 return $this->render('WikiTagBundle:WikiTag:tagTable.html.twig', |
414 return $this->render('WikiTagBundle:WikiTag:tagTable.html.twig', |
412 array('ordered_tags' => $ordered_tags, |
415 array('ordered_tags' => $ordered_tags, |
413 'doc_id' => $id_doc, |
416 'doc_id' => $id_doc, |
414 'columns' => $columns_array, |
417 'columns' => $columns_array, |
415 'profile_name' => $profile_name, |
418 'profile_name' => $profile_name, |
416 'wikipedia_opensearch_url' => $this->container->getParameter("wiki_tag.url_templates")["wikipedia_opensearch"])); |
419 'wikipedia_opensearch_url' => $url_templates["wikipedia_opensearch"])); |
417 } |
420 } |
418 |
421 |
419 |
422 |
420 /** |
423 /** |
421 * Action to update the tag alias. |
424 * Action to update the tag alias. |
505 $search_def = array(); |
508 $search_def = array(); |
506 foreach ($letters as $l){ |
509 foreach ($letters as $l){ |
507 $search_def[$l[0]] = $l[0].WikiTagController::$SEARCH_STAR_CHARACTER; |
510 $search_def[$l[0]] = $l[0].WikiTagController::$SEARCH_STAR_CHARACTER; |
508 } |
511 } |
509 |
512 |
|
513 $url_templates = $this->container->getParameter("wiki_tag.url_templates"); |
510 return $this->render('WikiTagBundle:WikiTag:TagList.html.twig', |
514 return $this->render('WikiTagBundle:WikiTag:TagList.html.twig', |
511 array('tags' => $tags, |
515 array('tags' => $tags, |
512 'searched' => $searched, |
516 'searched' => $searched, |
513 'search_def' => $search_def, |
517 'search_def' => $search_def, |
514 'nb_by_page' => $nb_by_page, |
518 'nb_by_page' => $nb_by_page, |
520 'last_page' => $last_page, |
524 'last_page' => $last_page, |
521 'prev_page' => $prev_page, |
525 'prev_page' => $prev_page, |
522 'next_page' => $next_page, |
526 'next_page' => $next_page, |
523 'reverse_sort' => $reverse_sort, |
527 'reverse_sort' => $reverse_sort, |
524 'route_for_documents_by_tag' => $this->container->getParameter("wiki_tag.route_for_documents_by_tag"), |
528 '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"])); |
529 'wikipedia_opensearch_url' => $url_templates["wikipedia_opensearch"])); |
526 } |
530 } |
527 |
531 |
528 /** |
532 /** |
529 * Modify the tag in the context of all tags list. |
533 * Modify the tag in the context of all tags list. |
530 */ |
534 */ |
629 $nb_by_page = $ar[2]; |
633 $nb_by_page = $ar[2]; |
630 $searched = $ar[3]; |
634 $searched = $ar[3]; |
631 $sort = $ar[4]; |
635 $sort = $ar[4]; |
632 $reverse_sort = $ar[5]; |
636 $reverse_sort = $ar[5]; |
633 |
637 |
|
638 $url_templates = $this->container->getParameter("wiki_tag.url_templates"); |
634 return $this->render('WikiTagBundle:WikiTag:TagListTable.html.twig', |
639 return $this->render('WikiTagBundle:WikiTag:TagListTable.html.twig', |
635 array('tags' => $tags, |
640 array('tags' => $tags, |
636 'searched' => $searched, |
641 'searched' => $searched, |
637 'nb_by_page' => $nb_by_page, |
642 'nb_by_page' => $nb_by_page, |
638 'sort' => $sort, |
643 'sort' => $sort, |
639 'num_page' => $num_page, |
644 'num_page' => $num_page, |
640 'reverse_sort' => $reverse_sort, |
645 'reverse_sort' => $reverse_sort, |
641 'route_for_documents_by_tag' => $this->container->getParameter("wiki_tag.route_for_documents_by_tag"), |
646 '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"])); |
647 'wikipedia_opensearch_url' => $url_templates["wikipedia_opensearch"])); |
643 } |
648 } |
644 |
649 |
645 /** |
650 /** |
646 * Generic to get all tags with the context (pagination number, nb by page, searched string, sort) |
651 * Generic to get all tags with the context (pagination number, nb by page, searched string, sort) |
647 */ |
652 */ |