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