1 <?php |
1 <?php |
2 /* |
2 /* |
3 * This file is part of the WikiTagBundle package. |
3 * This file is part of the WikiTagBundle package. |
4 * |
4 * |
5 * (c) IRI <http://www.iri.centrepompidou.fr/> |
5 * (c) IRI <http://www.iri.centrepompidou.fr/> |
6 * |
6 * |
7 * For the full copyright and license information, please view the LICENSE |
7 * For the full copyright and license information, please view the LICENSE |
8 * file that was distributed with this source code. |
8 * file that was distributed with this source code. |
356 $ordered_tags = $this->getDoctrine()->getRepository('WikiTagBundle:DocumentTag')->findOrderedTagsForDoc($id_doc); |
355 $ordered_tags = $this->getDoctrine()->getRepository('WikiTagBundle:DocumentTag')->findOrderedTagsForDoc($id_doc); |
357 return $this->render('WikiTagBundle:WikiTag:tagTable.html.twig', array('ordered_tags' => $ordered_tags, 'doc_id' => $id_doc)); |
356 return $this->render('WikiTagBundle:WikiTag:tagTable.html.twig', array('ordered_tags' => $ordered_tags, 'doc_id' => $id_doc)); |
358 } |
357 } |
359 |
358 |
360 /** |
359 /** |
361 * |
360 * |
362 * TODO: Enter description here ... |
361 * TODO: Enter description here ... |
363 * TODO : implement |
362 * TODO : implement |
364 */ |
363 */ |
365 public function resetWpInfoAction() |
364 public function resetWpInfoAction() |
366 { |
365 { |
461 $search_def = array(); |
460 $search_def = array(); |
462 foreach ($letters as $l){ |
461 foreach ($letters as $l){ |
463 $search_def[$l[0]] = $l[0].WikiTagController::$SEARCH_STAR_CHARACTER; |
462 $search_def[$l[0]] = $l[0].WikiTagController::$SEARCH_STAR_CHARACTER; |
464 } |
463 } |
465 |
464 |
466 return $this->render('WikiTagBundle:WikiTag:TagList.html.twig', |
465 return $this->render('WikiTagBundle:WikiTag:TagList.html.twig', |
467 array('tags' => $tags, 'searched' => $searched, 'search_def' => $search_def, 'nb_by_page' => $nb_by_page, 'sort' => $sort, |
466 array('tags' => $tags, 'searched' => $searched, 'search_def' => $search_def, 'nb_by_page' => $nb_by_page, 'sort' => $sort, |
468 'start_index' => $start_index, 'end_index' => $end_index, 'nb_total' => $nb_total, 'num_page' => $num_page, 'last_page' => $last_page, |
467 'start_index' => $start_index, 'end_index' => $end_index, 'nb_total' => $nb_total, 'num_page' => $num_page, 'last_page' => $last_page, |
469 'prev_page' => $prev_page, 'next_page' => $next_page, 'reverse_sort' => $reverse_sort, 'route_for_documents_by_tag' => WikiTagController::$ROUTE_FOR_DOCUMENTS_BY_TAG)); |
468 '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"))); |
470 } |
469 } |
471 |
470 |
472 |
471 |
473 /** |
472 /** |
474 * Generic render partial template for tag list |
473 * Generic render partial template for tag list |
483 $nb_by_page = $ar[2]; |
482 $nb_by_page = $ar[2]; |
484 $searched = $ar[3]; |
483 $searched = $ar[3]; |
485 $sort = $ar[4]; |
484 $sort = $ar[4]; |
486 $reverse_sort = $ar[5]; |
485 $reverse_sort = $ar[5]; |
487 |
486 |
488 return $this->render('WikiTagBundle:WikiTag:TagListTable.html.twig', |
487 return $this->render('WikiTagBundle:WikiTag:TagListTable.html.twig', |
489 array('tags' => $tags, 'searched' => $searched, 'nb_by_page' => $nb_by_page, 'sort' => $sort, 'num_page' => $num_page, |
488 array('tags' => $tags, 'searched' => $searched, 'nb_by_page' => $nb_by_page, 'sort' => $sort, 'num_page' => $num_page, |
490 'reverse_sort' => $reverse_sort, 'route_for_documents_by_tag' => WikiTagController::$ROUTE_FOR_DOCUMENTS_BY_TAG)); |
489 'reverse_sort' => $reverse_sort, 'route_for_documents_by_tag' => WikiTagController::$ROUTE_FOR_DOCUMENTS_BY_TAG)); |
491 |
490 |
492 return $this->getAllTags(); |
491 return $this->getAllTags(); |
493 } |
492 } |
494 |
493 |