mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 18:26:29 +08:00
875f0d8fd8
This feature adds the ability to define synonyms for tags, and the ability to merge one tag into another while keeping it as a synonym. For example, tags named "js" and "java-script" can be synonyms of "javascript". When searching and creating topics using synonyms, they will be mapped to the base tag. Along with this change is a new UI found on each tag's page (for example, `/tags/javascript`) where more information about the tag can be shown. It will list the synonyms, which categories it's restricted to (if any), and which tag groups it belongs to (if tag group names are public on the `/tags` page by enabling the "tags listed by group" setting). Staff users will be able to manage tags in this UI, merge tags, and add/remove synonyms.
95 lines
3.7 KiB
Handlebars
95 lines
3.7 KiB
Handlebars
{{#link-to 'adminWebHooks' class="go-back"}}
|
|
{{d-icon 'arrow-left'}}
|
|
{{i18n 'admin.web_hooks.go_back'}}
|
|
{{/link-to}}
|
|
|
|
<div class='web-hook-container'>
|
|
<p>{{i18n 'admin.web_hooks.detailed_instruction'}}</p>
|
|
<form class='web-hook form-horizontal'>
|
|
<div>
|
|
<label for='payload-url'>{{i18n 'admin.web_hooks.payload_url'}}</label>
|
|
{{text-field name="payload-url" value=model.payload_url placeholderKey="admin.web_hooks.payload_url_placeholder"}}
|
|
{{input-tip validation=urlValidation}}
|
|
</div>
|
|
|
|
<div>
|
|
<label for='content-type'>{{i18n 'admin.web_hooks.content_type'}}</label>
|
|
{{combo-box content=contentTypes
|
|
name="content-type"
|
|
value=model.content_type}}
|
|
</div>
|
|
|
|
<div>
|
|
<label for='secret'>{{i18n 'admin.web_hooks.secret'}}</label>
|
|
{{text-field name="secret" value=model.secret placeholderKey="admin.web_hooks.secret_placeholder"}}
|
|
{{input-tip validation=secretValidation}}
|
|
</div>
|
|
|
|
<div class="cbox10">
|
|
<label>{{i18n 'admin.web_hooks.event_chooser'}}</label>
|
|
<div>
|
|
{{radio-button class="subscription-choice" name="subscription-choice" value="individual" selection=model.webHookType}}
|
|
{{i18n 'admin.web_hooks.individual_event'}}
|
|
{{input-tip validation=eventTypeValidation}}
|
|
</div>
|
|
{{#unless model.wildcard_web_hook}}
|
|
<div class="event-selector">
|
|
{{#each eventTypes as |type|}}
|
|
{{admin-web-hook-event-chooser type=type model=model.web_hook_event_types}}
|
|
{{/each}}
|
|
</div>
|
|
{{/unless}}
|
|
<div>
|
|
{{radio-button class="subscription-choice" name="subscription-choice" value="wildcard" selection=model.webHookType}}
|
|
{{i18n 'admin.web_hooks.wildcard_event'}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class='filters'>
|
|
<div class="filter">
|
|
<label>{{d-icon 'circle' class='tracking'}}{{i18n 'admin.web_hooks.categories_filter'}}</label>
|
|
{{category-selector categories=model.categories}}
|
|
<div class="instructions">{{i18n 'admin.web_hooks.categories_filter_instructions'}}</div>
|
|
</div>
|
|
{{#if showTagsFilter}}
|
|
<div class="filter">
|
|
<label>{{d-icon 'circle' class='tracking'}}{{i18n 'admin.web_hooks.tags_filter'}}</label>
|
|
{{tag-chooser tags=model.tag_names everyTag=true excludeSynonyms=true}}
|
|
<div class="instructions">{{i18n 'admin.web_hooks.tags_filter_instructions'}}</div>
|
|
</div>
|
|
{{/if}}
|
|
<div class="filter">
|
|
<label>{{d-icon 'circle' class='tracking'}}{{i18n 'admin.web_hooks.groups_filter'}}</label>
|
|
{{group-selector groupNames=model.groupsFilterInName groupFinder=model.groupFinder}}
|
|
<div class="instructions">{{i18n 'admin.web_hooks.groups_filter_instructions'}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{plugin-outlet name="web-hook-fields" args=(hash model=model)}}
|
|
|
|
<div>
|
|
{{input type="checkbox" name="verify_certificate" checked=model.verify_certificate}} {{i18n 'admin.web_hooks.verify_certificate'}}
|
|
</div>
|
|
<div>
|
|
<div>
|
|
{{input type="checkbox" name="active" checked=model.active}} {{i18n 'admin.web_hooks.active'}}
|
|
</div>
|
|
{{#if model.active}}
|
|
<div class="instructions">{{i18n 'admin.web_hooks.active_notice'}}</div>
|
|
{{/if}}
|
|
</div>
|
|
</form>
|
|
|
|
<div class='controls'>
|
|
{{d-button class="btn-default" translatedLabel=saveButtonText action=(action "save") disabled=saveButtonDisabled}}
|
|
|
|
{{#unless model.isNew}}
|
|
{{d-button class="btn-danger" label="admin.web_hooks.destroy" action=(action "destroy")}}
|
|
{{#link-to 'adminWebHooks.showEvents' model.id class="btn"}}
|
|
{{i18n 'admin.web_hooks.events.go_events'}}
|
|
{{/link-to}}
|
|
{{/unless}}
|
|
<span class='saving'>{{savingStatus}}</span>
|
|
</div>
|
|
</div>
|