Repository: wagtail/wagtail

Issue:
Snippet with only `RevisionMixin` applied should not show "current draft" status in history
<!--
Found a bug? Please fill out the sections below. 👍
-->

### Issue Summary

When viewing the history for a snippet with `RevisionMixin` applied **and not `DraftStateMixin`**, the latest log entry always shows a "Current draft" status tag:

<img width="530" alt="image" src="https://user-images.githubusercontent.com/6379424/189339940-6c4b9431-ccc4-4e76-92eb-a4235d310322.png">

This isn't relevant for the snippet because without `DraftStateMixin`, the snippet is always live.

### Steps to Reproduce

1. Spin up bakerydemo
2. Apply `RevisionMixin` to a model, e.g. `BreadType`
3. Create a new instance of the snippet
4. Open the history page for the instance

I think the status tag should only be shown if `DraftStateMixin` is applied. Alternatively, we can also make it so that it shows the "Live version" status tag for the latest log entry, but I think that's unnecessary as it may imply the existence of a draft version.

-   I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: yes


Discussion:

Resolving patch:
diff --git a/wagtail/snippets/views/snippets.py b/wagtail/snippets/views/snippets.py
--- a/wagtail/snippets/views/snippets.py
+++ b/wagtail/snippets/views/snippets.py
@@ -582,6 +582,7 @@ def __init__(self, *args, object=None, view=None, **kwargs):
     def get_cell_context_data(self, instance, parent_context):
         context = super().get_cell_context_data(instance, parent_context)
         context["revision_enabled"] = isinstance(self.object, RevisionMixin)
+        context["draftstate_enabled"] = isinstance(self.object, DraftStateMixin)
         context["preview_enabled"] = isinstance(self.object, PreviewableMixin)
         context["object"] = self.object
         context["view"] = self.view


Test patch:
diff --git a/wagtail/snippets/tests/test_snippets.py b/wagtail/snippets/tests/test_snippets.py
--- a/wagtail/snippets/tests/test_snippets.py
+++ b/wagtail/snippets/tests/test_snippets.py
@@ -2260,6 +2260,14 @@ def test_should_show_actions_on_revisable_snippet(self):
             args=[self.revisable_snippet.pk, self.initial_revision.pk],
         )
 
+        # Should not show the "live version" or "current draft" status tags
+        self.assertNotContains(
+            response, '<span class="status-tag primary">Live version</span>'
+        )
+        self.assertNotContains(
+            response, '<span class="status-tag primary">Current draft</span>'
+        )
+
         # The latest revision should have an "Edit" action instead of "Review"
         self.assertContains(
             response,
@@ -2274,14 +2282,26 @@ def test_should_show_actions_on_revisable_snippet(self):
             count=1,
         )
 
-    def test_use_latest_draft_as_title(self):
+    def test_with_live_and_draft_status(self):
         snippet = DraftStateModel.objects.create(text="Draft-enabled Foo, Published")
         snippet.save_revision().publish()
+        snippet.refresh_from_db()
+
         snippet.text = "Draft-enabled Bar, In Draft"
-        snippet.save_revision()
+        snippet.save_revision(log_action=True)
 
         response = self.get(snippet)
 
+        # Should show the "live version" status tag for the published revision
+        self.assertContains(
+            response, '<span class="status-tag primary">Live version</span>', count=1
+        )
+
+        # Should show the "current draft" status tag for the draft revision
+        self.assertContains(
+            response, '<span class="status-tag primary">Current draft</span>', count=1
+        )
+
         # Should use the latest draft title in the header subtitle
         self.assertContains(
             response,