6bd9548b2a
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
- CustomFieldDef now has owner_id (org) and scope (issue/repo) - Issue sidebar loads fields by org owner_id, not repo_id - Org Settings > Custom Fields page for managing field definitions - Repo Settings > Metadata page for filling in repo-scoped values - Migration v345 adds owner_id, scope, entity_id, entity_type columns - Per-repo custom field management replaced by org-level - Replaces .mokogitea/manifest.xml with database-backed metadata Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
86 lines
3.4 KiB
Handlebars
86 lines
3.4 KiB
Handlebars
{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings custom-fields")}}
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "org.settings.custom_fields"}}
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<p class="text grey">{{ctx.Locale.Tr "org.settings.custom_fields_desc"}}</p>
|
|
|
|
{{if .CustomFields}}
|
|
<table class="ui compact table">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ctx.Locale.Tr "org.settings.custom_field_name"}}</th>
|
|
<th>{{ctx.Locale.Tr "org.settings.custom_field_scope"}}</th>
|
|
<th>{{ctx.Locale.Tr "org.settings.custom_field_type"}}</th>
|
|
<th>{{ctx.Locale.Tr "org.settings.custom_field_options"}}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .CustomFields}}
|
|
<tr>
|
|
<td><strong>{{.Name}}</strong>{{if .Description}}<br><small class="text grey">{{.Description}}</small>{{end}}</td>
|
|
<td>{{if eq .Scope "issue"}}{{svg "octicon-issue-opened" 14}} Issue{{else}}{{svg "octicon-repo" 14}} Repo{{end}}</td>
|
|
<td><code>{{.FieldType}}</code></td>
|
|
<td>{{if .Options}}<code class="tw-text-xs">{{.Options}}</code>{{else}}<span class="text grey">-</span>{{end}}</td>
|
|
<td class="tw-text-right">
|
|
<form method="post" action="{{$.OrgLink}}/settings/custom-fields/{{.ID}}/delete" class="tw-inline">
|
|
{{$.CsrfTokenHtml}}
|
|
<button class="ui tiny red icon button" type="submit" title="{{ctx.Locale.Tr "remove"}}">{{svg "octicon-trash" 14}}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
<div class="empty-placeholder">
|
|
<p>{{ctx.Locale.Tr "org.settings.custom_fields_empty"}}</p>
|
|
</div>
|
|
{{end}}
|
|
|
|
<div class="divider"></div>
|
|
|
|
<h5>{{ctx.Locale.Tr "org.settings.custom_field_add"}}</h5>
|
|
<form class="ui form" method="post" action="{{.OrgLink}}/settings/custom-fields">
|
|
{{.CsrfTokenHtml}}
|
|
<div class="three fields">
|
|
<div class="required field">
|
|
<label>{{ctx.Locale.Tr "org.settings.custom_field_name"}}</label>
|
|
<input name="name" required placeholder="e.g. Status, Platform, Priority">
|
|
</div>
|
|
<div class="field">
|
|
<label>{{ctx.Locale.Tr "org.settings.custom_field_scope"}}</label>
|
|
<select name="scope" class="ui dropdown">
|
|
<option value="issue">{{svg "octicon-issue-opened" 14}} Issue (sidebar)</option>
|
|
<option value="repo">{{svg "octicon-repo" 14}} Repo (metadata)</option>
|
|
</select>
|
|
</div>
|
|
<div class="field">
|
|
<label>{{ctx.Locale.Tr "org.settings.custom_field_type"}}</label>
|
|
<select name="field_type" class="ui dropdown">
|
|
<option value="dropdown">Dropdown</option>
|
|
<option value="text">Text</option>
|
|
<option value="number">Number</option>
|
|
<option value="date">Date</option>
|
|
<option value="checkbox">Checkbox</option>
|
|
<option value="url">URL</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="two fields">
|
|
<div class="field">
|
|
<label>{{ctx.Locale.Tr "org.settings.custom_field_options"}}</label>
|
|
<input name="options" placeholder='["Option 1","Option 2","Option 3"]'>
|
|
<p class="help">{{ctx.Locale.Tr "org.settings.custom_field_options_help"}}</p>
|
|
</div>
|
|
<div class="field">
|
|
<label>{{ctx.Locale.Tr "org.settings.custom_field_description"}}</label>
|
|
<input name="description" placeholder="Help text shown to users">
|
|
</div>
|
|
</div>
|
|
<button class="ui primary button" type="submit">{{ctx.Locale.Tr "org.settings.custom_field_add"}}</button>
|
|
</form>
|
|
</div>
|
|
{{template "org/settings/layout_footer" .}}
|