Permalink
Browse files

template renaming

  • Loading branch information...
1 parent cc03a31 commit a2a00069a66bd5587deefcdf691a06f32b16174f @FinalAngel FinalAngel committed Nov 7, 2012
View
@@ -82,7 +82,7 @@ class CMSPluginBase(admin.ModelAdmin):
form = None
change_form_template = "admin/cms/page/plugin_change_form.html"
- frontend_edit_template = 'cms/toolbar/placeholder_wrapper.html'
+ frontend_edit_template = 'cms/toolbar/placeholder_plugin.html'
# Should the plugin be rendered in the admin?
admin_preview = False
@@ -87,7 +87,7 @@ def render_dragables(plugins, slot, request):
print ",,,,,,,,,,,"
print plugins
- return render_to_string("cms/toolbar/placeholder_dragables.html", {'plugins':plugins, 'slot':slot, 'request':request})
+ return render_to_string("cms/toolbar/placeholder_dragholder.html", {'plugins':plugins, 'slot':slot, 'request':request})
def render_placeholder(placeholder, context_to_copy, name_fallback="Placeholder"):
@@ -172,6 +172,6 @@ def render_placeholder_toolbar(placeholder, context, name_fallback=None):
context['placeholder_label'] = name
context['placeholder'] = placeholder
context['page'] = page
- toolbar = render_to_string("cms/toolbar/placeholder_toolbar.html", context)
+ toolbar = render_to_string("cms/toolbar/placeholder_bar.html", context)
context.pop()
return toolbar
@@ -1,12 +1,13 @@
{% load i18n sekizai_tags %}
{% addtoblock "js" %}
+{% regroup installed_plugins by module as module_list %}
<script type="text/javascript">
CMS.$(document).ready(function () {
new CMS.Placeholder('#cms_placeholder-bar-{{ placeholder.pk }}', {
'type': 'bar',
'placeholder_id': '{{ placeholder.pk }}',
'plugin_language': '{{ language }}', // todo not required should be within backend
- 'plugin_restriction': ['TextPlugin', 'PicturePlugin'], // empty = false // todo just testing atm
+ 'plugin_restriction': [{% for module in module_list %}{% for p in module.list %}"{{ p.value }}"{% if not forloop.last %}, {% endif %}{% endfor %}{% endfor %}],
'urls': {
'add_plugin': '{{ placeholder.get_add_url }}',
'edit_plugin': '{{ placeholder.get_changelist_url }}'
@@ -20,7 +21,6 @@
<div class="cms_placeholder-btn">
<a href="#"><span>{% trans "Add Plugin" %}</span></a>
<ul class="cms_placeholder-subnav">
- {% regroup installed_plugins by module as module_list %}
{% for module in module_list %}
<li class="cms_placeholder-subnav-title"><span>{% if module.grouper %}{{ module.grouper|capfirst }}{% else %}{% trans "Available plugins" %}{% endif %}</span></li>
{% for p in module.list %}
@@ -30,4 +30,4 @@
</ul>
</div>
</div>
-<div class="cms_reset cms_light cms_dragholder cms_dragholder-empty cms_dragholder-droppable"><div class="cms_dragitem">Drop a plugin here</div></div>
+<div class="cms_reset cms_light cms_dragholder cms_dragholder-empty cms_dragholder-droppable"><div class="cms_dragitem">Drop a plugin here</div></div>
@@ -1,3 +0,0 @@
-{% for plugin in plugins %}
- {% include "cms/toolbar/plugin_drag.html" with plugin=plugin %}
-{% endfor %}
@@ -0,0 +1,3 @@
+{% for plugin in plugins %}
+ {% include "cms/toolbar/plugin_dragholder.html" with plugin=plugin %}
+{% endfor %}
@@ -20,8 +20,7 @@
'urls': {
'add_plugin': '{% url admin:cms_page_add_plugin %}',
'edit_plugin': '{% url admin:cms_page_edit_plugin instance.pk %}',
- 'move_plugin': '{% url admin:cms_page_move_plugin %}',
- 'remove_plugin': '{% url admin:cms_page_delete_plugin instance.pk %}'
+ 'move_plugin': '{% url admin:cms_page_move_plugin %}'
}
});
});
@@ -11,7 +11,7 @@
{% if plugin.get_plugin_class.allow_children and plugin.plugin_children_instances %}
{% for child in plugin.plugin_children_instances %}
{# workaround because include tag does not allow recursive includes #}
- {% with template_name="cms/toolbar/plugin_drag.html" %}{% include template_name with plugin=child %}{% endwith %}
+ {% with template_name="cms/toolbar/plugin_dragholder.html" %}{% include template_name with plugin=child %}{% endwith %}
{% endfor %}
{% endif %}
</div>
@@ -484,7 +484,7 @@ The template used for wrapping the plugin in frontend editing.
Default:
-`cms/toolbar/placeholder_wrapper.html`
+`cms/toolbar/placeholder_plugin.html`
admin_preview

0 comments on commit a2a0006

Please sign in to comment.