show the various pieces as a use case for css on tabs and plugins
[myslice.git] / templates / widget-plugin.html
1 {% if visible %}
2 <div class='plugin-manage'>
3 {% if hidable %}
4   {% if hidden %}
5 <p id='show-{{ uuid }}' class='plugin-show'><a href='#'><span>&raquo; Show {{ classname }}</span></a></p>
6 <p id='hide-{{ uuid }}' class='plugin-hide' style='display:none;'><a href='#'><span>&laquo; Hide {{ classname }}</span></a></p>
7   {% else %}
8 <p id='show-{{ uuid }}' class='plugin-show' style='display:none;'><a href='#'><span>&raquo; Show {{ classname }}</span></a></p>
9 <p id='hide-{{ uuid }}' class='plugin-hide'><a href='#'><span>&laquo; Hide {{ classname }}</span></a></p>
10   {% endif %}
11 {% endif %}
12 {% endif %}
13
14 <div class='plugin {{ classname }}' id='plugin-{{ uuid }}'>
15 {{ plugin_content|safe }}
16 </div><!--plugin {{ classname }}-->
17
18 {% if visible %}
19 </div>
20 {% endif %}
21
22 {# Plugin initialization (if the plugin has the right structure) - from plugin.php #}
23 {# note: that's the spirit but using {% insert %}  is not reliable enough #}
24 {# so for now this doesn't make it back to the browser #}
25 {% insert prelude_js %}
26 if (typeof jQuery('#{{ uuid }}').$title != 'undefined') {
27   jQuery('#{{ uuid }}').$title({ {{ settings_json }} plugin_uuid: '{{ uuid }}' });
28   //jQuery('#{{ uuid }}').$title('show');
29   }; 
30 {% endinsert %}