kopia lustrzana https://github.com/wagtail/wagtail
Hide the 'publish copies' checkbox if there is nothing to publish
rodzic
f55a00fea9
commit
9a86167f6e
|
@ -21,7 +21,7 @@
|
|||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if can_publish %}
|
||||
{% if pages_to_publish.count and can_publish %}
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=form.publish_copies %}
|
||||
<li class="help">
|
||||
{% blocktrans with live_page_count=pages_to_copy.live.count %}{{ live_page_count }} of the pages being copied are live. Would you like to publish their copies?{% endblocktrans %}
|
||||
|
|
|
@ -726,10 +726,13 @@ def copy(request, page_id):
|
|||
# Redirect to explore of parent page
|
||||
return redirect('wagtailadmin_explore', parent_page.id)
|
||||
|
||||
pages_to_copy = page.get_descendants(inclusive=True)
|
||||
|
||||
return render(request, 'wagtailadmin/pages/copy.html', {
|
||||
'page': page,
|
||||
'pages_to_copy': page.get_descendants(inclusive=True),
|
||||
'pages_to_copy': pages_to_copy,
|
||||
'parent_page': parent_page,
|
||||
'pages_to_publish': pages_to_copy.live(),
|
||||
'can_publish': can_publish,
|
||||
'form': form,
|
||||
})
|
||||
|
|
Ładowanie…
Reference in New Issue