From f1068760f2853d1edef08fb501a17daa328cbb8f Mon Sep 17 00:00:00 2001 From: Ron Balthazor Date: Fri, 3 Apr 2015 11:31:29 -0400 Subject: [PATCH] default route basic ui improvements --- .idea/deployment.xml | 2 +- .../FOSUserBundle/views/layout.html.twig | 24 ++++---- app/Resources/views/base.html.twig | 3 +- app/config/routing.yml | 7 +++ composer.lock | 55 +++++++++---------- src/AppBundle/Controller/PointController.php | 2 +- src/AppBundle/Entity/Location.php | 2 +- src/AppBundle/Entity/Map.php | 4 +- src/AppBundle/Entity/Point.php | 2 +- .../Resources/views/Location/index.html.twig | 4 +- .../Resources/views/Location/show.html.twig | 1 - .../Resources/views/Map/index.html.twig | 2 +- .../Resources/views/Point/index.html.twig | 39 +++---------- .../Resources/views/Point/show.html.twig | 24 +++----- 14 files changed, 71 insertions(+), 100 deletions(-) diff --git a/.idea/deployment.xml b/.idea/deployment.xml index 4a67929..46b3399 100644 --- a/.idea/deployment.xml +++ b/.idea/deployment.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/app/Resources/FOSUserBundle/views/layout.html.twig b/app/Resources/FOSUserBundle/views/layout.html.twig index 3e6c45a..70a6cec 100644 --- a/app/Resources/FOSUserBundle/views/layout.html.twig +++ b/app/Resources/FOSUserBundle/views/layout.html.twig @@ -11,6 +11,17 @@ {% endblock %} + @@ -47,17 +58,6 @@ -
- {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %} - {{ 'layout.logged_in_as'|trans({'%username%': app.user.username}, 'FOSUserBundle') }} | - - {{ 'layout.logout'|trans({}, 'FOSUserBundle') }} - - {% else %} - {{ 'layout.login'|trans({}, 'FOSUserBundle') }} - {% endif %} -
- {% for type, messages in app.session.flashBag.all %} {% for message in messages %}
@@ -66,7 +66,7 @@ {% endfor %} {% endfor %} -
+
{% block fos_user_content %} {% endblock fos_user_content %}
diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index eaea2b8..7c48115 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -45,7 +45,8 @@
- +
{% block body %}{% endblock %} +
diff --git a/app/config/routing.yml b/app/config/routing.yml index 62857c9..b93acc4 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,3 +1,10 @@ +root: + path: / + defaults: + _controller: FrameworkBundle:Redirect:redirect + route: fos_user_security_login + permanent: true + fos_user: resource: "@FOSUserBundle/Resources/config/routing/all.xml" diff --git a/composer.lock b/composer.lock index 8ec4549..7a42e12 100644 --- a/composer.lock +++ b/composer.lock @@ -341,16 +341,16 @@ }, { "name": "doctrine/common", - "version": "v2.4.2", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b" + "reference": "cd8daf2501e10c63dced7b8b9b905844316ae9d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/5db6ab40e4c531f14dad4ca96a394dfce5d4255b", - "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b", + "url": "https://api.github.com/repos/doctrine/common/zipball/cd8daf2501e10c63dced7b8b9b905844316ae9d3", + "reference": "cd8daf2501e10c63dced7b8b9b905844316ae9d3", "shasum": "" }, "require": { @@ -367,7 +367,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4.x-dev" + "dev-master": "2.6.x-dev" } }, "autoload": { @@ -380,17 +380,6 @@ "MIT" ], "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -399,11 +388,17 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, { "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "email": "schmittjoh@gmail.com" } ], "description": "Common Library for Doctrine projects", @@ -415,7 +410,7 @@ "persistence", "spl" ], - "time": "2014-05-21 19:28:51" + "time": "2015-04-02 19:55:44" }, { "name": "doctrine/dbal", @@ -1786,17 +1781,17 @@ }, { "name": "sensio/framework-extra-bundle", - "version": "v3.0.6", + "version": "v3.0.7", "target-dir": "Sensio/Bundle/FrameworkExtraBundle", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", - "reference": "1c3ed356bd1ff67cd71806efbb71511644035c85" + "reference": "5c37623576ea9e841b87dc0d85414d98fa6f7abb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/1c3ed356bd1ff67cd71806efbb71511644035c85", - "reference": "1c3ed356bd1ff67cd71806efbb71511644035c85", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/5c37623576ea9e841b87dc0d85414d98fa6f7abb", + "reference": "5c37623576ea9e841b87dc0d85414d98fa6f7abb", "shasum": "" }, "require": { @@ -1837,7 +1832,7 @@ "annotations", "controllers" ], - "time": "2015-03-24 15:12:07" + "time": "2015-04-02 12:28:58" }, { "name": "sensiolabs/security-checker", @@ -2119,16 +2114,16 @@ }, { "name": "symfony/symfony", - "version": "v2.6.5", + "version": "v2.6.6", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "80833da9d04b004fa59fd23102e6dfad80c98106" + "reference": "48c9e835a877adfb023b8b6d033d9dd14f342b4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/80833da9d04b004fa59fd23102e6dfad80c98106", - "reference": "80833da9d04b004fa59fd23102e6dfad80c98106", + "url": "https://api.github.com/repos/symfony/symfony/zipball/48c9e835a877adfb023b8b6d033d9dd14f342b4b", + "reference": "48c9e835a877adfb023b8b6d033d9dd14f342b4b", "shasum": "" }, "require": { @@ -2232,7 +2227,7 @@ "keywords": [ "framework" ], - "time": "2015-03-17 14:58:46" + "time": "2015-04-01 16:55:26" }, { "name": "twbs/bootstrap", diff --git a/src/AppBundle/Controller/PointController.php b/src/AppBundle/Controller/PointController.php index 293fbec..0466ecf 100644 --- a/src/AppBundle/Controller/PointController.php +++ b/src/AppBundle/Controller/PointController.php @@ -193,7 +193,7 @@ public function updateAction(Request $request, $id) if ($editForm->isValid()) { $em->flush(); - return $this->redirect($this->generateUrl('point_edit', array('id' => $id))); + return $this->redirect($this->generateUrl('point_show', array('id' => $id))); } return array( diff --git a/src/AppBundle/Entity/Location.php b/src/AppBundle/Entity/Location.php index c900b3f..dabb5ad 100644 --- a/src/AppBundle/Entity/Location.php +++ b/src/AppBundle/Entity/Location.php @@ -45,7 +45,7 @@ class Location /** * @var string * - * @ORM\Column(name="description", type="text") + * @ORM\Column(name="description", type="text", nullable=true) */ private $description; diff --git a/src/AppBundle/Entity/Map.php b/src/AppBundle/Entity/Map.php index 0c82804..1305084 100644 --- a/src/AppBundle/Entity/Map.php +++ b/src/AppBundle/Entity/Map.php @@ -31,14 +31,14 @@ class Map /** * @var string * - * @ORM\Column(name="description", type="text") + * @ORM\Column(name="description", type="text", nullable=true) */ private $description; /** * @var string * - * @ORM\Column(name="background", type="text") + * @ORM\Column(name="background", type="text", nullable=true) */ private $background; diff --git a/src/AppBundle/Entity/Point.php b/src/AppBundle/Entity/Point.php index 99b9f42..737f9e1 100644 --- a/src/AppBundle/Entity/Point.php +++ b/src/AppBundle/Entity/Point.php @@ -31,7 +31,7 @@ class Point /** * @var string * - * @ORM\Column(name="body", type="text") + * @ORM\Column(name="body", type="text", nullable=true) */ private $body; diff --git a/src/AppBundle/Resources/views/Location/index.html.twig b/src/AppBundle/Resources/views/Location/index.html.twig index ea5cc9a..05fde79 100644 --- a/src/AppBundle/Resources/views/Location/index.html.twig +++ b/src/AppBundle/Resources/views/Location/index.html.twig @@ -5,13 +5,13 @@

{{ entity.title }}

-

{{ entity.description }}

+

{{ entity.description|raw }}

{% endfor %} - Create a new entry + Create a new location {% endblock %} diff --git a/src/AppBundle/Resources/views/Location/show.html.twig b/src/AppBundle/Resources/views/Location/show.html.twig index 3ed9523..15e2b7c 100644 --- a/src/AppBundle/Resources/views/Location/show.html.twig +++ b/src/AppBundle/Resources/views/Location/show.html.twig @@ -9,7 +9,6 @@

{{ entity.title }}

-

{{ entity.body }}

{% endfor %} diff --git a/src/AppBundle/Resources/views/Map/index.html.twig b/src/AppBundle/Resources/views/Map/index.html.twig index 3316634..4cb5f1a 100644 --- a/src/AppBundle/Resources/views/Map/index.html.twig +++ b/src/AppBundle/Resources/views/Map/index.html.twig @@ -11,7 +11,7 @@ {% endfor %} - Create a new entry + Create a new map diff --git a/src/AppBundle/Resources/views/Point/index.html.twig b/src/AppBundle/Resources/views/Point/index.html.twig index 2dc5e42..5c41b4d 100644 --- a/src/AppBundle/Resources/views/Point/index.html.twig +++ b/src/AppBundle/Resources/views/Point/index.html.twig @@ -3,40 +3,19 @@ {% block body -%}

Point list

- - - - - - - - - - - {% for entity in entities %} - - - - - - - {% endfor %} - -
IdTitleBodyActions
{{ entity.id }}{{ entity.title }}{{ entity.body }} - -
+ {% for entity in entities %} +
+ +

{{ entity.title }}

+

{{ entity.body|raw }}

+
+
+ {% endfor %} diff --git a/src/AppBundle/Resources/views/Point/show.html.twig b/src/AppBundle/Resources/views/Point/show.html.twig index 0bccfef..7e74014 100644 --- a/src/AppBundle/Resources/views/Point/show.html.twig +++ b/src/AppBundle/Resources/views/Point/show.html.twig @@ -3,27 +3,17 @@ {% block body -%}

Point

- - - - - - - - - - - - - - - -
Id{{ entity.id }}
Title{{ entity.title }}
Body{{ entity.body }}
+
+ +

{{ entity.title }}

+

{{ entity.body|raw }}

+
+