Pārlūkot izejas kodu

fixed data-url

fixed markup: <pre> not valid inside <p>

adjusted base html structure for HTML5

improved table markup in bag.html.twig

improved table markup in results.html.twig

update exception.html.twig
Tobias Schultze 13 gadi atpakaļ
vecāks
revīzija
6548354a11

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 2
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig


+ 1 - 1
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig

@@ -1,7 +1,7 @@
 {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}
 
 {% block head %}
-    <link href="{{ asset('bundles/framework/css/exception.css') }}" rel="stylesheet" type="text/css" media="screen" />
+    <link rel="stylesheet" href="{{ asset('bundles/framework/css/exception.css') }}" />
     {{ parent() }}
 {% endblock %}
 

+ 20 - 18
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig

@@ -77,15 +77,13 @@
 
     <h2>Request Content</h2>
 
-    <p>
-        {% if collector.content == false %}
-            <em>Request content not available (it was retrieved as a resource).</em>
-        {% elseif collector.content %}
-            <pre>{{ collector.content }}</pre>
-        {% else %}
-            <em>No content</em>
-        {% endif %}
-    </p>
+    {% if collector.content == false %}
+        <p><em>Request content not available (it was retrieved as a resource).</em></p>
+    {% elseif collector.content %}
+        <pre>{{ collector.content }}</pre>
+    {% else %}
+        <p><em>No content</em></p>
+    {% endif %}
 
     <h2>Request Server Parameters</h2>
 
@@ -99,17 +97,21 @@
 
     {% if collector.sessionattributes|length %}
         <table>
-            <tr>
-                <th>Key</th>
-                <th>Value</th>
-            </tr>
-            {% set attributes = collector.sessionattributes %}
-            {% for key in attributes|keys|sort %}
+            <thead>
                 <tr>
-                    <th>{{ key }}</th>
-                    <td>{{ attributes[key]|yaml_dump }}</td>
+                    <th scope="col">Key</th>
+                    <th scope="col">Value</th>
                 </tr>
-            {% endfor %}
+            </thead>
+            <tbody>
+                {% set attributes = collector.sessionattributes %}
+                {% for key in attributes|keys|sort %}
+                    <tr>
+                        <th>{{ key }}</th>
+                        <td>{{ attributes[key]|yaml_dump }}</td>
+                    </tr>
+                {% endfor %}
+            </tbody>
         </table>
     {% else %}
         <p>

+ 6 - 2
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/bag.html.twig

@@ -1,12 +1,16 @@
 <table>
+<thead>
     <tr>
-        <th>Key</th>
-        <th>Value</th>
+        <th scope="col">Key</th>
+        <th scope="col">Value</th>
     </tr>
+</thead>
+<tbody>
     {% for key in bag.keys|sort %}
         <tr>
             <th>{{ key }}</th>
             <td>{{ bag.get(key)|yaml_dump }}</td>
         </tr>
     {% endfor %}
+</tbody>
 </table>

+ 5 - 5
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig

@@ -1,13 +1,13 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
     <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <meta charset="UTF-8" />
         <meta name="robots" content="noindex,nofollow" />
         <title>{% block title 'Profiler' %}</title>
-        <link rel="shortcut icon" type="image/x-icon" href="{{ asset('bundles/webprofiler/favicon.ico') }}" />
+        <link rel="icon" type="image/x-icon" sizes="16x16" href="{{ asset('bundles/webprofiler/favicon.ico') }}" />
         {% block head %}
-            <link href="{{ asset('bundles/webprofiler/css/toolbar.css') }}" rel="stylesheet" type="text/css" media="screen" />
-            <link href="{{ asset('bundles/webprofiler/css/profiler.css') }}" rel="stylesheet" type="text/css" media="screen" />
+            <link rel="stylesheet" href="{{ asset('bundles/webprofiler/css/toolbar.css') }}"  />
+            <link rel="stylesheet" href="{{ asset('bundles/webprofiler/css/profiler.css') }}" />
         {% endblock %}
     </head>
     <body>

+ 16 - 12
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig

@@ -5,20 +5,24 @@
 
     {% if tokens %}
         <table>
-            <tr>
-                <th>Token</th>
-                <th>IP</th>
-                <th>URL</th>
-                <th>Time</th>
-            </tr>
-            {% for elements in tokens %}
+            <thead>
                 <tr>
-                    <td><a href="{{ path('_profiler', { 'token': elements.token }) }}">{{ elements.token }}</a></td>
-                    <td>{{ elements.ip }}</td>
-                    <td>{{ elements.url }}</td>
-                    <td>{{ elements.time|date('r') }}</td>
+                    <th scope="col">Token</th>
+                    <th scope="col">IP</th>
+                    <th scope="col">URL</th>
+                    <th scope="col">Time</th>
                 </tr>
-            {% endfor %}
+            </thead>
+            <tbody>
+                {% for elements in tokens %}
+                    <tr>
+                        <td><a href="{{ path('_profiler', { 'token': elements.token }) }}">{{ elements.token }}</a></td>
+                        <td>{{ elements.ip }}</td>
+                        <td>{{ elements.url }}</td>
+                        <td>{{ elements.time|date('r') }}</td>
+                    </tr>
+                {% endfor %}
+            </tbody>
         </table>
     {% else %}
         <p>