-
Notifications
You must be signed in to change notification settings - Fork 2
NGSTACK-991 add lastModificationInfo and VisibilityInfo to adminUI content full view #7
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
Conversation
|
|
||
| if (count($locations) === 1) { | ||
| if ($hiddenLocations === 0) { | ||
| $info = 'Location: VISIBLE'; |
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.
This is a "normal" state, so we don't need to show it.
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.
Removed it completely. If all locations (of some content) are visible, no message is being shown now.
| $info = 'Location: HIDDEN'; | ||
| } | ||
| } else if ($hiddenLocations === 0) { | ||
| $info = 'Locations: ALL VISIBLE'; |
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.
This is also a "normal" state, we don't need to show it.
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.
Removed it completely. If all locations (of some content) are visible, no message is being shown now (same as above comment)
|
This should have a topic-named branch and it should target branch |
|
@AntePrkacin on second thought, let's make the visibility alert blue in all cases. It can be full width, as was the case before. So basically exactly the same as before, just with different text. I think that makes more sense as we wont use alert style for information, and also it follows the same style as vanilla admin, so we also avoid introducing a discrepancy. Also in that case, we have full width to take advantage of, so we can put inside info for both Content and Location (if hidden). |
| } else { | ||
| // some or all locations are hidden | ||
| $info = sprintf( | ||
| 'Locations: %s out of %s HIDDEN', |
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.
Please use translation files for messages.
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.
Added all the translations to bundle/Resources/translations/locationview.en.yaml file
…lations for messages
…e twig template that renders it
…nfo about visibility of content and locations
…injecting contentService into it
…ibilityInfo' controller and add 'data-url' attribute
…ng if location is hidden and update message text
…plicitly hidden locations
|
Closing this PR because I'm going to change the name of the branch and then open a new PR for this. |
Added information about who last modified the content and at what time (this only applies to published content) and added information about location(s) visibility for the content.
This is all done by calling custom controllers (
lastModificationInfoandVisibilityInfo) from thecontent/location_view.html.twigtemplate.