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):
|
||||
inlines = [InlineSubSectionAdmin]
|
||||
list_filter = ['page']
|
||||
list_display = ['__str__', 'get_type_display']
|
||||
|
||||
@admin.register(SubSection)
|
||||
class SubSectionAdmin(admin.ModelAdmin):
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
{% block title %}{{block.super}} - {{page.title}}{% endblock %}
|
||||
|
||||
{% 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">
|
||||
{% if user.is_staff %}
|
||||
{% if page.slug %}
|
||||
|
@ -16,12 +22,6 @@
|
|||
{% endif %}
|
||||
</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 %}
|
||||
<section>
|
||||
<div class="wrapper">
|
||||
|
|
Ładowanie…
Reference in New Issue