Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename draft publish buttons #6052

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.txt
Expand Up @@ -14,6 +14,7 @@
was rendered before attempting to inherit content from parent pages.
* Changed page/placeholder cache keys to use sha1 hash instead of md5 to be FIPS compliant.
* Fixed a bug where the change of a slug would not propagate to all descendant pages
* Rename publish buttons to no longer reference "page"


=== 3.4.4 (unreleased) ===
Expand Down
2 changes: 1 addition & 1 deletion cms/locale/en/LC_MESSAGES/django.po
Expand Up @@ -1662,7 +1662,7 @@ msgstr "Available plugins"
#: templates/cms/toolbar/items/live_draft.html:6
#, fuzzy
#| msgid "View published"
msgid "View published page"
msgid "View published"
msgstr "View published"

#: templates/cms/toolbar/items/live_draft.html:11
Expand Down
4 changes: 2 additions & 2 deletions cms/templates/cms/toolbar/items/live_draft.html
Expand Up @@ -3,12 +3,12 @@
{% if cms_toolbar.edit_mode_active %}
<a class="cms-btn cms-btn-switch-save"
href="{% firstof cms_toolbar.get_object_public_url cms_toolbar.request_path %}?{{ cms_toolbar.edit_mode_url_off }}">
<span>{% trans "View published page" %}</span>
<span>{% trans "View published" %}</span>
</a>
{% else %}
<a class="cms-btn cms-btn-action cms-btn-switch-edit"
href="{% firstof cms_toolbar.get_object_draft_url cms_toolbar.request_path %}?{{ cms_toolbar.edit_mode_url_on }}">
{% trans "Edit page" %}
{% trans "Edit" %}
</a>
{% endif %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion cms/tests/test_toolbar.py
Expand Up @@ -244,7 +244,7 @@ def test_live_draft_markup_on_app_page(self):

output = (
'<a class="cms-btn cms-btn-action cms-btn-switch-edit" '
'href="/en/example/latest/?{}">Edit page</a>'
'href="/en/example/latest/?{}">Edit</a>'
).format(get_cms_setting('CMS_TOOLBAR_URL__EDIT_ON'))

Example1.objects.create(
Expand Down
4 changes: 2 additions & 2 deletions cms/tests/test_views.py
Expand Up @@ -224,7 +224,7 @@ def test_toolbar_switch_urls(self):
self.assertContains(
response,
'<a class="cms-btn cms-btn-switch-save" href="/fr/?{}">'
'<span>View published page</span></a>'.format(edit_off),
'<span>View published</span></a>'.format(edit_off),
count=1,
html=True,
)
Expand All @@ -237,7 +237,7 @@ def test_toolbar_switch_urls(self):
)
self.assertContains(
response,
'<a class="cms-btn cms-btn-action cms-btn-switch-edit" href="/fr/?{}">Edit page</a>'.format(edit_on),
'<a class="cms-btn cms-btn-action cms-btn-switch-edit" href="/fr/?{}">Edit</a>'.format(edit_on),
count=1,
html=True,
)
Expand Down