mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
Link to comment parent page. (Fixes: #13)
This commit is contained in:
parent
8e7fadafd2
commit
6de470125b
@ -39,7 +39,7 @@ class CommentAdmin extends LeftAndMain {
|
|||||||
|
|
||||||
$commentsConfig = GridFieldConfig::create()->addComponents(
|
$commentsConfig = GridFieldConfig::create()->addComponents(
|
||||||
new GridFieldFilterHeader(),
|
new GridFieldFilterHeader(),
|
||||||
new GridFieldDataColumns(),
|
$columns = new GridFieldDataColumns(),
|
||||||
new GridFieldSortableHeader(),
|
new GridFieldSortableHeader(),
|
||||||
new GridFieldPaginator(25),
|
new GridFieldPaginator(25),
|
||||||
new GridFieldDeleteAction(),
|
new GridFieldDeleteAction(),
|
||||||
@ -59,6 +59,16 @@ class CommentAdmin extends LeftAndMain {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$columns->setFieldFormatting(array(
|
||||||
|
'ParentTitle' => function($value, &$item) {
|
||||||
|
return sprintf(
|
||||||
|
'<a href="%s" class="cms-panel-link external-link action" target="_blank">%s</a>',
|
||||||
|
Convert::raw2xml($item->Link()),
|
||||||
|
Convert::raw2xml($value)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
));
|
||||||
|
|
||||||
$needs = new GridField(
|
$needs = new GridField(
|
||||||
'Comments',
|
'Comments',
|
||||||
_t('CommentsAdmin.NeedsModeration', 'Needs Moderation'),
|
_t('CommentsAdmin.NeedsModeration', 'Needs Moderation'),
|
||||||
|
Loading…
Reference in New Issue
Block a user