-
Notifications
You must be signed in to change notification settings - Fork 669
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
feat(views): add attachments and responses to full object listing #10462
Conversation
echo elgg_view('object/elements/full', array( | ||
'entity' => $blog, | ||
'summary' => $summary, | ||
'icon' => $owner_icon, | ||
'body' => $body, | ||
'responses' => $responses, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$responses may not be set here
What's the big motivation for this? |
More extension points, consistency (plugins can't decide where to render responses - resource view or full view). Plugins can't effectively collaborate on views, it's a constant 'I got here first' battle. As a next step, I want to break out full item views into their own views. |
Cool. Is this BC at all for existing plugins? |
Should be. It defaults to false so if the replaced resource view renders the comments they won't appear twice. |
); | ||
$responses = elgg_view('discussion/replies', $params); | ||
if ($topic->status == 'closed') { | ||
$responses = elgg_view('discussion/closed'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to add string not replace
BREAKING CHANGE In core plugins, resource views now longer render comments and replies: instead they pass a show_responses flag to the entity view, which renders the responses and passes them to the listing view. Full discussion view now uses full listing view Full file view now passes file preview as an attachment to the listing view
Rebased and addressed the comments. |
BREAKING CHANGE
In core plugins, resource views now longer render comments and replies:
instead they pass a show_responses flag to the entity view, which
renders the responses and passes them to the listing view.
Full discussion view now uses full listing view
Full file view now passes file preview as an attachment to the listing view