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

Show expired and future content in contents view #4764

Merged
merged 3 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/4764.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug where editors could not see their own content in the Contents view if it was expired or has a future effective date. @davisagli
2 changes: 2 additions & 0 deletions src/components/manage/Contents/Contents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,7 @@ class Contents extends Component {
sort_order: this.state.sort_order,
metadata_fields: '_all',
b_size: 100000000,
show_inactive: true,
...(this.state.filter && { SearchableText: `${this.state.filter}*` }),
});
} else {
Expand All @@ -1024,6 +1025,7 @@ class Contents extends Component {
...(this.state.filter && { SearchableText: `${this.state.filter}*` }),
b_size: this.state.pageSize,
b_start: this.state.currentPage * this.state.pageSize,
show_inactive: true,
});
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/components/manage/Contents/ContentsItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ export const ContentsItemComponent = ({
<FormattedMessage id="Expired" defaultMessage="Expired" />
</Button>
)}
{item.EffectiveDate !== 'None' &&
new Date(item.EffectiveDate).getTime() > new Date().getTime() && (
<Button className="button-margin effective-future" size="mini">
<FormattedMessage id="Scheduled" defaultMessage="Scheduled" />
</Button>
)}
</Link>
</Table.Cell>
{map(indexes, (index) => (
Expand Down