SHARED_COHORTS_PARTIAL: "{{#if cohortChoices.length}}\n<div class=\"field-grid\">\n <div class=\"form-group stacked\">\n <label>{{localize \"SOHL.Gear.FIELDS.sharedWithCohortIds.label\"}}</label>\n <select name=\"system.sharedWithCohortIds\" multiple size=\"3\" data-tooltip=\"{{localize \"SOHL.Gear.FIELDS.sharedWithCohortIds.hint\"}}\">\n {{selectOptions cohortChoices selected=sharedWithCohortIds valueAttr=\"value\" labelAttr=\"label\"}}\n </select>\n </div>\n</div>\n{{/if}}" = ...

The reusable cohort-sharing control, registered as the named partial sharedWithCohortsField and rendered on every gear item's Properties tab (issue #76). It is the one place a gear item is marked as shared with a Cohort — a multi-select of the world's cohorts, storing each choice as that cohort's system.shortcode in system.sharedWithCohortIds. The cohort's Shared Gear tab is the read-only other end of the same link.

The control renders only when the world actually has a cohort, so an ordinary character sheet is not cluttered by a field with nothing to choose.

Invocation context:

  • cohortChoices{value,label}[] of the world's cohorts (empty hides the control).
  • sharedWithCohortIds — the item's current sharing list (the selection).