Assign new item set - #2522
Assign new item set#2522Daniel-KM wants to merge 4 commits into
Conversation
|
About copilot, i think the setting is on your part, not mine. |
|
Our settings are all off. The only way this works is if someone is paying for it and we definitely are not. |
There was a problem hiding this comment.
Pull request overview
Adds parity with items by enabling item sets to be assigned to sites, including auto-assignment defaults via site/user settings and exposing assigned sites in admin UI and API output.
Changes:
- Add “Sites” management UI to the item set add/edit form and display assigned sites on item set details.
- Introduce site setting
assign_new_item_sets(default on) plus user default sites for item sets. - Extend API: include
o:sitein item set JSON-LD and hydrate site↔item set assignments inItemSetAdapter; addassign_new_item_setsfiltering toSiteAdapter.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| application/view/omeka/admin/item-set/show-details.phtml | Displays sites on item set details (currently duplicated). |
| application/view/omeka/admin/item-set/manage-sites.phtml | New partial to assign/unassign item sets to sites. |
| application/view/omeka/admin/item-set/form.phtml | Adds “Sites” section/tab to item set form. |
| application/src/Form/UserForm.php | Adds user default sites setting for item sets; filters sites by assignment permission. |
| application/src/Form/SiteSettingsForm.php | Adds site-level “Auto-assign new item sets” setting. |
| application/src/Controller/Admin/ItemSetController.php | Ensures o:site is always present on add; provides resource var on edit. |
| application/src/Api/Representation/ItemSetRepresentation.php | Adds o:site to item set JSON-LD. |
| application/src/Api/Adapter/SiteAdapter.php | Supports searching sites by assign_new_item_sets via site settings. |
| application/src/Api/Adapter/ItemSetAdapter.php | Implements hydration of site assignments for item sets and auto-assignment on create. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <?php $sites = $resource->sites(); ?> | ||
| <?php if ($sites): ?> | ||
| <div class="meta-group"> | ||
| <h4><?php echo $translate('Sites'); ?></h4> | ||
| <?php foreach ($sites as $site): ?> | ||
| <div class="value"><?php echo $site->link($site->title()); ?></div> | ||
| <?php endforeach; ?> | ||
| </div> | ||
| <?php endif; ?> |
| } | ||
| } | ||
| } | ||
| } | ||
|
|
|
Of course, i don't have any subscription at github, i don't have windows, i don't have any microsoft product. |
3395d0a to
957aa8f
Compare
This is something that my users ask regularly, like for items.
So i reimplemented the third solution of the pr #2057 , but finally i think that the best solution will be another one, so to replace o:assign_new_items by a simple setting and simplify the table site, but it is another thing.