From f6acfae76d6b2c0dced1a12a2acb755660b15e74 Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Sat, 1 Sep 2012 18:45:24 +0200 Subject: [PATCH] Added skeleton for news editing Signed-off-by: Gergely POLONKAI (W00d5t0ck) --- .../AdminBundle/Controller/NewsController.php | 62 +++++++++++++++++++ .../Resources/views/News/list.html.twig | 32 ++++++++++ .../Resources/views/News/listHelp.html.twig | 3 + 3 files changed, 97 insertions(+) create mode 100644 src/KekRozsak/AdminBundle/Controller/NewsController.php create mode 100644 src/KekRozsak/AdminBundle/Resources/views/News/list.html.twig create mode 100644 src/KekRozsak/AdminBundle/Resources/views/News/listHelp.html.twig diff --git a/src/KekRozsak/AdminBundle/Controller/NewsController.php b/src/KekRozsak/AdminBundle/Controller/NewsController.php new file mode 100644 index 0000000..7df6a22 --- /dev/null +++ b/src/KekRozsak/AdminBundle/Controller/NewsController.php @@ -0,0 +1,62 @@ +securityContext->isGranted('OWNER', $objectIdentity) === false) { + throw new AccessDeniedException('Nincs jogosultságod a hírszerkesztéshez!'); + } + $news = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:News')->findAll(); + + return array( + 'news' => $news, + ); + } + + /** + * @Route("/sugo/hirek", name="KekRozsakAdminBundle_newsListHelp") + * @Template + */ + public function listHelpAction() + { + return array(); + } +} diff --git a/src/KekRozsak/AdminBundle/Resources/views/News/list.html.twig b/src/KekRozsak/AdminBundle/Resources/views/News/list.html.twig new file mode 100644 index 0000000..ac81bfb --- /dev/null +++ b/src/KekRozsak/AdminBundle/Resources/views/News/list.html.twig @@ -0,0 +1,32 @@ +{# vim: ft=htmljinja +#} +{% extends 'KekRozsakFrontBundle:Default:main_template.html.twig' %} + +{% block content %} +

Adminisztráció - Hírek

+ + + + + + + + + + +{% for item in news %} + + + + + + + +{% endfor %} + +
ÍrtaDátumCím
+ {% if item.public %}[Publikus ikon]{% else %}[Nem publikus ikon]{% endif %} + {% if item.sticky %}[Ragadós ikon]{% else %}[Nem ragadós ikon]{% endif %} + {% if item.draft %}[Vázlat ikon]{% else %}[Publikált ikon]{% endif %} + {{ item.createdBy.displayName }}{{ item.createdAt|date('Y-m-d') }}{{ item.title }}[Törlés ikon]
+{% endblock content %} diff --git a/src/KekRozsak/AdminBundle/Resources/views/News/listHelp.html.twig b/src/KekRozsak/AdminBundle/Resources/views/News/listHelp.html.twig new file mode 100644 index 0000000..98d8bfc --- /dev/null +++ b/src/KekRozsak/AdminBundle/Resources/views/News/listHelp.html.twig @@ -0,0 +1,3 @@ +{# vim: ft=htmljinja +#} +

Kattints a hír címére a szerkesztéshez!