Skip to content

Commit

Permalink
[Improvement] Show unpublished elements in dependency-list consistent…
Browse files Browse the repository at this point in the history
…ly with line-through
  • Loading branch information
ferdinand-it authored and dvesh3 committed Feb 11, 2022
1 parent 1bac8c8 commit 5aa4d71
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
Expand Up @@ -119,7 +119,15 @@ pimcore.element.dependencies = Class.create({
+ '" name="' + t(record.data.subtype) + '">&nbsp;</div>';
}
},
{text: t("path"), sortable: true, dataIndex: 'path', flex: 1, renderer: Ext.util.Format.htmlEncode}
{text: t("path"), sortable: true, dataIndex: 'path', flex: 1,
renderer:
function (value, metaData, record, rowIndex, colIndex, store) {
if(record.data.published === false) {
metaData.tdStyle = 'text-decoration: line-through;color: #777;';
}
return Ext.util.Format.htmlEncode(value);
}
}
],
flex: 1,
columnLines: true,
Expand Down Expand Up @@ -219,7 +227,15 @@ pimcore.element.dependencies = Class.create({
+ '" name="' + t(record.data.subtype) + '">&nbsp;</div>';
}
},
{text: t("path"), sortable: true, dataIndex: 'path', flex: 1, renderer: Ext.util.Format.htmlEncode}
{text: t("path"), sortable: true, dataIndex: 'path', flex: 1,
renderer:
function (value, metaData, record, rowIndex, colIndex, store) {
if(record.data.published === false) {
metaData.tdStyle = 'text-decoration: line-through;color: #777;';
}
return Ext.util.Format.htmlEncode(value);
}
}
],
columnLines: true,
stripeRows: true,
Expand Down
1 change: 1 addition & 0 deletions models/Element/Service.php
Expand Up @@ -233,6 +233,7 @@ private static function getDependencyForFrontend($element)
'path' => $element->getRealFullPath(),
'type' => self::getElementType($element),
'subtype' => $element->getType(),
'published' => self::isPublished($element),
];
}

Expand Down

0 comments on commit 5aa4d71

Please sign in to comment.