From 0a1d3ab21d25e6ace2658fc56e71c99f8e9c9ff0 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Fri, 24 May 2013 14:25:29 +0200 Subject: [PATCH] Updated the toolbar item to fit better in the profiler styles - Remove the item from the toolbar when there is no message (consistent with the logger and swiftmailer items) - Add the number of messages directly in the toolbar without hovering - Update the item according to the refactoring done in Symfony 2.1 --- Resources/views/Collector/collector.html.twig | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/Resources/views/Collector/collector.html.twig b/Resources/views/Collector/collector.html.twig index bbee4f6d..413a9a30 100644 --- a/Resources/views/Collector/collector.html.twig +++ b/Resources/views/Collector/collector.html.twig @@ -1,18 +1,24 @@ {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} - {% set icon %} - RabbitMQ - {% endset %} - {% set text %} - {{ collector.publishedMessagesCount }} - {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %} + {% if collector.publishedMessagesCount %} + {% set icon %} + RabbitMQ + {{ collector.publishedMessagesCount }} + {% endset %} + {% set text %} +
+ Messages + {{ collector.publishedMessagesCount }} +
+ {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %} + {% endif %} {% endblock %} {% block menu %} - RabbitMQ + RabbitMQ RabbitMQ {{ collector.publishedMessagesCount }} @@ -24,11 +30,13 @@

Messages

{% if collector.publishedMessagesCount %} - + - - + + + + {% for log in collector.publishedMessagesLog %}
ExchangeMessage bodyExchangeMessage body
{{ log.exchange }}