Skip to content

Assign new item set - #2522

Open
Daniel-KM wants to merge 4 commits into
omeka:developfrom
Daniel-KM:feat/assign_new_item_set
Open

Daniel-KM wants to merge 4 commits into
omeka:developfrom
Daniel-KM:feat/assign_new_item_set

Conversation

@Daniel-KM

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings June 22, 2026 20:45
@Daniel-KM

Copy link
Copy Markdown
Contributor Author

About copilot, i think the setting is on your part, not mine.

@sharonmleon

Copy link
Copy Markdown
Member

Our settings are all off. The only way this works is if someone is paying for it and we definitely are not.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:site in item set JSON-LD and hydrate site↔item set assignments in ItemSetAdapter; add assign_new_item_sets filtering to SiteAdapter.

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.

Comment on lines +25 to +33
<?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; ?>
Comment on lines +226 to 230
}
}
}
}

@Daniel-KM

Copy link
Copy Markdown
Contributor Author

Of course, i don't have any subscription at github, i don't have windows, i don't have any microsoft product.
Or github may have categorized me as open-source writer, and maybe it is automatically set copilot for free in that case.
I'm going to search more, but the options are very numerous and ununderstandable. There is no a unique option "Disable copilot" (the same for "Respect gdpr" anyway).

@Daniel-KM
Daniel-KM force-pushed the feat/assign_new_item_set branch from 3395d0a to 957aa8f Compare June 22, 2026 21:06
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