X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=engine%2Ftemplates%2Fplugin.html;h=d4b5cf1d719e5b7ba816c6871959ac2074e557e8;hb=c01a656b95a478b4450c3ae2c1eb2fe6d73a0c04;hp=650551af7c3f1dd6c63344419e631df0895df99a;hpb=36affe7c738e94c6085f50b5fae8dfb9ae9b81fd;p=unfold.git diff --git a/engine/templates/plugin.html b/engine/templates/plugin.html index 650551af..d4b5cf1d 100644 --- a/engine/templates/plugin.html +++ b/engine/templates/plugin.html @@ -1,32 +1,22 @@ -{##} +{##} {% if visible %} -
-{% if hidable %} - {% if hidden %} -

» Show {{ classname }} "{{ title }}"

- +
+{% if togglable %} + {% if not toggled %} +

Show {{ title }} ({{ classname }})

+ {% else %} - -

« Hide {{ classname }} "{{ title }}"

- {% endif %} -{% endif %} -{% endif %} + +

Hide {{ title }} ({{ classname }})

+ {% endif %}{# toggled #} +{% endif %}{# togglable #} +{% endif %}{# visible #} -
+ +
{% if visible %}
-{% endif %} -{##} - -{# Plugin initialization (if the plugin has the right structure) - from plugin.php #} -{# note: that's the spirit but using {% insert %} is not reliable enough #} -{# so for now this doesn't make it back to the browser #} -{% insert prelude_js %} -if (typeof jQuery('#{{ uuid }}').$title != 'undefined') { - jQuery('#plugin-{{ uuid }}').$title({ {{ settings_json }} plugin_uuid: '{{ uuid }}' }); - //jQuery('#plugin-{{ uuid }}').$title('show'); - }; -{% endinsert %} +{% endif %}{# visible #} +{##}