Skip to content

Conversation

@AntePrkacin
Copy link
Contributor

image

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 (lastModificationInfo and VisibilityInfo) from the content/location_view.html.twig template.

@AntePrkacin AntePrkacin requested a review from pspanja October 10, 2025 14:27
@AntePrkacin AntePrkacin self-assigned this Oct 10, 2025
@AntePrkacin AntePrkacin changed the title NGSTACK-911 add lastModificationInfo and VisibilityInfo to adminUI content full view NGSTACK-991 add lastModificationInfo and VisibilityInfo to adminUI content full view Oct 10, 2025

if (count($locations) === 1) {
if ($hiddenLocations === 0) {
$info = 'Location: VISIBLE';
Copy link
Member

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.

Copy link
Contributor Author

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';
Copy link
Member

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.

Copy link
Contributor Author

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)

@pspanja
Copy link
Member

pspanja commented Oct 14, 2025

This should have a topic-named branch and it should target branch 1.6. Branch 1.6 should be created from the current master, exactly as branch 1.5 already is.

@pspanja
Copy link
Member

pspanja commented Oct 14, 2025

@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',
Copy link
Member

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.

Copy link
Contributor Author

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

@AntePrkacin
Copy link
Contributor Author

AntePrkacin commented Oct 15, 2025

Closing this PR because I'm going to change the name of the branch and then open a new PR for this.
New PR: #8

@AntePrkacin AntePrkacin deleted the 1.6 branch October 15, 2025 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants