8000
File tree Expand file tree Collapse file tree 3 files changed +32
-23
lines changed
src/Symfony/Bundle/WebProfilerBundle Expand file tree Collapse file tree 3 files changed +32
-23
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ public function searchAction()
235
235
236
236
$ tokens = $ profiler ->find ($ ip , $ url , $ limit );
237
237
238
- return new RedirectResponse ($ this ->container ->get ('router ' )->generate ('_profiler_search_results ' , array ('token ' => $ tokens ? $ tokens [0 ]['token ' ] : '' )));
238
+ return new RedirectResponse ($ this ->container ->get ('router ' )->generate ('_profiler_search_results ' , array ('token ' => $ tokens ? $ tokens [0 ]['token ' ] : 'empty ' )));
239
239
}
240
240
241
241
protected function getTemplateNames ($ profiler )
Original file line number Diff line number Diff line change 7
7
<div id =" content" >
8
8
{% include ' WebProfilerBundle:Profiler:header.html.twig' only %}
9
9
10
- <div class =" resume" >
11
- <p >
12
- <strong ><a href =" {{ profiler .url }}" >{{ profiler .url }}</a ></strong >
13
- <span class =" date" >
14
- <strong >by {{ profiler .ip }}</strong > at <strong >{{ profiler .time | date (' r' ) }}</strong >
15
- </span >
16
- </p >
17
- </div >
10
+ {% if not profiler .isempty %}
11
+ <div class =" resume" >
12
+ <p >
13
+ <strong ><a href =" {{ profiler .url }}" >{{ profiler .url }}</a ></strong >
14
+ <span class =" date" >
15
+ <strong >by {{ profiler .ip }}</strong > at <strong >{{ profiler .time | date (' r' ) }}</strong >
16
+ </span >
17
+ </p >
18
+ </div >
19
+ {% endif %}
18
20
19
21
<div class =" main" >
20
22
Original file line number Diff line number Diff line change 3
3
{% block panel %}
4
4
<h2 >Search Results</h2 >
5
5
6
- <table >
7
- <tr >
8
- <th >Token</th >
9
- <th >IP</th >
10
- <th >URL</th >
11
- <th >Time</th >
12
- </tr >
13
- {% for elements in tokens %}
6
+ {% if tokens %}
7
+ <table >
14
8
<tr >
15
- <td >< a href = " {{ path( ' _profiler ' , { ' token ' : elements . token }) }} " >{{ elements . token }}</ a ></ td >
16
- <td >{{ elements . ip }}</ td >
17
- <td >{{ elements . url }}</ td >
18
- <td >{{ elements . time | date ( ' r ' ) }}</ td >
9
+ <th >Token</ th >
10
+ <th >IP</ th >
11
+ <th >URL</ th >
12
+ <th >Time</ th >
19
13
</tr >
20
- {% endfor %}
21
- </table >
14
+ {% for elements in tokens %}
15
+ <tr >
16
+ <td ><a href =" {{ path(' _profiler' , { ' token' : elements .token }) }}" >{{ elements .token }}</a ></td >
17
+ <td >{{ elements .ip }}</td >
18
+ <td >{{ elements .url }}</td >
19
+ <td >{{ elements .time | date (' r' ) }}</td >
20
+ </tr >
21
+ {% endfor %}
22
+ </table >
23
+ {% else %}
24
+ <p >
25
+ <em >The query returned no result.</em >
26
+ </p >
27
+ {% endif %}
28
+
22
29
{% endblock %}
You can’t perform that action at this time.
0 commit comments