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

Add Notice on display of Draft pages #984

Closed
4 tasks
xmatthewx opened this issue Jan 23, 2018 · 5 comments
Closed
4 tasks

Add Notice on display of Draft pages #984

xmatthewx opened this issue Jan 23, 2018 · 5 comments
Assignees

Comments

@xmatthewx
Copy link
Contributor

xmatthewx commented Jan 23, 2018

Currently, all Mezzanine authors can view pages with Draft status on the frontend as if the page was Published. This is great for a preview, but dangerous since many staff can assume a page is live and visible to the public when it is not.

Steps to Repeat:

  • Create a new Opportunity Page via Mezz
  • Save as draft
  • Navigate to page
  • Expected: page is visible as preview, with notice at top to Publish
  • Actual: page is visible with no notice

Requirements

  • The notice can be simple. Should display at top of all CMS editable pages that are not current Published.
  • Yellow bar (#faf2cc) across the top with text that says:
    • "Draft preview. You must save as Published to make it public."
  • Use notice component styles previously developed by Gavin
  • A Page can be Published, but not live because of a future date or expiration date. We should show notice on ALL pages that are not visible. So, in pseudo code `if (status = draft || now != published ) { display_draft_notice = true }. We could get fancy with conditional notice copy, but that feels like extra complexity. Nice to have but probably not worth it.

cc @alanmoo to triage

@xmatthewx
Copy link
Contributor Author

image

@alanmoo
Copy link
Contributor

alanmoo commented Jan 23, 2018

To implement this requires some extra Django/Mezzanine template code in opportunity.pug, which will get generated and added to landingpage.html.

I'm not sure what notice component styles you're referring to though. @gvn can you point them out?

@gvn
Copy link
Contributor

gvn commented Jan 23, 2018

I'm not sure either. We didn't do a custom alert style for Foundation AFAIK.

@xmatthewx
Copy link
Contributor Author

I was thinking of the barn raising notice last spring. Yellow bar.

@alanmoo
Copy link
Contributor

alanmoo commented Feb 15, 2018

Looks like we need a wrapper

{% if not page.published %}
DANGER, WILL ROBINSON!
{% else %}

@gvn gvn self-assigned this Feb 22, 2018
gvn added a commit that referenced this issue Feb 22, 2018
gvn added a commit that referenced this issue Feb 22, 2018
gvn added a commit that referenced this issue Feb 22, 2018
alanmoo added a commit that referenced this issue Feb 22, 2018
@gvn gvn closed this as completed Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants