kopia lustrzana https://github.com/rtts/django-simplecms
move edit page button
rodzic
b4256226c1
commit
b550e25bbd
|
@ -21,6 +21,7 @@ class PageAdmin(admin.ModelAdmin):
|
||||||
class SectionAdmin(admin.ModelAdmin):
|
class SectionAdmin(admin.ModelAdmin):
|
||||||
inlines = [InlineSubSectionAdmin]
|
inlines = [InlineSubSectionAdmin]
|
||||||
list_filter = ['page']
|
list_filter = ['page']
|
||||||
|
list_display = ['__str__', 'get_type_display']
|
||||||
|
|
||||||
@admin.register(SubSection)
|
@admin.register(SubSection)
|
||||||
class SubSectionAdmin(admin.ModelAdmin):
|
class SubSectionAdmin(admin.ModelAdmin):
|
||||||
|
|
|
@ -4,6 +4,12 @@
|
||||||
{% block title %}{{block.super}} - {{page.title}}{% endblock %}
|
{% block title %}{{block.super}} - {{page.title}}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
{% for section in sections %}
|
||||||
|
<section class="{{section.type}} color{{section.color}}">
|
||||||
|
{% include 'cms/sections/'|add:section.type|add:'.html' %}
|
||||||
|
</section>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
<div class="edit page">
|
<div class="edit page">
|
||||||
{% if user.is_staff %}
|
{% if user.is_staff %}
|
||||||
{% if page.slug %}
|
{% if page.slug %}
|
||||||
|
@ -16,12 +22,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% for section in sections %}
|
|
||||||
<section class="{{section.type}} color{{section.color}}">
|
|
||||||
{% include 'cms/sections/'|add:section.type|add:'.html' %}
|
|
||||||
</section>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% if user.is_staff %}
|
{% if user.is_staff %}
|
||||||
<section>
|
<section>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
Ładowanie…
Reference in New Issue