Normalised all URLs

Signed-off-by: Gergely Polonkai <polesz@w00d5t0ck.info>
This commit is contained in:
Polonkai Gergely 2012-08-29 12:43:25 +02:00
parent c1532101ac
commit 5111f8b8cb
11 changed files with 109 additions and 104 deletions

View File

@ -27,7 +27,7 @@ security:
security: false
login:
pattern: ^/login$
pattern: ^/belepes.html$
security: false
stylesheets:
@ -42,19 +42,18 @@ security:
pattern: ^/
form_login:
check_path: /login_check
login_path: /login
check_path: /belepes.do
login_path: /belepes.html
logout:
path: /logout
path: /kilepes.do
target: /
anonymous: ~
access_control:
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/cikk/, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/jelentkezes, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/most_varj, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/jelentkezes.html, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/most-varj.html, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/, roles: [ IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED ] }
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
#- { path: ^/_internal/secure, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }

View File

@ -13,7 +13,7 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException;
class DefaultController extends Controller
{
/**
* @Route("/manage_regs", name="KekRozsakAdminBundle_manage_regs")
* @Route("/regisztraltak.html", name="KekRozsakAdminBundle_manage_regs")
* @Template()
*/
public function manageRegsAction()
@ -44,7 +44,7 @@ class DefaultController extends Controller
}
/**
* @Route("/csoport_jelentkezok", name="KekRozsakAdminBundle_groupJoinRequests")
* @Route("/csoport-jelentkezok.html", name="KekRozsakAdminBundle_groupJoinRequests")
* @Template()
*/
public function groupJoinRequestsAction()
@ -82,7 +82,7 @@ class DefaultController extends Controller
}
/**
* @Route("/csoport_jelentkezok/elutasit", name="KekRozsakAdminBundle_groupJoinDecline")
* @Route("/csoport-jelentkezok/elutasitas.html", name="KekRozsakAdminBundle_groupJoinDecline")
* @Template()
*/
public function groupJoinDeclineAction()

View File

@ -13,11 +13,11 @@ use KekRozsak\FrontBundle\Entity\Article;
class ArticleController extends Controller
{
/**
* @Route("/cikk/{slug}", name="KekRozsakFrontBundle_articleView")
* @param KekRozsak\FrontBundle\Entity\Article $article
*
* @Route("/cikk/{slug}.html", name="KekRozsakFrontBundle_articleView")
* @Template()
* @ParamConverter("article")
*
* @param KekRozsak\FrontBundle\Entity\Article $article
*/
public function viewAction(Article $article)
{

View File

@ -15,7 +15,7 @@ use KekRozsak\FrontBundle\Form\Type\BookType;
class BookController extends Controller
{
/**
* @Route("/konyvtar", name="KekRozsakFrontBundle_bookList", options={"expose" = true})
* @Route("/konyvtar/", name="KekRozsakFrontBundle_bookList", options={"expose" = true})
* @Template()
*/
public function listAction()
@ -65,11 +65,11 @@ class BookController extends Controller
}
/**
* @Route("/konyvadat/{id}/ajax.{_format}", name="KekRozsakFrontBundle_bookAjaxData", defaults={"_format": "html"}, options={"expose": true})
* @param KekRozsak\FrontBundle\Entity\Book $book
*
* @Route("/konyvtar/{id}/adatok.{_format}", name="KekRozsakFrontBundle_bookAjaxData", defaults={"_format": "html"}, options={"expose": true})
* @Template()
* @ParamConverter("book")
*
* @param KekRozsak\FrontBundle\Entity\Book $book
*/
public function ajaxDataAction(Book $book)
{
@ -79,10 +79,10 @@ class BookController extends Controller
}
/**
* @Route("/konyv/torles/{id}", name="KekRozsakFrontBundle_bookDeleteCopy", requirements={"id": "\d+"}, options={"expose": true})
* @ParamConverter("book")
*
* @param KekRozsak\FrontBundle\Entity\Book $book
*
* @Route("/konyvtar/{id}/torol.do}", name="KekRozsakFrontBundle_bookDeleteCopy", requirements={"id": "\d+"}, options={"expose": true})
* @ParamConverter("book")
*/
public function ajaxDeleteBookAction(Book $book)
{
@ -99,10 +99,10 @@ class BookController extends Controller
}
/**
* @Route("/konyv/ujpeldany/{id}", name="KekRozsakFrontBundle_bookAddCopy", requirements={"id": "\d+"}, options={"expose": true})
* @ParamConverter("book")
*
* @param KekRozsak\FrontBundle\Entity\Book $book
*
* @Route("/konyvtar/{id}/ujpeldany.do", name="KekRozsakFrontBundle_bookAddCopy", requirements={"id": "\d+"}, options={"expose": true})
* @ParamConverter("book")
*/
public function ajaxAddCopyAction(Book $book)
{
@ -119,14 +119,15 @@ class BookController extends Controller
}
/**
* @Route("/konyv/kolcsonozheto/{id}/{newValue}", name="KekRozsakFrontBundle_bookSetCopyBorrowable", requirements={"id": "\d+"}, options={"expose": true})
* @ParamConverter("book")
*
* @param KekRozsak\FrontBundle\Entity\Book $book
* @param boolean $newValue
*
* @Route("/konyvtar/{id}/kolcsonozheto.do/{newValue}", name="KekRozsakFrontBundle_bookSetCopyBorrowable", requirements={"id": "\d+"}, options={"expose": true})
* @ParamConverter("book")
*/
public function ajaxSetBookCopyBorrowableAction(Book $book, $newValue)
{
error_log($newValue);
$user = $this->get('security.context')->getToken()->getUser();
$copies = $book->getUsersCopies($user);
$em = $this->getDoctrine()->getEntityManager();
@ -140,11 +141,11 @@ class BookController extends Controller
}
/**
* @Route("/konyv/megveheto/{id}/{newValue}", name="KekRozsakFrontBundle_bookSetCopyForSale", requirements={"id": "\d+"}, options={"expose": true})
* @ParamConverter("book")
*
* @param KekRozsak\FrontBundle\Entity\Book $book
* @param boolean $newValue
*
* @Route("/konyvtar/{id}/megveheto.do/{newValue}", name="KekRozsakFrontBundle_bookSetCopyForSale", requirements={"id": "\d+"}, options={"expose": true})
* @ParamConverter("book")
*/
public function ajaxSetBookCopyForSaleAction(Book $book, $newValue)
{
@ -161,11 +162,11 @@ class BookController extends Controller
}
/**
* @Route("/konyv/szeretnek/{id}/{wantToBuy}", name="KekRozsakFrontBundle_bookWantOne", requirements={"id": "\d+"}, options={"expose": true})
* @ParamConverter("book")
*
* @param KekRozsak\FrontBundle\Entity\Book $book
* @param boolean $wantToBuy
*
* @Route("/konyvtar/{id}/szeretnek.do/{wantToBuy}", name="KekRozsakFrontBundle_bookWantOne", requirements={"id": "\d+"}, options={"expose": true})
* @ParamConverter("book")
*/
public function ajaxWantABookAction(Book $book, $wantToBuy)
{

View File

@ -34,7 +34,7 @@ class DefaultController extends Controller
}
/**
* @Route("/profil", name="KekRozsakFrontBundle_profile_edit")
* @Route("/profil.html", name="KekRozsakFrontBundle_profile_edit")
* @Template("KekRozsakFrontBundle:Default:userprofile.html.twig")
*/
public function profileEditAction()

View File

@ -14,12 +14,12 @@ use KekRozsak\FrontBundle\Extensions\Slugifier;
class DocumentController extends Controller
{
/**
* @param KekRozsak\FrontBundle\Entity\Document $document
* @param string $_format
*
* @Route("/dokumentum/{slug}.{_format}", name="KekRozsakFrontBundle_documentView", defaults={"_format": "html"}, requirements={"_format": "html|pdf"})
* @Template()
* @ParamConverter("document")
*
* @param KekRozsak\FrontBundle\Entity\Document $document
* @param string $_format
*/
public function viewAction(Document $document, $_format)
{
@ -40,7 +40,7 @@ class DocumentController extends Controller
}
/**
* @Route("/dokumentumok/uj/", name="KekRozsakFrontBundle_documentCreate")
* @Route("/dokumentumok/uj.html", name="KekRozsakFrontBundle_documentCreate")
* @Template()
*/
public function createAction()
@ -79,11 +79,11 @@ class DocumentController extends Controller
}
/**
* @Route("/dokumentum/{slug}/szerkesztes", name="KekRozsakFrontBundle_documentEdit")
* @param KekRozsak\FrontBundle\Entity\Document $document
*
* @Route("/dokumentum/{slug}/szerkesztes.html", name="KekRozsakFrontBundle_documentEdit")
* @Template()
* @ParamConverter("document")
*
* @param KekRozsak\FrontBundle\Entity\Document $document
*/
public function editAction(Document $document)
{

View File

@ -13,14 +13,14 @@ use KekRozsak\FrontBundle\Entity\Event;
class EventController extends Controller
{
/**
* @Route("/esesmeny/{startDate}/{eventSlug}", name="KekRozsakFrontBundle_eventView")
* @Template()
* @ParamConverter("event", class="KekRozsakFrontBundle:Event", options={"mapping"={"eventSlug" = "slug", "startDate"="startDate"}})
* @ParamConverter("startDate", class="DateTime", options={"format"="Y-m-d"})
*
* @param DateTime $startDate
* @param KekRozsak\FrontBundle\Entity\Event $event
* @return array
*
* @Route("/esesmenyek/{startDate}/{eventSlug}.html", name="KekRozsakFrontBundle_eventView")
* @Template()
* @ParamConverter("event", class="KekRozsakFrontBundle:Event", options={"mapping"={"eventSlug" = "slug", "startDate"="startDate"}})
* @ParamConverter("startDate", class="DateTime", options={"format"="Y-m-d"})
*/
public function viewAction(\DateTime $startDate, Event $event)
{
@ -36,14 +36,14 @@ class EventController extends Controller
}
/**
* @Route("/esemeny/{startDate}/{eventSlug}/csatlakozas", name="KekRozsakFrontBundle_eventJoin")
* @Template()
* @ParamConverter("event", class="KekRozsakFrontBundle:Event", options={"mapping"={"eventSlug": "slug", "startDate": "startDate"}})
* @ParamConverter("startDate", class="DateTime", options={"format"="Y-m-d"})
*
* @param DateTime $startDate
* @param KekRozsak\FrontBundle\Entity\Event $event
* @return array
*
* @Route("/esemenyek/{startDate}/{eventSlug}/csatlakozas.do", name="KekRozsakFrontBundle_eventJoin")
* @Template()
* @ParamConverter("event", class="KekRozsakFrontBundle:Event", options={"mapping"={"eventSlug": "slug", "startDate": "startDate"}})
* @ParamConverter("startDate", class="DateTime", options={"format"="Y-m-d"})
*/
public function joinAction(\DateTime $startDate, Event $event)
{
@ -68,11 +68,11 @@ class EventController extends Controller
}
/**
* @Route("/esemenyek/{date}", name="KekRozsakFrontBundle_eventList", defaults={"date": null})
* @Template()
*
* @param string $date
* @return array
*
* @Route("/esemenyek/{date}/", name="KekRozsakFrontBundle_eventList", defaults={"date": null})
* @Template()
*/
public function listAction($date = null)
{
@ -95,12 +95,12 @@ class EventController extends Controller
}
/**
* @param DateTime $date
* @return array
*
* @Route("/esemenyek/{date}/ajax-lista.{_format}", name="KekRozsakFrontBundle_eventAjaxList", requirements={"_format": "html"})
* @Template()
* @ParamConverter("date", options={"format": "Y-m-d"})
*
* @param DateTime $date
* @return array
*/
public function ajaxListAction(\DateTime $date)
{

View File

@ -65,12 +65,12 @@ class ForumController extends Controller
}
/**
* @Route("/{slug}", name="KekRozsakFrontBundle_forumTopicList")
* @Template()
* @ParamConverter("topicGroup")
*
* @param KekRozsak\FrontBundle\Entity\ForumTopicGroup $topicGroup
* @return array
*
* @Route("/{slug}/", name="KekRozsakFrontBundle_forumTopicList")
* @Template()
* @ParamConverter("topicGroup")
*/
public function topicListAction(ForumTopicgRoup $topicGroup)
{
@ -110,14 +110,14 @@ class ForumController extends Controller
}
/**
* @Route("/{topicGroupSlug}/{topicSlug}", name="KekRozsakFrontBundle_forumPostList")
* @Template()
* @ParamConverter("topic", options={"mapping"={"topicGroup"="topicGroup", "topicSlug"="slug"}})
* @ParamConverter("topicGroup", options={"mapping"={"topicGroupSlug"="slug"}})
*
* @param KekRozsak\FrontBundle\Entity\ForumTopicGroup $topicGroup
* @param KekRozsak\FrontBundle\Entity\ForumTopic $topic
* @return array
*
* @Route("/{topicGroupSlug}/{topicSlug}/", name="KekRozsakFrontBundle_forumPostList")
* @Template()
* @ParamConverter("topic", options={"mapping"={"topicGroup"="topicGroup", "topicSlug"="slug"}})
* @ParamConverter("topicGroup", options={"mapping"={"topicGroupSlug"="slug"}})
*/
public function postListAction(ForumTopicGroup $topicGroup, ForumTopic $topic)
{
@ -173,12 +173,12 @@ class ForumController extends Controller
}
/**
* @Route("/{topicGroupSlug}/{topicSlug}/kedvenc-be", name="KekRozsakFrontBundle_forumFavouriteTopic", options={"expose": true})
* @Method("GET")
*
* @param KekRozsak\FrontBundle\Entity\ForumTopicGroup $topicGroup
* @param KekRozsak\FrontBundle\Entity\ForumTopic $topic
* @return array
* @return Symfony\Component\HttpFoundation\Response
*
* @Route("/{topicGroupSlug}/{topicSlug}/kedvenc-be.do", name="KekRozsakFrontBundle_forumFavouriteTopic", options={"expose": true})
* @Method("GET")
*/
public function favouriteTopic($topicGroupSlug, $topicSlug)
{
@ -207,12 +207,12 @@ class ForumController extends Controller
}
/**
* @Route("/{topicGroupSlug}/{topicSlug}/kedvenc-ki", name="KekRozsakFrontBundle_forumUnfavouriteTopic", options={"expose": true})
* @Method("GET")
*
* @param KekRozsak\FrontBundle\Entity\ForumTopicGroup $topicGroup
* @param KekRozsak\FrontBundle\Entity\ForumTopic $topic
* @return array
* @return Symfony\Component\HttpFoundation\Response
*
* @Route("/{topicGroupSlug}/{topicSlug}/kedvenc-ki.do", name="KekRozsakFrontBundle_forumUnfavouriteTopic", options={"expose": true})
* @Method("GET")
*/
public function unfavouriteTopic($topicGroupSlug, $topicSlug)
{

View File

@ -14,13 +14,16 @@ use KekRozsak\FrontBundle\Form\Type\GroupType;
use KekRozsak\FrontBundle\Extensions\Slugifier;
/**
* @Route("/csoportok")
*/
class GroupController extends Controller
{
/**
* @Route("/csoportok", name="KekRozsakFrontBundle_groupList")
* @Template()
*
* @return array
*
* @Route("/", name="KekRozsakFrontBundle_groupList")
* @Template()
*/
public function listAction()
{
@ -35,12 +38,12 @@ class GroupController extends Controller
}
/**
* @Route("/csoport/{slug}", name="KekRozsakFrontBundle_groupView")
* @Template()
* @ParamConverter("group")
*
* @param KekRozsak\FrontBundle\Entity\Group $group
* @return array
*
* @Route("/csoport/{slug}/", name="KekRozsakFrontBundle_groupView")
* @Template()
* @ParamConverter("group")
*/
public function viewAction(Group $group)
{
@ -50,12 +53,12 @@ class GroupController extends Controller
}
/**
* @Route("/csoport/{slug}/tagok", name="KekRozsakFrontBundle_groupMembers")
* @Template()
* @ParamConverter("group")
*
* @param KekRozsak\FrontBundle\Entity\Group $group
* @return array
*
* @Route("/csoport/{slug}/tagok.html", name="KekRozsakFrontBundle_groupMembers")
* @Template()
* @ParamConverter("group")
*/
public function membersAction(Group $group)
{
@ -65,12 +68,12 @@ class GroupController extends Controller
}
/**
* @Route("/csoport/{slug}/dokumentumok", name="KekRozsakFrontBundle_groupDocuments")
* @Template()
* @ParamConverter("group")
*
* @param KekRozsak\FrontBundle\Entity\Group $group
* @return array
*
* @Route("/csoport/{slug}/dokumentumok.html", name="KekRozsakFrontBundle_groupDocuments")
* @Template()
* @ParamConverter("group")
*/
public function documentsAction(Group $group)
{
@ -80,12 +83,12 @@ class GroupController extends Controller
}
/**
* @Route("/csoport/{slug}/belepes", name="KekRozsakFrontBundle_groupJoin")
* @Template()
* @ParamConverter("group")
*
* @param KekRozsak\FrontBundle\Entity\Group $group
* @return array
*
* @Route("/csoport/{slug}/belepes.do", name="KekRozsakFrontBundle_groupJoin")
* @Template()
* @ParamConverter("group")
*/
public function joinAction(Group $group)
{
@ -135,10 +138,10 @@ class GroupController extends Controller
}
/**
* @Route("/csoportok/uj", name="KekRozsakFrontBundle_groupCreate")
* @Template()
*
* @return array
*
* @Route("/csoportok/uj.html", name="KekRozsakFrontBundle_groupCreate")
* @Template()
*/
public function createAction()
{

View File

@ -10,14 +10,16 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
* Description of NewsController
*
* @author polesz
*
* @Route("/hirek")
*/
class NewsController extends Controller
{
/**
* @Route("/newsSideList.html", name="KekRozsakFrontBundle_newsSideList", options={"expose": true})
* @Template()
*
* @return array
*
* @Route("/oldalso-lista.html", name="KekRozsakFrontBundle_newsSideList", options={"expose": true})
* @Template()
*/
public function sideListAction()
{

View File

@ -17,7 +17,7 @@ use KekRozsak\FrontBundle\Entity\UserData;
class DefaultController extends Controller
{
/**
* @Route("/login", name="KekRozsakSecurityBundle_login")
* @Route("/belepes.html", name="KekRozsakSecurityBundle_login")
* @Template()
*/
public function loginAction()
@ -39,7 +39,7 @@ class DefaultController extends Controller
}
/**
* @Route("/login_check", name="KekRozsakSecurityBundle_login_check")
* @Route("/belepes.do", name="KekRozsakSecurityBundle_login_check")
*/
public function loginCheckAction()
{
@ -47,7 +47,7 @@ class DefaultController extends Controller
}
/**
* @Route("/logout", name="KekRozsakSecurityBundle_logout")
* @Route("/kilepes.do", name="KekRozsakSecurityBundle_logout")
*/
public function logoutAction()
{
@ -55,7 +55,7 @@ class DefaultController extends Controller
}
/**
* @Route("/jelentkezes", name="KekRozsakSecurityBundle_registration")
* @Route("/jelentkezes.html", name="KekRozsakSecurityBundle_registration")
* @Template()
*/
public function registrationAction()
@ -129,7 +129,7 @@ class DefaultController extends Controller
}
/**
* @Route("/most_varj", name="KekRozsakSecurityBundle_reg_success")
* @Route("/most-varj.html", name="KekRozsakSecurityBundle_reg_success")
* @Template()
*/
public function regSuccessAction()