From a2f2fd73179bb6285a4c42535671148d3419ea0d Mon Sep 17 00:00:00 2001 From: "Gergely Polonkai (W00d5t0ck)" Date: Wed, 5 Sep 2012 15:54:26 +0200 Subject: [PATCH] Added admin menu Signed-off-by: Gergely Polonkai (W00d5t0ck) --- .../Controller/AdminController.php | 9 +++++++++ .../Resources/public/css/admin.css | 19 +++++++++++++++++++ .../Resources/views/Admin/editChunk.html.twig | 6 +++--- .../Resources/views/Admin/index.html.twig | 10 ++++++++++ .../Resources/views/Admin/listBlog.html.twig | 6 +++--- .../views/Admin/listCodeChunk.html.twig | 6 +++--- .../Resources/views/Admin/login.html.twig | 2 +- .../views/Admin/newBlogPost.html.twig | 6 +++--- 8 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 src/GergelyPolonkai/FrontBundle/Resources/public/css/admin.css create mode 100644 src/GergelyPolonkai/FrontBundle/Resources/views/Admin/index.html.twig diff --git a/src/GergelyPolonkai/FrontBundle/Controller/AdminController.php b/src/GergelyPolonkai/FrontBundle/Controller/AdminController.php index 3827f75..35da08c 100644 --- a/src/GergelyPolonkai/FrontBundle/Controller/AdminController.php +++ b/src/GergelyPolonkai/FrontBundle/Controller/AdminController.php @@ -152,4 +152,13 @@ class AdminController extends Controller 'chunk' => $chunk, ); } + + /** + * @Route("/") + * @Template + */ + public function indexAction() + { + return array(); + } } diff --git a/src/GergelyPolonkai/FrontBundle/Resources/public/css/admin.css b/src/GergelyPolonkai/FrontBundle/Resources/public/css/admin.css new file mode 100644 index 0000000..0d82813 --- /dev/null +++ b/src/GergelyPolonkai/FrontBundle/Resources/public/css/admin.css @@ -0,0 +1,19 @@ +/* + Document : admin.css + Created on : 2012.09.05., 15:49:05 + Author : polonkai.gergely + Description: + Purpose of the stylesheet follows. +*/ + +ul.menu { + padding: .5em; + list-style-type: none; + margin: 0 0 1em 0; + border-bottom: 1px solid black; +} + +ul.menu li { + display: inline; + margin-right: 1em; +} \ No newline at end of file diff --git a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/editChunk.html.twig b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/editChunk.html.twig index 70ca318..c1180b0 100644 --- a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/editChunk.html.twig +++ b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/editChunk.html.twig @@ -1,6 +1,6 @@ -{% extends 'GergelyPolonkaiFrontBundle:Default:front_base.html.twig' %} +{% extends 'GergelyPolonkaiFrontBundle:Admin:index.html.twig' %} -{% block content %} +{% block admincontent %} {% if chunk.id is not null %}

Edit Code Chunk - {{ chunk.title }}

{% else %} @@ -11,4 +11,4 @@ Cancel -{% endblock content %} +{% endblock admincontent %} diff --git a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/index.html.twig b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/index.html.twig new file mode 100644 index 0000000..b5ca09e --- /dev/null +++ b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/index.html.twig @@ -0,0 +1,10 @@ +{% extends 'GergelyPolonkaiFrontBundle:Default:front_base.html.twig' %} + +{% block content %} + +{% block admincontent %} +{% endblock %} +{% endblock content %} \ No newline at end of file diff --git a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/listBlog.html.twig b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/listBlog.html.twig index cd2df7c..3d63b57 100644 --- a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/listBlog.html.twig +++ b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/listBlog.html.twig @@ -1,6 +1,6 @@ -{% extends 'GergelyPolonkaiFrontBundle:Default:front_base.html.twig' %} +{% extends 'GergelyPolonkaiFrontBundle:Admin:index.html.twig' %} -{% block content %} +{% block admincontent %}

All posts

New post @@ -24,4 +24,4 @@ {% endif %}
New post -{% endblock %} +{% endblock admincontent %} diff --git a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/listCodeChunk.html.twig b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/listCodeChunk.html.twig index 7593c9a..b5515d5 100644 --- a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/listCodeChunk.html.twig +++ b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/listCodeChunk.html.twig @@ -1,6 +1,6 @@ -{% extends 'GergelyPolonkaiFrontBundle:Default:front_base.html.twig' %} +{% extends 'GergelyPolonkaiFrontBundle:Admin:index.html.twig' %} -{% block content %} +{% block admincontent %}

Code chunks

New Code Chunk {% if chunks %} @@ -24,4 +24,4 @@ {% endif %} New Code Chunk -{% endblock content %} +{% endblock admincontent %} diff --git a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/login.html.twig b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/login.html.twig index 8d2976a..6330e82 100644 --- a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/login.html.twig +++ b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/login.html.twig @@ -10,4 +10,4 @@ -{% endblock %} +{% endblock content %} diff --git a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/newBlogPost.html.twig b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/newBlogPost.html.twig index e45074b..312275c 100644 --- a/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/newBlogPost.html.twig +++ b/src/GergelyPolonkai/FrontBundle/Resources/views/Admin/newBlogPost.html.twig @@ -1,6 +1,6 @@ -{% extends 'GergelyPolonkaiFrontBundle:Default:front_base.html.twig' %} +{% extends 'GergelyPolonkaiFrontBundle:Admin:index.html.twig' %} -{% block content %} +{% block admincontent %} {% if post.id is not null %}
{% else %} @@ -10,4 +10,4 @@ Cancel
-{% endblock content %} +{% endblock admincontent %}