Uproszczenie implementacji wzorca observer.
[redakcja.git] / apps / toolbar / templates / toolbar / toolbar.html
index c508929..b0ee028 100644 (file)
@@ -1,19 +1,32 @@
 {% load toolbar_tags %}
-<div id="toolbar">
-    <ol id="toolbar-tabs">
-        {% for group in groups %}
-        <li p:button-list="{{ group.slug }}" {% if forloop.first %}class="active"{% endif %}>{{ group.name }}</li>
+<div class="toolbar" xmlns:ui="http://nowoczesnapolska.org.pl/platforma/ui">
+    
+    {# This div will be connected to the right place #}
+    <span class="panel-toolbar-extra">
+    {% for button in toolbar_extra_group.button_set.all %}
+    {% toolbar_button button %}
+    {% endfor %} 
+    </span>
+
+    <div class="toolbar-tabs-container">
+    <p>
+        {% for group in toolbar_groups %}
+        <button ui:group="{{ group.slug }}" {% if forloop.first %}class="active"{% endif %}>
+            {{ group.name }}
+        </button>
         {% endfor %}
-    </ol>
-    <div style="clear: both; height: 0; width: 0">&nbsp;</div>
-    <div id="toolbar-buttons">
-        {% for group in groups %}
-        <ol id="{{ group.slug }}" {% if not forloop.first %}style="display:none"{% endif %}>
+    </p>
+    </div>
+
+    <div class="toolbar-button-groups-container">
+        {% for group in toolbar_groups %}
+        <p ui:group="{{group.slug}}" class="toolbar-buttons-container" {% if not forloop.first %}style="display:none;"{% endif %}>
+            {# buttons for this group #}            
             {% for button in group.button_set.all %}
-            <li p:tag="{{ button.tag }}" {% if button.key %}p:key="{{ button.key|keycode }}" title="Alt+{{ button.key|upper }}"{% endif %}>{{ button.label }}</li>
+            {% toolbar_button button %}
             {% endfor %}
-        </ol>
+        </p>
         {% endfor %}
-        <div style="clear: both; height: 0; width: 0">&nbsp;</div>
     </div>
-</div>
\ No newline at end of file
+
+</div>