Bläddra i källkod

Add list and show time templates

Emmanuel Vella 13 år sedan
förälder
incheckning
fad32446bb
2 ändrade filer med 24 tillägg och 0 borttagningar
  1. 9 0
      Resources/views/CRUD/list_time.html.twig
  2. 15 0
      Resources/views/CRUD/show_time.html.twig

+ 9 - 0
Resources/views/CRUD/list_time.html.twig

@@ -0,0 +1,9 @@
+{% extends 'SonataAdminBundle:CRUD:base_list_field.html.twig' %}
+
+{% block field %}
+    {%- if value is empty -%}
+         
+    {%- else -%}
+        {{ value|date('H:i:s') }}
+    {%- endif -%}
+{% endblock %}

+ 15 - 0
Resources/views/CRUD/show_time.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_show_field.html.twig' %}
+
+{% block field %}{{ value|date('H:i:s') }}{% endblock %}
+