mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-06 07:28:53 -05:00
fix
This commit is contained in:
parent
9372398ab5
commit
004584de03
@ -78,6 +78,7 @@ export function listItemProps(props, item, index) {
|
|||||||
const url = {
|
const url = {
|
||||||
view: itemPageLink(props, item),
|
view: itemPageLink(props, item),
|
||||||
edit: props.canEdit ? item.url.replace('view?m=', 'edit?m=') : null,
|
edit: props.canEdit ? item.url.replace('view?m=', 'edit?m=') : null,
|
||||||
|
publish: props.canEdit ? item.url.replace('view?m=', 'publish?m=') : null,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (window.MediaCMS.site.devEnv && -1 < url.view.indexOf('view?')) {
|
if (window.MediaCMS.site.devEnv && -1 < url.view.indexOf('view?')) {
|
||||||
@ -321,6 +322,7 @@ export function ListItem(props) {
|
|||||||
|
|
||||||
if (props.canEdit) {
|
if (props.canEdit) {
|
||||||
args.editLink = props.url.edit;
|
args.editLink = props.url.edit;
|
||||||
|
args.publishLink = props.url.publish;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.taxonomyPage.current) {
|
if (props.taxonomyPage.current) {
|
||||||
|
|||||||
@ -82,8 +82,8 @@ export function MediaItemEditLink(props) {
|
|||||||
|
|
||||||
export function MediaItemViewLink(props) {
|
export function MediaItemViewLink(props) {
|
||||||
return !props.link ? null : (
|
return !props.link ? null : (
|
||||||
<a href={props.link} title={translateString("View media")} className="item-view-icon">
|
<a href={props.link} title={translateString("Publish media")} className="item-view-icon">
|
||||||
<i className="material-icons">visibility</i>
|
<i className="material-icons">publish</i>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ export function useMediaItem(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function viewMediaComponent() {
|
function viewMediaComponent() {
|
||||||
return props.showSelection ? <MediaItemViewLink link={props.link} /> : null;
|
return props.showSelection ? <MediaItemViewLink link={props.publishLink || props.link} /> : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function authorComponent() {
|
function authorComponent() {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user