瀏覽代碼

Added date format in view template

Laupi FRPAR 14 年之前
父節點
當前提交
3e1f75405e
共有 2 個文件被更改,包括 29 次插入0 次删除
  1. 14 0
      Resources/views/CRUD/view_date.html.twig
  2. 15 0
      Resources/views/CRUD/view_datetime.html.twig

+ 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 }}{% 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 %}
+