django-cms / djangocms-versioning

General purpose versioning package for Django CMS 4 and above.
Other
33 stars 29 forks source link

feat: Add preview button to view published mode #316

Closed fsbraun closed 1 year ago

fsbraun commented 1 year ago

Description

Currently, there is no way to use the toolbar to get from viewing a published version of a page (or other object) back to its preview. The only option available is "Edit" which will create a new draft or go to an existing draft.

With this PR the view published mode will have an additional button to get (back) to the preview.

I expect it to create more transparency on the modes available with djangocms-verisoning

Also there are use cases where published versions and the preview of a public version need to be compared:

preview

Related resources

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #316 (b1875ac) into master (33a28c9) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #316      +/-   ##
==========================================
+ Coverage   89.88%   89.91%   +0.02%     
==========================================
  Files          68       68              
  Lines        2244     2250       +6     
  Branches      299      301       +2     
==========================================
+ Hits         2017     2023       +6     
  Misses        172      172              
  Partials       55       55              
Impacted Files Coverage Δ
djangocms_versioning/cms_toolbars.py 95.85% <100.00%> (+0.15%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.