<% var title = gettext("Draft (Never published)"); if (visibilityState === 'staff_only') { title = gettext("Visible to Staff Only"); } else if (visibilityState === 'live') { title = gettext("Published and Live"); } else if (published && !hasChanges) { title = gettext("Published (not yet released)"); } else if (published && hasChanges) { title = gettext("Draft (Unpublished changes)"); } var releaseLabel = gettext("Release:"); if (visibilityState === 'live') { releaseLabel = gettext("Released:"); } else if (visibilityState === 'ready') { releaseLabel = gettext("Scheduled:"); } var visibleToStaffOnly = visibilityState === 'staff_only'; %>

<%- gettext("Publishing Status") %> <%- title %>

<% if (hasChanges && editedOn && editedBy) { var message = gettext("Draft saved on %(last_saved_date)s by %(edit_username)s") %> <%= interpolate(_.escape(message), { last_saved_date: '' + _.escape(editedOn) + '', edit_username: '' + _.escape(editedBy) + '' }, true) %> <% } else if (publishedOn && publishedBy) { var message = gettext("Last published %(last_published_date)s by %(publish_username)s"); %> <%= interpolate(_.escape(message), { last_published_date: '' + _.escape(publishedOn) + '', publish_username: '' + _.escape(publishedBy) + '' }, true) %> <% } else { %> <%- gettext("Previously published") %> <% } %>

<% if (!course.get('self_paced')) { %>
<%- releaseLabel %>

<% if (releaseDate) { %> <%- releaseDate %> <%- interpolate( gettext('with %(release_date_from)s'), { release_date_from: releaseDateFrom }, true ) %> <% } else { %> <%- gettext("Unscheduled") %> <% } %>

<% } %>
<% if (released && published && !hasChanges) { %> <%- gettext("Is Visible To:") %> <% } else { %> <%- gettext("Will Be Visible To:") %> <% } %>
<% if (visibleToStaffOnly) { %>

<%- gettext("Staff Only") %> <% if (!hasExplicitStaffLock) { %> <%- interpolate( gettext("with %(section_or_subsection)s"),{ section_or_subsection: staffLockFrom }, true ) %> <% } %>

<% } else { %>

<%- gettext("Staff and Students") %>

<% } %> <% if (hasContentGroupComponents) { %>

<%- gettext("Some content in this unit is visible only to particular content groups") %>

<% } %>