in public/javascripts/app/models/SnapshotIdModel.js [97:122]
getPublishedState() {
const publishedDetails = this.get('summary.contentChangeDetails.published');
const published = this.get('summary.published');
const settings = this.get('summary.preview.settings');
const scheduledLaunchDate = this.get('summary.scheduledLaunchDate');
if (!!scheduledLaunchDate) {
const time = moment(scheduledLaunchDate);
return "Scheduled " + time.format("ddd D MMMM YYYY");
}
if (!!settings && !!settings.embargoedUntil) {
const time = moment(settings.embargoedUntil);
return "Embargoed until " + time.format("ddd D MMMM YYYY");
}
if (published) {
return 'Published';
}
if (!published && !!publishedDetails) {
return "Taken down";
}
return "";
}