Преглед изворни кода

Merge pull request #187 from laupiFrpar/add_date_in_view

Added date format in view template
Thomas пре 14 година
родитељ
комит
f2c211d33a

+ 1 - 1
Resources/views/CRUD/list_date.html.twig

@@ -10,4 +10,4 @@ file that was distributed with this source code.
 #}
 {% extends 'SonataAdminBundle:CRUD:list_integer.html.twig' %}
 
-{% block field%}{{ value|date }}{% endblock %}
+{% block field%}{{ value|date('F j, Y') }}{% endblock %}

+ 14 - 0
Resources/views/CRUD/view_date.html.twig

@@ -0,0 +1,14 @@
+{#
+
+This file is part of the Sonata package.
+
+(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
+
+For the full copyright and license information, please view the LICENSE
+file that was distributed with this source code.
+
+#}
+
+{% extends 'SonataAdminBundle:CRUD:base_view_field.html.twig' %}
+
+{% block value %}{{ value|date('F j, Y') }}{% endblock %}

+ 15 - 0
Resources/views/CRUD/view_datetime.html.twig

@@ -0,0 +1,15 @@
+{#
+
+This file is part of the Sonata package.
+
+(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
+
+For the full copyright and license information, please view the LICENSE
+file that was distributed with this source code.
+
+#}
+
+{% extends 'SonataAdminBundle:CRUD:base_view_field.html.twig' %}
+
+{% block value %}{{ value|date }}{% endblock %}
+