No implicit this codemod (#17235)

* Run no-implicit-this codemod for app templates
* Run tagless-ember-components-codemod for plugins
* Turn on no-implicit-this lint
This commit is contained in:
Peter Wagenet 2022-07-05 10:41:31 -07:00 committed by GitHub
parent fbc1bc4255
commit 371bbadb92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
635 changed files with 4626 additions and 4634 deletions

View File

@ -19,7 +19,11 @@ module.exports = {
"no-inline-styles": false,
"no-input-block": true,
"no-input-tagname": true,
"no-implicit-this": false,
"no-implicit-this": {
allow: [
'loading-spinner'
]
},
"no-invalid-interactive": true,
"no-invalid-link-text": true,
"no-invalid-meta": true,

View File

@ -4,24 +4,24 @@
<div class="admin-main-nav">
<ul class="nav nav-pills">
<NavItem @route="admin.dashboard" @label="admin.dashboard.title" />
{{#if currentUser.admin}}
{{#if this.currentUser.admin}}
<NavItem @route="adminSiteSettings" @label="admin.site_settings.title" />
{{/if}}
<NavItem @route="adminUsers" @label="admin.users.title" />
{{#if showGroups}}
{{#if this.showGroups}}
<NavItem @route="groups" @label="admin.groups.title" />
{{/if}}
{{#if showBadges}}
{{#if this.showBadges}}
<NavItem @route="adminBadges" @label="admin.badges.title" />
{{/if}}
{{#if currentUser.admin}}
{{#if this.currentUser.admin}}
<NavItem @route="adminEmail" @label="admin.email.title" />
{{/if}}
<NavItem @route="adminLogs" @label="admin.logs.title" />
<NavItem @route="adminCustomize" @label="admin.customize.title" />
{{#if currentUser.admin}}
{{#if this.currentUser.admin}}
<NavItem @route="adminApi" @label="admin.api.title" />
{{#if siteSettings.enable_backups}}
{{#if this.siteSettings.enable_backups}}
<NavItem @route="admin.backups" @label="admin.backups.title" />
{{/if}}
{{/if}}
@ -31,7 +31,7 @@
</div>
<div class="boxed white admin-content">
<div class="admin-contents {{adminContentsClassName}}">
<div class="admin-contents {{this.adminContentsClassName}}">
{{outlet}}
</div>
</div>

View File

@ -1,6 +1,6 @@
<DButton @class="btn-primary" @action={{route-action "new"}} @icon="plus" @label="admin.api.new_key" />
{{#if model}}
{{#if this.model}}
<LoadMore @selector=".api-keys tr" @action={{action "loadMore"}}>
<table class="api-keys grid">
<thead>
@ -12,7 +12,7 @@
<th>&nbsp;</th>
</thead>
<tbody>
{{#each model as |k|}}
{{#each this.model as |k|}}
<tr class={{if k.revoked_at "revoked"}}>
<td class="key">
{{#if k.revoked_at}}{{d-icon "times-circle"}}{{/if}}
@ -57,7 +57,7 @@
</table>
</LoadMore>
<ConditionalLoadingSpinner @condition={{loading}} />
<ConditionalLoadingSpinner @condition={{this.loading}} />
{{else}}
<p>{{i18n "admin.api.none"}}</p>
{{/if}}

View File

@ -4,9 +4,9 @@
</LinkTo>
<div class="api-key api-key-new">
{{#if model.id}}
{{#if this.model.id}}
<AdminFormRow @label="admin.api.key">
<div>{{model.key}}</div>
<div>{{this.model.key}}</div>
</AdminFormRow>
<AdminFormRow>
{{i18n "admin.api.not_shown_again"}}
@ -16,16 +16,16 @@
</AdminFormRow>
{{else}}
<AdminFormRow @label="admin.api.description">
<Input @value={{model.description}} @maxlength="255" placeholder={{i18n "admin.api.description_placeholder"}} />
<Input @value={{this.model.description}} @maxlength="255" placeholder={{i18n "admin.api.description_placeholder"}} />
</AdminFormRow>
<AdminFormRow @label="admin.api.user_mode">
<ComboBox @content={{userModes}} @value={{userMode}} @onChange={{action "changeUserMode"}} />
<ComboBox @content={{this.userModes}} @value={{this.userMode}} @onChange={{action "changeUserMode"}} />
</AdminFormRow>
{{#if showUserSelector}}
{{#if this.showUserSelector}}
<AdminFormRow @label="admin.api.user">
<EmailGroupUserChooser @value={{model.username}} @onChange={{action "updateUsername"}} @options={{hash
<EmailGroupUserChooser @value={{this.model.username}} @onChange={{action "updateUsername"}} @options={{hash
maximum=1
filterPlaceholder="admin.api.user_placeholder"
}} />
@ -33,16 +33,16 @@
{{/if}}
<AdminFormRow @label="admin.api.scope_mode">
<ComboBox @content={{scopeModes}} @value={{scopeMode}} @onChange={{action "changeScopeMode"}} />
<ComboBox @content={{this.scopeModes}} @value={{this.scopeMode}} @onChange={{action "changeScopeMode"}} />
{{#if (eq scopeMode "read_only")}}
{{#if (eq this.scopeMode "read_only")}}
<p>{{i18n "admin.api.scopes.descriptions.global.read"}}</p>
{{else if (eq scopeMode "global")}}
{{else if (eq this.scopeMode "global")}}
<p>{{i18n "admin.api.scopes.global_description"}}</p>
{{/if}}
</AdminFormRow>
{{#if (eq scopeMode "granular")}}
{{#if (eq this.scopeMode "granular")}}
<h2 class="scopes-title">{{i18n "admin.api.scopes.title"}}</h2>
<p>{{i18n "admin.api.scopes.description"}}</p>
<table class="scopes-table grid">
@ -55,7 +55,7 @@
</tr>
</thead>
<tbody>
{{#each-in scopes as |resource actions|}}
{{#each-in this.scopes as |resource actions|}}
<tr class="scope-resource-name">
<td><b>{{resource}}</b></td>
<td></td>
@ -86,6 +86,6 @@
</table>
{{/if}}
<DButton @icon="check" @label="admin.api.save" @action={{action "save"}} @class="btn-primary" @disabled={{saveDisabled}} />
<DButton @icon="check" @label="admin.api.save" @action={{action "save"}} @class="btn-primary" @disabled={{this.saveDisabled}} />
{{/if}}
</div>

View File

@ -5,21 +5,21 @@
<div class="api-key api-key-show">
<AdminFormRow @label="admin.api.key">
{{#if model.revoked_at}}{{d-icon "times-circle"}}{{/if}}
{{model.truncatedKey}}
{{#if this.model.revoked_at}}{{d-icon "times-circle"}}{{/if}}
{{this.model.truncatedKey}}
</AdminFormRow>
<AdminFormRow @label="admin.api.description">
{{#if editingDescription}}
<Input @value={{buffered.description}} @maxlength="255" placeholder={{i18n "admin.api.description_placeholder"}} />
{{#if this.editingDescription}}
<Input @value={{this.buffered.description}} @maxlength="255" placeholder={{i18n "admin.api.description_placeholder"}} />
{{else}}
<span>
{{if model.description model.description (i18n "admin.api.no_description")}}
{{if this.model.description this.model.description (i18n "admin.api.no_description")}}
</span>
{{/if}}
<div class="controls">
{{#if editingDescription}}
{{#if this.editingDescription}}
<DButton @class="ok" @action={{action "saveDescription"}} @icon="check" />
<DButton @class="cancel" @action={{action "editDescription"}} @icon="times" />
{{else}}
@ -29,9 +29,9 @@
</AdminFormRow>
<AdminFormRow @label="admin.api.user">
{{#if model.user}}
<LinkTo @route="adminUser" @model={{model.user}}>
{{avatar model.user imageSize="small"}} {{model.user.username}}
{{#if this.model.user}}
<LinkTo @route="adminUser" @model={{this.model.user}}>
{{avatar this.model.user imageSize="small"}} {{this.model.user.username}}
</LinkTo>
{{else}}
{{i18n "admin.api.all_users"}}
@ -39,38 +39,38 @@
</AdminFormRow>
<AdminFormRow @label="admin.api.created">
{{format-date model.created_at leaveAgo="true"}}
{{format-date this.model.created_at leaveAgo="true"}}
</AdminFormRow>
<AdminFormRow @label="admin.api.updated">
{{format-date model.updated_at leaveAgo="true"}}
{{format-date this.model.updated_at leaveAgo="true"}}
</AdminFormRow>
<AdminFormRow @label="admin.api.last_used">
{{#if model.last_used_at}}
{{format-date model.last_used_at leaveAgo="true"}}
{{#if this.model.last_used_at}}
{{format-date this.model.last_used_at leaveAgo="true"}}
{{else}}
{{i18n "admin.api.never_used"}}
{{/if}}
</AdminFormRow>
<AdminFormRow @label="admin.api.revoked">
{{#if model.revoked_at}}
{{format-date model.revoked_at leaveAgo="true"}}
{{#if this.model.revoked_at}}
{{format-date this.model.revoked_at leaveAgo="true"}}
{{else}}
<span>{{i18n "no_value"}}</span>
{{/if}}
<div class="controls">
{{#if model.revoked_at}}
<DButton @action={{action "undoRevokeKey"}} @actionParam={{model}} @icon="undo" @label="admin.api.undo_revoke" />
<DButton @action={{action "deleteKey"}} @actionParam={{model}} @icon="trash-alt" @label="admin.api.delete" @class="btn-danger" />
{{#if this.model.revoked_at}}
<DButton @action={{action "undoRevokeKey"}} @actionParam={{this.model}} @icon="undo" @label="admin.api.undo_revoke" />
<DButton @action={{action "deleteKey"}} @actionParam={{this.model}} @icon="trash-alt" @label="admin.api.delete" @class="btn-danger" />
{{else}}
<DButton @class="btn-danger" @action={{action "revokeKey"}} @actionParam={{model}} @icon="times" @label="admin.api.revoke" />
<DButton @class="btn-danger" @action={{action "revokeKey"}} @actionParam={{this.model}} @icon="times" @label="admin.api.revoke" />
{{/if}}
</div>
</AdminFormRow>
{{#if model.api_key_scopes.length}}
{{#if this.model.api_key_scopes.length}}
<h2 class="scopes-title">{{i18n "admin.api.scopes.title"}}</h2>
<table class="scopes-table grid">
@ -83,7 +83,7 @@
</tr>
</thead>
<tbody>
{{#each model.api_key_scopes as |scope|}}
{{#each this.model.api_key_scopes as |scope|}}
<tr>
<td>{{scope.resource}}</td>
<td>

View File

@ -1,17 +1,17 @@
<div class="backup-options">
{{#if localBackupStorage}}
<UppyBackupUploader @done={{route-action "uploadSuccess"}} @localBackupStorage={{localBackupStorage}} />
{{#if this.localBackupStorage}}
<UppyBackupUploader @done={{route-action "uploadSuccess"}} @localBackupStorage={{this.localBackupStorage}} />
{{else}}
<UppyBackupUploader @done={{route-action "remoteUploadSuccess"}} />
{{/if}}
{{#if site.isReadOnly}}
<DButton @class="btn-default" @icon="far-eye" @action={{action "toggleReadOnlyMode"}} @disabled={{status.isOperationRunning}} @title="admin.backups.read_only.disable.title" @label="admin.backups.read_only.disable.label" />
{{#if this.site.isReadOnly}}
<DButton @class="btn-default" @icon="far-eye" @action={{action "toggleReadOnlyMode"}} @disabled={{this.status.isOperationRunning}} @title="admin.backups.read_only.disable.title" @label="admin.backups.read_only.disable.label" />
{{else}}
<DButton @class="btn-default" @icon="far-eye" @action={{action "toggleReadOnlyMode"}} @disabled={{status.isOperationRunning}} @title="admin.backups.read_only.enable.title" @label="admin.backups.read_only.enable.label" />
<DButton @class="btn-default" @icon="far-eye" @action={{action "toggleReadOnlyMode"}} @disabled={{this.status.isOperationRunning}} @title="admin.backups.read_only.enable.title" @label="admin.backups.read_only.enable.label" />
{{/if}}
<div class="backup-message">
{{#if status.restoreDisabled}}
{{#if this.status.restoreDisabled}}
<a href="site_settings/category/all_results?filter=allow_restore">{{d-icon "info-circle"}} {{i18n "admin.backups.operations.restore.is_disabled"}}</a>
{{/if}}
</div>
@ -23,19 +23,19 @@
<th></th>
</thead>
<tbody>
{{#each model as |backup|}}
{{#each this.model as |backup|}}
<tr>
<td class="backup-filename">{{backup.filename}}</td>
<td class="backup-size">{{human-size backup.size}}</td>
<td class="backup-controls">
<div>
<DButton @class="btn-default download" @action={{action "download"}} @actionParam={{backup}} @icon="download" @title="admin.backups.operations.download.title" @label="admin.backups.operations.download.label" />
{{#if status.isOperationRunning}}
{{#if this.status.isOperationRunning}}
<DButton @icon="far-trash-alt" @action={{route-action "destroyBackup"}} @actionParam={{backup}} @class="btn-danger" @disabled="true" @title="admin.backups.operations.is_running" />
<DButton @icon="play" @action={{route-action "startRestore"}} @actionParam={{backup}} @disabled={{status.restoreDisabled}} @class="btn-default" @title={{restoreTitle}} @label="admin.backups.operations.restore.label" />
<DButton @icon="play" @action={{route-action "startRestore"}} @actionParam={{backup}} @disabled={{this.status.restoreDisabled}} @class="btn-default" @title={{this.restoreTitle}} @label="admin.backups.operations.restore.label" />
{{else}}
<DButton @icon="far-trash-alt" @action={{route-action "destroyBackup"}} @actionParam={{backup}} @class="btn-danger" @title="admin.backups.operations.destroy.title" />
<DButton @icon="play" @action={{route-action "startRestore"}} @actionParam={{backup}} @disabled={{status.restoreDisabled}} @class="btn-default btn-restore" @title={{restoreTitle}} @label="admin.backups.operations.restore.label" />
<DButton @icon="play" @action={{route-action "startRestore"}} @actionParam={{backup}} @disabled={{this.status.restoreDisabled}} @class="btn-default btn-restore" @title={{this.restoreTitle}} @label="admin.backups.operations.restore.label" />
{{/if}}
</div>
</td>

View File

@ -1 +1 @@
<AdminBackupsLogs @logs={{logs}} @status={{status}} />
<AdminBackupsLogs @logs={{this.logs}} @status={{this.status}} />

View File

@ -6,10 +6,10 @@
<NavItem @route="admin.backups.logs" @label="admin.backups.menu.logs" />
<PluginOutlet @name="downloader" @connectorTagName="div" />
<div class="admin-actions">
{{#if model.canRollback}}
<DButton @action={{route-action "rollback"}} @class="btn-default btn-rollback" @label="admin.backups.operations.rollback.label" @title="admin.backups.operations.rollback.title" @icon="ambulance" @disabled={{rollbackDisabled}} />
{{#if this.model.canRollback}}
<DButton @action={{route-action "rollback"}} @class="btn-default btn-rollback" @label="admin.backups.operations.rollback.label" @title="admin.backups.operations.rollback.title" @icon="ambulance" @disabled={{this.rollbackDisabled}} />
{{/if}}
{{#if model.isOperationRunning}}
{{#if this.model.isOperationRunning}}
<DButton @action={{route-action "cancelOperation"}} @class="btn-danger" @title="admin.backups.operations.cancel.title" @label="admin.backups.operations.cancel.label" @icon="times" />
{{else}}
<DButton @action={{route-action "showStartBackupModal"}} @class="btn-primary" @title="admin.backups.operations.backup.title" @label="admin.backups.operations.backup.label" @icon="rocket" />

View File

@ -2,12 +2,12 @@
<h1>{{i18n "admin.badges.mass_award.title"}}</h1>
<p>{{i18n "admin.badges.mass_award.description"}}</p>
{{#if model}}
{{#if this.model}}
<form class="form-horizontal">
<div class="badge-preview control-group">
{{#if model}}
{{icon-or-image model}}
<span class="badge-display-name">{{model.name}}</span>
{{#if this.model}}
{{icon-or-image this.model}}
<span class="badge-display-name">{{this.model.name}}</span>
{{else}}
<span class="badge-placeholder">{{i18n "admin.badges.mass_award.no_badge_selected"}}</span>
{{/if}}
@ -18,47 +18,47 @@
</div>
<div class="control-group">
<label>
<Input @type="checkbox" @checked={{replaceBadgeOwners}} />
<Input @type="checkbox" @checked={{this.replaceBadgeOwners}} />
{{i18n "admin.badges.mass_award.replace_owners"}}
</label>
{{#if model.multiple_grant}}
{{#if this.model.multiple_grant}}
<label class="grant-existing-holders">
<Input @type="checkbox" @checked={{grantExistingHolders}} class="grant-existing-holders-checkbox" />
<Input @type="checkbox" @checked={{this.grantExistingHolders}} class="grant-existing-holders-checkbox" />
{{i18n "admin.badges.mass_award.grant_existing_holders"}}
</label>
{{/if}}
</div>
<DButton @class="btn-primary" @action={{action "massAward"}} @type="submit" @disabled={{massAwardButtonDisabled}} @icon="certificate" @label="admin.badges.mass_award.perform" />
<DButton @class="btn-primary" @action={{action "massAward"}} @type="submit" @disabled={{this.massAwardButtonDisabled}} @icon="certificate" @label="admin.badges.mass_award.perform" />
<LinkTo @route="adminBadges.index" class="btn btn-normal">
{{d-icon "times"}}
<span>{{i18n "cancel"}}</span>
</LinkTo>
</form>
{{#if saving}}
{{#if this.saving}}
{{i18n "uploading"}}
{{/if}}
{{#if resultsMessage}}
{{#if this.resultsMessage}}
<p>
{{#if success}}
{{#if this.success}}
{{d-icon "check" class="bulk-award-status-icon success"}}
{{else}}
{{d-icon "times" class="bulk-award-status-icon failure"}}
{{/if}}
{{resultsMessage}}
{{this.resultsMessage}}
</p>
{{#if unmatchedEntries.length}}
{{#if this.unmatchedEntries.length}}
<p>
{{d-icon "exclamation-triangle" class="bulk-award-status-icon failure"}}
<span>
{{#if unmatchedEntriesTruncated}}
{{i18n "admin.badges.mass_award.csv_has_unmatched_users_truncated_list" count=unmatchedEntriesCount}}
{{#if this.unmatchedEntriesTruncated}}
{{i18n "admin.badges.mass_award.csv_has_unmatched_users_truncated_list" count=this.unmatchedEntriesCount}}
{{else}}
{{i18n "admin.badges.mass_award.csv_has_unmatched_users"}}
{{/if}}
</span>
</p>
<ul>
{{#each unmatchedEntries as |entry|}}
{{#each this.unmatchedEntries as |entry|}}
<li>{{entry}}</li>
{{/each}}
</ul>

View File

@ -1,10 +1,10 @@
<DSection @class="current-badges">
<div class="badge-intro admin-intro">
<img src={{badgeIntroEmoji}} class="badge-intro-emoji" alt={{i18n "admin.badges.badge_intro.emoji"}}>
<img src={{this.badgeIntroEmoji}} class="badge-intro-emoji" alt={{i18n "admin.badges.badge_intro.emoji"}}>
<div class="content-wrapper">
<h1>{{i18n "admin.badges.badge_intro.title"}}</h1>
<div class="external-resources">
{{#each badgeIntroLinks as |link|}}
{{#each this.badgeIntroLinks as |link|}}
<a href={{link.href}} class="external-link" target="_blank" rel="noopener noreferrer">
{{d-icon link.icon}}
<span>{{i18n link.text}}</span>

View File

@ -2,15 +2,15 @@
<form class="form-horizontal">
<div class="control-group">
<label for="name">{{i18n "admin.badges.name"}}</label>
{{#if readOnly}}
<Input @type="text" @name="name" @value={{buffered.name}} @disabled={{true}} />
{{#if this.readOnly}}
<Input @type="text" @name="name" @value={{this.buffered.name}} @disabled={{true}} />
<p class="help">
<LinkTo @route="adminSiteText" @query={{hash q=(concat textCustomizationPrefix "name")}}>
<LinkTo @route="adminSiteText" @query={{hash q=(concat this.textCustomizationPrefix "name")}}>
{{i18n "admin.badges.read_only_setting_help"}}
</LinkTo>
</p>
{{else}}
<Input @type="text" @name="name" @value={{buffered.name}} />
<Input @type="text" @name="name" @value={{this.buffered.name}} />
{{/if}}
</div>
@ -18,29 +18,29 @@
<label for="graphic">{{i18n "admin.badges.graphic"}}</label>
<div class="radios inline-form full-width">
<label class="radio-label" for="badge-icon">
<RadioButton @name="badge-icon" @id="badge-icon" @value="icon" @selection={{selectedGraphicType}} @onChange={{action "changeGraphicType"}} />
<RadioButton @name="badge-icon" @id="badge-icon" @value="icon" @selection={{this.selectedGraphicType}} @onChange={{action "changeGraphicType"}} />
<span>{{i18n "admin.badges.select_an_icon"}}</span>
</label>
<label class="radio-label" for="badge-image">
<RadioButton @name="badge-image" @id="badge-image" @value="image" @selection={{selectedGraphicType}} @onChange={{action "changeGraphicType"}} />
<RadioButton @name="badge-image" @id="badge-image" @value="image" @selection={{this.selectedGraphicType}} @onChange={{action "changeGraphicType"}} />
<span>{{i18n "admin.badges.upload_an_image"}}</span>
</label>
</div>
{{#if imageUploaderSelected}}
<UppyImageUploader @id="badge-image-uploader" @imageUrl={{buffered.image_url}} @type="badge_image" @onUploadDone={{action "setImage"}} @onUploadDeleted={{action "removeImage"}} @class="no-repeat contain-image" />
{{#if this.imageUploaderSelected}}
<UppyImageUploader @id="badge-image-uploader" @imageUrl={{this.buffered.image_url}} @type="badge_image" @onUploadDone={{action "setImage"}} @onUploadDeleted={{action "removeImage"}} @class="no-repeat contain-image" />
<div class="control-instructions">
<p class="help">{{i18n "admin.badges.image_help"}}</p>
</div>
{{else if iconSelectorSelected}}
<IconPicker @name="icon" @value={{buffered.icon}} @options={{hash maximum=1}} @onChange={{action (mut buffered.icon)}} />
{{else if this.iconSelectorSelected}}
<IconPicker @name="icon" @value={{this.buffered.icon}} @options={{hash maximum=1}} @onChange={{action (mut this.buffered.icon)}} />
{{/if}}
</div>
<div class="control-group">
<label for="badge_type_id">{{i18n "admin.badges.badge_type"}}</label>
<ComboBox @name="badge_type_id" @value={{buffered.badge_type_id}} @content={{badgeTypes}} @onChange={{action (mut buffered.badge_type_id)}} @options={{hash
disabled=readOnly
<ComboBox @name="badge_type_id" @value={{this.buffered.badge_type_id}} @content={{this.badgeTypes}} @onChange={{action (mut this.buffered.badge_type_id)}} @options={{hash
disabled=this.readOnly
}} />
</div>
@ -48,71 +48,71 @@
<label for="badge_grouping_id">{{i18n "admin.badges.badge_grouping"}}</label>
<div class="badge-grouping-control">
<ComboBox @name="badge_grouping_id" @value={{buffered.badge_grouping_id}} @content={{badgeGroupings}} @class="badge-selector" @nameProperty="name" @onChange={{action (mut buffered.badge_grouping_id)}} />
<ComboBox @name="badge_grouping_id" @value={{this.buffered.badge_grouping_id}} @content={{this.badgeGroupings}} @class="badge-selector" @nameProperty="name" @onChange={{action (mut this.buffered.badge_grouping_id)}} />
<DButton @class="btn-default" @action={{route-action "editGroupings"}} @icon="pencil-alt" />
</div>
</div>
<div class="control-group">
<label for="description">{{i18n "admin.badges.description"}}</label>
{{#if buffered.system}}
<Textarea @name="description" @value={{buffered.description}} @disabled={{true}} />
{{#if this.buffered.system}}
<Textarea @name="description" @value={{this.buffered.description}} @disabled={{true}} />
<p class="help">
<LinkTo @route="adminSiteText" @query={{hash q=(concat textCustomizationPrefix "description")}}>
<LinkTo @route="adminSiteText" @query={{hash q=(concat this.textCustomizationPrefix "description")}}>
{{i18n "admin.badges.read_only_setting_help"}}
</LinkTo>
</p>
{{else}}
<Textarea @name="description" @value={{buffered.description}} />
<Textarea @name="description" @value={{this.buffered.description}} />
{{/if}}
</div>
<div class="control-group">
<label for="long_description">{{i18n "admin.badges.long_description"}}</label>
{{#if buffered.system}}
<Textarea @name="long_description" @value={{buffered.long_description}} @disabled={{true}} />
{{#if this.buffered.system}}
<Textarea @name="long_description" @value={{this.buffered.long_description}} @disabled={{true}} />
<p class="help">
<LinkTo @route="adminSiteText" @query={{hash q=(concat textCustomizationPrefix "long_description")}}>
<LinkTo @route="adminSiteText" @query={{hash q=(concat this.textCustomizationPrefix "long_description")}}>
{{i18n "admin.badges.read_only_setting_help"}}
</LinkTo>
</p>
{{else}}
<Textarea @name="long_description" @value={{buffered.long_description}} />
<Textarea @name="long_description" @value={{this.buffered.long_description}} />
{{/if}}
</div>
{{#if siteSettings.enable_badge_sql}}
{{#if this.siteSettings.enable_badge_sql}}
<div class="control-group">
<label for="query">{{i18n "admin.badges.query"}}</label>
<AceEditor @content={{buffered.query}} @mode="sql" @disabled={{readOnly}} />
<AceEditor @content={{this.buffered.query}} @mode="sql" @disabled={{this.readOnly}} />
</div>
{{#if hasQuery}}
<a href {{action "preview" buffered "false"}}>{{i18n "admin.badges.preview.link_text"}}</a>
{{#if this.hasQuery}}
<a href {{action "preview" this.buffered "false"}}>{{i18n "admin.badges.preview.link_text"}}</a>
|
<a href {{action "preview" buffered "true"}}>{{i18n "admin.badges.preview.plan_text"}}</a>
{{#if preview_loading}}
<a href {{action "preview" this.buffered "true"}}>{{i18n "admin.badges.preview.plan_text"}}</a>
{{#if this.preview_loading}}
{{i18n "loading"}}
{{/if}}
<div class="control-group">
<label>
<Input @type="checkbox" @checked={{buffered.auto_revoke}} @disabled={{readOnly}} />
<Input @type="checkbox" @checked={{this.buffered.auto_revoke}} @disabled={{this.readOnly}} />
{{i18n "admin.badges.auto_revoke"}}
</label>
</div>
<div class="control-group">
<label>
<Input @type="checkbox" @checked={{buffered.target_posts}} @disabled={{readOnly}} />
<Input @type="checkbox" @checked={{this.buffered.target_posts}} @disabled={{this.readOnly}} />
{{i18n "admin.badges.target_posts"}}
</label>
</div>
<div class="control-group">
<label for="trigger">{{i18n "admin.badges.trigger"}}</label>
<ComboBox @name="trigger" @value={{buffered.trigger}} @content={{badgeTriggers}} @onChange={{action (mut buffered.trigger)}} @options={{hash
disabled=readOnly
<ComboBox @name="trigger" @value={{this.buffered.trigger}} @content={{this.badgeTriggers}} @onChange={{action (mut this.buffered.trigger)}} @options={{hash
disabled=this.readOnly
}} />
</div>
{{/if}}
@ -121,54 +121,54 @@
<div class="control-group">
<div>
<label>
<Input @type="checkbox" @checked={{buffered.allow_title}} />
<Input @type="checkbox" @checked={{this.buffered.allow_title}} />
{{i18n "admin.badges.allow_title"}}
</label>
</div>
<div>
<label>
<Input @type="checkbox" @checked={{buffered.multiple_grant}} @disabled={{readOnly}} />
<Input @type="checkbox" @checked={{this.buffered.multiple_grant}} @disabled={{this.readOnly}} />
{{i18n "admin.badges.multiple_grant"}}
</label>
</div>
<div>
<label>
<Input @type="checkbox" @checked={{buffered.listable}} @disabled={{readOnly}} />
<Input @type="checkbox" @checked={{this.buffered.listable}} @disabled={{this.readOnly}} />
{{i18n "admin.badges.listable"}}
</label>
</div>
<div>
<label>
<Input @type="checkbox" @checked={{buffered.show_posts}} @disabled={{readOnly}} />
<Input @type="checkbox" @checked={{this.buffered.show_posts}} @disabled={{this.readOnly}} />
{{i18n "admin.badges.show_posts"}}
</label>
</div>
<div>
<label>
<Input @type="checkbox" @checked={{buffered.enabled}} />
<Input @type="checkbox" @checked={{this.buffered.enabled}} />
{{i18n "admin.badges.enabled"}}
</label>
</div>
</div>
<div class="buttons">
<DButton @class="btn-primary" @action={{action "save"}} @type="submit" @disabled={{saving}} @label="admin.badges.save" />
<span class="saving">{{savingStatus}}</span>
{{#unless readOnly}}
<DButton @class="btn-primary" @action={{action "save"}} @type="submit" @disabled={{this.saving}} @label="admin.badges.save" />
<span class="saving">{{this.savingStatus}}</span>
{{#unless this.readOnly}}
<DButton @action={{action "destroy"}} @class="btn-danger" @label="admin.badges.delete" />
{{/unless}}
</div>
</form>
</DSection>
{{#if grant_count}}
{{#if this.grant_count}}
<div class="content-body current-badge-actions">
<div>
<LinkTo @route="badges.show" @model={{this}}>{{i18n "badges.granted" count=grant_count}}</LinkTo>
<LinkTo @route="badges.show" @model={{this}}>{{i18n "badges.granted" count=this.grant_count}}</LinkTo>
</div>
</div>
{{/if}}

View File

@ -15,9 +15,9 @@
</div>
<div class="content-list">
<ul class="admin-badge-list">
{{#each model as |badge|}}
{{#each this.model as |badge|}}
<li class="admin-badge-list-item">
<LinkTo @route={{selectedRoute}} @model={{badge.id}}>
<LinkTo @route={{this.selectedRoute}} @model={{badge.id}}>
<BadgeButton @badge={{badge}} />
{{#if badge.newBadge}}
<span class="list-badge">{{i18n "filters.new.lower_title"}}</span>

View File

@ -1 +1 @@
<div class="ace">{{content}}</div>
<div class="ace">{{this.content}}</div>

View File

@ -1,8 +1,8 @@
{{#if hasFormattedLogs}}
<pre>{{formattedLogs}}</pre>
{{#if this.hasFormattedLogs}}
<pre>{{this.formattedLogs}}</pre>
{{else}}
<p>{{noLogsMessage}}</p>
<p>{{this.noLogsMessage}}</p>
{{/if}}
{{#if showLoadingSpinner}}
{{#if this.showLoadingSpinner}}
<div class="spinner small"></div>
{{/if}}

View File

@ -1,15 +1,15 @@
<div class="field">{{i18n name}}</div>
<div class="field">{{i18n this.name}}</div>
<div class="value">
{{#if editing}}
<TextField @value={{buffer}} @autofocus="autofocus" @autocomplete="off" />
{{#if this.editing}}
<TextField @value={{this.buffer}} @autofocus="autofocus" @autocomplete="off" />
{{else}}
<a href {{action "edit"}} class="inline-editable-field">
<span>{{value}}</span>
<span>{{this.value}}</span>
</a>
{{/if}}
</div>
<div class="controls">
{{#if editing}}
{{#if this.editing}}
<DButton @class="btn-default" @action={{action "save"}} @label="admin.user_fields.save" />
<a href {{action "edit"}}>{{i18n "cancel"}}</a>
{{else}}

View File

@ -1,12 +1,12 @@
<div class="form-element label-area">
{{#if label}}
<label>{{i18n label}}</label>
{{#if this.label}}
<label>{{i18n this.label}}</label>
{{else}}
&nbsp;
{{/if}}
</div>
<div class="form-element input-area">
{{#if wrapLabel}}
{{#if this.wrapLabel}}
<label>{{yield}}</label>
{{else}}
{{yield}}

View File

@ -1,8 +1,8 @@
<div class="suspended-count {{suspendedCountClass}}" title={{i18n "admin.user.last_six_months"}}>
<div class="suspended-count {{this.suspendedCountClass}}" title={{i18n "admin.user.last_six_months"}}>
<label>{{i18n "admin.user.suspended_count"}}</label>
<span>{{user.penalty_counts.suspended}}</span>
<span>{{this.user.penalty_counts.suspended}}</span>
</div>
<div class="silenced-count {{silencedCountClass}}" title={{i18n "admin.user.last_six_months"}}>
<div class="silenced-count {{this.silencedCountClass}}" title={{i18n "admin.user.last_six_months"}}>
<label>{{i18n "admin.user.silenced_count"}}</label>
<span>{{user.penalty_counts.silenced}}</span>
<span>{{this.user.penalty_counts.silenced}}</span>
</div>

View File

@ -1,24 +1,24 @@
<div class="cell title">
{{#if model.icon}}
{{d-icon model.icon}}
{{#if this.model.icon}}
{{d-icon this.model.icon}}
{{/if}}
<a href={{model.reportUrl}}>{{model.title}}</a>
<a href={{this.model.reportUrl}}>{{this.model.title}}</a>
</div>
<div class="cell value today-count">{{number model.todayCount}}</div>
<div class="cell value today-count">{{number this.model.todayCount}}</div>
<div class="cell value yesterday-count {{model.yesterdayTrend}}" title={{model.yesterdayCountTitle}}>
{{number model.yesterdayCount}} {{d-icon model.yesterdayTrendIcon}}
<div class="cell value yesterday-count {{this.model.yesterdayTrend}}" title={{this.model.yesterdayCountTitle}}>
{{number this.model.yesterdayCount}} {{d-icon this.model.yesterdayTrendIcon}}
</div>
<div class="cell value sevendays-count {{model.sevenDaysTrend}}" title={{model.sevenDaysCountTitle}}>
{{number model.lastSevenDaysCount}} {{d-icon model.sevenDaysTrendIcon}}
<div class="cell value sevendays-count {{this.model.sevenDaysTrend}}" title={{this.model.sevenDaysCountTitle}}>
{{number this.model.lastSevenDaysCount}} {{d-icon this.model.sevenDaysTrendIcon}}
</div>
<div class="cell value thirty-days-count {{model.thirtyDaysTrend}}" title={{model.thirtyDaysCountTitle}}>
{{number model.lastThirtyDaysCount}}
<div class="cell value thirty-days-count {{this.model.thirtyDaysTrend}}" title={{this.model.thirtyDaysCountTitle}}>
{{number this.model.lastThirtyDaysCount}}
{{#if model.canDisplayTrendIcon}}
{{d-icon model.thirtyDaysTrendIcon}}
{{#if this.model.canDisplayTrendIcon}}
{{d-icon this.model.thirtyDaysTrendIcon}}
{{/if}}
</div>

View File

@ -1,24 +1,24 @@
<td class="title">
{{#if report.icon}}
{{d-icon report.icon}}
{{#if this.report.icon}}
{{d-icon this.report.icon}}
{{/if}}
<a href={{report.reportUrl}}>{{report.title}}</a>
<a href={{this.report.reportUrl}}>{{this.report.title}}</a>
</td>
<td class="value">{{number report.todayCount}}</td>
<td class="value">{{number this.report.todayCount}}</td>
<td class="value {{report.yesterdayTrend}}" title={{report.yesterdayCountTitle}}>
{{number report.yesterdayCount}} {{d-icon report.yesterdayTrendIcon}}
<td class="value {{this.report.yesterdayTrend}}" title={{this.report.yesterdayCountTitle}}>
{{number this.report.yesterdayCount}} {{d-icon this.report.yesterdayTrendIcon}}
</td>
<td class="value {{report.sevenDaysTrend}}" title={{report.sevenDaysCountTitle}}>
{{number report.lastSevenDaysCount}} {{d-icon report.sevenDaysTrendIcon}}
<td class="value {{this.report.sevenDaysTrend}}" title={{this.report.sevenDaysCountTitle}}>
{{number this.report.lastSevenDaysCount}} {{d-icon this.report.sevenDaysTrendIcon}}
</td>
<td class="value {{report.thirtyDaysTrend}}" title={{report.thirtyDaysCountTitle}}>
{{number report.lastThirtyDaysCount}} {{d-icon report.thirtyDaysTrendIcon}}
<td class="value {{this.report.thirtyDaysTrend}}" title={{this.report.thirtyDaysCountTitle}}>
{{number this.report.lastThirtyDaysCount}} {{d-icon this.report.thirtyDaysTrendIcon}}
</td>
{{#if allTime}}
<td class="value">{{number report.total}}</td>
{{#if this.allTime}}
<td class="value">{{number this.report.total}}</td>
{{/if}}

View File

@ -1,5 +1,5 @@
<div class="table-container">
{{#each model.data as |data|}}
{{#each this.model.data as |data|}}
<a class="table-cell user-{{data.key}}" href={{data.url}}>
<span class="label">
{{#if data.icon}}

View File

@ -1,6 +1,6 @@
<td class="title"><a href={{report.reportUrl}}>{{report.title}}</a></td>
<td class="value">{{report.todayCount}}</td>
<td class="value">{{report.yesterdayCount}}</td>
<td class="value">{{report.sevenDaysAgoCount}}</td>
<td class="value">{{report.thirtyDaysAgoCount}}</td>
<td class="title"><a href={{this.report.reportUrl}}>{{this.report.title}}</a></td>
<td class="value">{{this.report.todayCount}}</td>
<td class="value">{{this.report.yesterdayCount}}</td>
<td class="value">{{this.report.sevenDaysAgoCount}}</td>
<td class="value">{{this.report.thirtyDaysAgoCount}}</td>
<td class="value"></td>

View File

@ -1,21 +1,21 @@
{{#if showBackupStats}}
{{#if this.showBackupStats}}
<div class="backups">
<h3 class="storage-stats-title">
<a href={{get-url "/admin/backups"}}>{{d-icon "archive"}} {{i18n "admin.dashboard.backups"}}</a>
</h3>
<p>
{{#if backupStats.free_bytes}}
{{i18n "admin.dashboard.space_used_and_free" usedSize=usedBackupSpace freeSize=freeBackupSpace}}
{{#if this.backupStats.free_bytes}}
{{i18n "admin.dashboard.space_used_and_free" usedSize=this.usedBackupSpace freeSize=this.freeBackupSpace}}
{{else}}
{{i18n "admin.dashboard.space_used" usedSize=usedBackupSpace}}
{{i18n "admin.dashboard.space_used" usedSize=this.usedBackupSpace}}
{{/if}}
<br>
{{i18n "admin.dashboard.backup_count" count=backupStats.count location=backupLocationName}}
{{i18n "admin.dashboard.backup_count" count=this.backupStats.count location=this.backupLocationName}}
{{#if backupStats.last_backup_taken_at}}
{{#if this.backupStats.last_backup_taken_at}}
<br>
{{html-safe (i18n "admin.dashboard.lastest_backup" date=(format-date backupStats.last_backup_taken_at leaveAgo="true"))}}
{{html-safe (i18n "admin.dashboard.lastest_backup" date=(format-date this.backupStats.last_backup_taken_at leaveAgo="true"))}}
{{/if}}
</p>
</div>
@ -24,10 +24,10 @@
<div class="uploads">
<h3 class="storage-stats-title">{{d-icon "upload"}} {{i18n "admin.dashboard.uploads"}}</h3>
<p>
{{#if uploadStats.free_bytes}}
{{i18n "admin.dashboard.space_used_and_free" usedSize=usedUploadSpace freeSize=freeUploadSpace}}
{{#if this.uploadStats.free_bytes}}
{{i18n "admin.dashboard.space_used_and_free" usedSize=this.usedUploadSpace freeSize=this.freeUploadSpace}}
{{else}}
{{i18n "admin.dashboard.space_used" usedSize=usedUploadSpace}}
{{i18n "admin.dashboard.space_used" usedSize=this.usedUploadSpace}}
{{/if}}
</p>
</div>

View File

@ -1 +1 @@
{{html-safe formattedValue}}
{{html-safe this.formattedValue}}

View File

@ -1,9 +1,9 @@
{{#if showSortingUI}}
<DButton @action={{sortByLabel}} @icon={{sortIcon}} @class="sort-btn" />
{{#if this.showSortingUI}}
<DButton @action={{this.sortByLabel}} @icon={{this.sortIcon}} @class="sort-btn" />
{{/if}}
{{#if label.htmlTitle}}
<span class="title">{{html-safe label.htmlTitle}}</span>
{{#if this.label.htmlTitle}}
<span class="title">{{html-safe this.label.htmlTitle}}</span>
{{else}}
<span class="title">{{label.title}}</span>
<span class="title">{{this.label.title}}</span>
{{/if}}

View File

@ -1,3 +1,3 @@
{{#each labels as |label|}}
<AdminReportTableCell @label={{label}} @data={{data}} @options={{options}} />
{{#each this.labels as |label|}}
<AdminReportTableCell @label={{label}} @data={{this.data}} @options={{this.options}} />
{{/each}}

View File

@ -1,30 +1,30 @@
<table class="table">
<thead>
<tr>
{{#if model.computedLabels}}
{{#each model.computedLabels as |label|}}
<AdminReportTableHeader @showSortingUI={{showSortingUI}} @currentSortDirection={{sortDirection}} @currentSortLabel={{sortLabel}} @label={{label}} @sortByLabel={{action "sortByLabel" label}} />
{{#if this.model.computedLabels}}
{{#each this.model.computedLabels as |label|}}
<AdminReportTableHeader @showSortingUI={{this.showSortingUI}} @currentSortDirection={{this.sortDirection}} @currentSortLabel={{this.sortLabel}} @label={{label}} @sortByLabel={{action "sortByLabel" label}} />
{{/each}}
{{else}}
{{#each model.data as |data|}}
{{#each this.model.data as |data|}}
<th>{{data.x}}</th>
{{/each}}
{{/if}}
</tr>
</thead>
<tbody>
{{#each paginatedData as |data|}}
<AdminReportTableRow @data={{data}} @labels={{model.computedLabels}} @options={{options}} />
{{#each this.paginatedData as |data|}}
<AdminReportTableRow @data={{data}} @labels={{this.model.computedLabels}} @options={{this.options}} />
{{/each}}
{{#if showTotalForSample}}
{{#if this.showTotalForSample}}
<tr class="total-row">
<td colspan={{totalsForSample.length}}>
<td colspan={{this.totalsForSample.length}}>
{{i18n "admin.dashboard.reports.totals_for_sample"}}
</td>
</tr>
<tr class="admin-report-table-row">
{{#each totalsForSample as |total|}}
{{#each this.totalsForSample as |total|}}
<td class="admin-report-table-cell {{total.type}} {{total.property}}">
{{total.formattedValue}}
</td>
@ -32,7 +32,7 @@
</tr>
{{/if}}
{{#if showTotal}}
{{#if this.showTotal}}
<tr class="total-row">
<td colspan="2">
{{i18n "admin.dashboard.reports.total"}}
@ -40,11 +40,11 @@
</tr>
<tr class="admin-report-table-row">
<td class="admin-report-table-cell date x">—</td>
<td class="admin-report-table-cell number y">{{number model.total}}</td>
<td class="admin-report-table-cell number y">{{number this.model.total}}</td>
</tr>
{{/if}}
{{#if showAverage}}
{{#if this.showAverage}}
<tr class="total-row">
<td colspan="2">
{{i18n "admin.dashboard.reports.average_for_sample"}}
@ -52,14 +52,14 @@
</tr>
<tr class="admin-report-table-row">
<td class="admin-report-table-cell date x">—</td>
<td class="admin-report-table-cell number y">{{number averageForSample}}</td>
<td class="admin-report-table-cell number y">{{number this.averageForSample}}</td>
</tr>
{{/if}}
</tbody>
</table>
<div class="pagination">
{{#each pages as |pageState|}}
{{#each this.pages as |pageState|}}
<DButton @translatedLabel={{pageState.page}} @action={{action "changePage"}} @actionParam={{pageState.index}} @class={{pageState.class}} />
{{/each}}
</div>

View File

@ -1,6 +1,6 @@
<td class="title">{{report.title}}</td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="newuser">{{number (value-at-tl report.data level="0")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="basic">{{number (value-at-tl report.data level="1")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="member">{{number (value-at-tl report.data level="2")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="regular">{{number (value-at-tl report.data level="3")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="leader">{{number (value-at-tl report.data level="4")}}</LinkTo></td>
<td class="title">{{this.report.title}}</td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="newuser">{{number (value-at-tl this.report.data level="0")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="basic">{{number (value-at-tl this.report.data level="1")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="member">{{number (value-at-tl this.report.data level="2")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="regular">{{number (value-at-tl this.report.data level="3")}}</LinkTo></td>
<td class="value"><LinkTo @route="adminUsersList.show" @model="leader">{{number (value-at-tl this.report.data level="4")}}</LinkTo></td>

View File

@ -1,35 +1,35 @@
{{#unless isHidden}}
{{#if isEnabled}}
<ConditionalLoadingSection @isLoading={{isLoading}}>
{{#if showHeader}}
{{#unless this.isHidden}}
{{#if this.isEnabled}}
<ConditionalLoadingSection @isLoading={{this.isLoading}}>
{{#if this.showHeader}}
<div class="header">
{{#if showTitle}}
{{#if this.showTitle}}
<ul class="breadcrumb">
{{#if showAllReportsLink}}
{{#if this.showAllReportsLink}}
<li class="item all-reports">
<LinkTo @route="admin.dashboardReports" class="report-url">
{{i18n "admin.dashboard.all_reports"}}
</LinkTo>
</li>
{{#unless showNotFoundError}}
{{#unless this.showNotFoundError}}
<li class="item separator">|</li>
{{/unless}}
{{/if}}
{{#unless showNotFoundError}}
{{#unless this.showNotFoundError}}
<li class="item report">
<a href={{model.reportUrl}} class="report-url">
{{model.title}}
<a href={{this.model.reportUrl}} class="report-url">
{{this.model.title}}
</a>
{{#if model.description}}
{{#if model.description_link}}
<a target="_blank" rel="noopener noreferrer" href={{model.description_link}} class="info" data-tooltip={{model.description}}>
{{#if this.model.description}}
{{#if this.model.description_link}}
<a target="_blank" rel="noopener noreferrer" href={{this.model.description_link}} class="info" data-tooltip={{this.model.description}}>
{{d-icon "question-circle"}}
</a>
{{else}}
<span class="info" data-tooltip={{model.description}}>
<span class="info" data-tooltip={{this.model.description}}>
{{d-icon "question-circle"}}
</span>
{{/if}}
@ -39,17 +39,17 @@
</ul>
{{/if}}
{{#if shouldDisplayTrend}}
<div class="trend {{model.trend}}">
<span class="value" title={{model.trendTitle}}>
{{#if model.average}}
{{number model.currentAverage}}{{#if model.percent}}%{{/if}}
{{#if this.shouldDisplayTrend}}
<div class="trend {{this.model.trend}}">
<span class="value" title={{this.model.trendTitle}}>
{{#if this.model.average}}
{{number this.model.currentAverage}}{{#if this.model.percent}}%{{/if}}
{{else}}
{{number model.currentTotal noTitle="true"}}{{#if model.percent}}%{{/if}}
{{number this.model.currentTotal noTitle="true"}}{{#if this.model.percent}}%{{/if}}
{{/if}}
{{#if model.trendIcon}}
{{d-icon model.trendIcon class="icon"}}
{{#if this.model.trendIcon}}
{{d-icon this.model.trendIcon class="icon"}}
{{/if}}
</span>
</div>
@ -59,50 +59,50 @@
<div class="body">
<div class="main">
{{#if showError}}
{{#if showTimeoutError}}
{{#if this.showError}}
{{#if this.showTimeoutError}}
<div class="alert alert-error report-alert timeout">
{{d-icon "exclamation-triangle"}}
<span>{{i18n "admin.dashboard.timeout_error"}}</span>
</div>
{{/if}}
{{#if showExceptionError}}
{{#if this.showExceptionError}}
<div class="alert alert-error report-alert exception">
{{d-icon "exclamation-triangle"}}
<span>{{i18n "admin.dashboard.exception_error"}}</span>
</div>
{{/if}}
{{#if showNotFoundError}}
{{#if this.showNotFoundError}}
<div class="alert alert-error report-alert not-found">
{{d-icon "exclamation-triangle"}}
<span>{{i18n "admin.dashboard.not_found_error"}}</span>
</div>
{{/if}}
{{else}}
{{#if hasData}}
{{#if currentMode}}
{{component modeComponent model=model options=options}}
{{#if this.hasData}}
{{#if this.currentMode}}
{{component this.modeComponent model=this.model options=this.options}}
{{#if model.relatedReport}}
<AdminReport @showFilteringUI={{false}} @dataSourceName={{model.relatedReport.type}} />
{{#if this.model.relatedReport}}
<AdminReport @showFilteringUI={{false}} @dataSourceName={{this.model.relatedReport.type}} />
{{/if}}
{{/if}}
{{else}}
{{#if rateLimitationString}}
{{#if this.rateLimitationString}}
<div class="alert alert-error report-alert rate-limited">
{{d-icon "thermometer-three-quarters"}}
<span>{{rateLimitationString}}</span>
<span>{{this.rateLimitationString}}</span>
</div>
{{else}}
<div class="alert alert-info report-alert no-data">
{{d-icon "chart-pie"}}
{{#if model.reportUrl}}
<a href={{model.reportUrl}} class="report-url">
{{#if this.model.reportUrl}}
<a href={{this.model.reportUrl}} class="report-url">
<span>
{{#if model.title}}
{{model.title}}
{{#if this.model.title}}
{{this.model.title}}
{{/if}}
{{i18n "admin.dashboard.reports.no_data"}}
</span>
@ -116,42 +116,42 @@
{{/if}}
</div>
{{#if showFilteringUI}}
{{#if this.showFilteringUI}}
<div class="filters">
{{#if showModes}}
{{#if this.showModes}}
<div class="modes">
{{#each displayedModes as |displayedMode|}}
{{#each this.displayedModes as |displayedMode|}}
<DButton @action={{action "onChangeMode"}} @actionParam={{displayedMode.mode}} @class={{displayedMode.cssClass}} @icon={{displayedMode.icon}} />
{{/each}}
</div>
{{/if}}
{{#if isChartMode}}
{{#if model.average}}
{{#if this.isChartMode}}
{{#if this.model.average}}
<span class="average-chart">
{{i18n "admin.dashboard.reports.average_chart_label"}}
</span>
{{/if}}
<div class="chart-groupings">
{{#each chartGroupings as |chartGrouping|}}
{{#each this.chartGroupings as |chartGrouping|}}
<DButton @label={{chartGrouping.label}} @action={{action "changeGrouping" chartGrouping.id}} @class={{chartGrouping.class}} @disabled={{chartGrouping.disabled}} />
{{/each}}
</div>
{{/if}}
{{#if showDatesOptions}}
{{#if this.showDatesOptions}}
<div class="control">
<span class="label">
{{i18n "admin.dashboard.reports.dates"}}
</span>
<div class="input">
<DateTimeInputRange @from={{startDate}} @to={{endDate}} @onChange={{action "onChangeDateRange"}} @showFromTime={{false}} @showToTime={{false}} />
<DateTimeInputRange @from={{this.startDate}} @to={{this.endDate}} @onChange={{action "onChangeDateRange"}} @showFromTime={{false}} @showToTime={{false}} />
</div>
</div>
{{/if}}
{{#each model.available_filters as |filter|}}
{{#each this.model.available_filters as |filter|}}
<div class="control">
<span class="label">
{{i18n (concat "admin.dashboard.reports.filters." filter.id ".label")}}
@ -160,7 +160,7 @@
<div class="input">
{{component
(concat "report-filters/" filter.type)
model=model
model=this.model
filter=filter
applyFilter=(action "applyFilter")}}
</div>
@ -173,7 +173,7 @@
</div>
</div>
{{#if showRefresh}}
{{#if this.showRefresh}}
<div class="control">
<div class="input">
<DButton @class="refresh-report-btn btn-primary" @action={{action "refreshReport"}} @label="admin.dashboard.reports.refresh_report" @icon="sync" />
@ -186,7 +186,7 @@
</ConditionalLoadingSection>
{{else}}
<div class="alert alert-info">
{{html-safe disabledLabel}}
{{html-safe this.disabledLabel}}
</div>
{{/if}}
{{/unless}}

View File

@ -1,9 +1,9 @@
<div class="edit-main-nav admin-controls">
<nav>
<ul class="nav nav-pills target">
{{#each visibleTargets as |target|}}
{{#each this.visibleTargets as |target|}}
<li>
<LinkTo @route={{editRouteName}} @models={{array theme.id target.name fieldName}} @replace={{true}} @title={{field.title}} class={{if target.edited "edited" "blank"}}>
<LinkTo @route={{this.editRouteName}} @models={{array this.theme.id target.name this.fieldName}} @replace={{true}} @title={{this.field.title}} class={{if target.edited "edited" "blank"}}>
{{#if target.error}}{{d-icon "exclamation-triangle"}}{{/if}}
{{#if target.icon}}{{d-icon target.icon}}{{/if}}
{{i18n (concat "admin.customize.theme." target.name)}}
@ -11,20 +11,20 @@
</li>
{{/each}}
{{#if allowAdvanced}}
{{#if this.allowAdvanced}}
<li>
<a {{action "toggleShowAdvanced"}}
href
title={{i18n (concat "admin.customize.theme." (if showAdvanced "hide_advanced" "show_advanced"))}}
title={{i18n (concat "admin.customize.theme." (if this.showAdvanced "hide_advanced" "show_advanced"))}}
class="no-text">
{{d-icon (if showAdvanced "angle-double-left" "angle-double-right")}}
{{d-icon (if this.showAdvanced "angle-double-left" "angle-double-right")}}
</a>
</li>
{{/if}}
<li class="spacer"></li>
<li>
<label>
<Input @type="checkbox" @checked={{onlyOverridden}} @click={{action "onlyOverriddenChanged" value="target.checked"}} />
<Input @type="checkbox" @checked={{this.onlyOverridden}} @click={{action "onlyOverriddenChanged" value="target.checked"}} />
{{i18n "admin.customize.theme.hide_unused_fields"}}
</label>
</li>
@ -35,9 +35,9 @@
<div class="admin-controls">
<nav>
<ul class="nav nav-pills fields">
{{#each visibleFields as |field|}}
{{#each this.visibleFields as |field|}}
<li>
<LinkTo @route={{editRouteName}} @models={{array theme.id currentTargetName field.name}} @replace={{true}} @title={{field.title}} class={{if field.edited "edited" "blank"}}>
<LinkTo @route={{this.editRouteName}} @models={{array this.theme.id this.currentTargetName field.name}} @replace={{true}} @title={{field.title}} class={{if field.edited "edited" "blank"}}>
{{#if field.error}}{{d-icon "exclamation-triangle"}}{{/if}}
{{#if field.icon}}{{d-icon field.icon}}{{/if}}
{{field.translatedName}}
@ -45,14 +45,14 @@
</li>
{{/each}}
{{#if showAddField}}
{{#if this.showAddField}}
<li>
{{#if addingField}}
<Input @type={{text}} @value={{newFieldName}} @enter={{action "addField"}} @escape-press={{action "cancelAddField"}} />
<DButton @class="ok" @action={{action "addField" newFieldName}} @icon="check" />
{{#if this.addingField}}
<Input @type={{this.text}} @value={{this.newFieldName}} @enter={{action "addField"}} @escape-press={{action "cancelAddField"}} />
<DButton @class="ok" @action={{action "addField" this.newFieldName}} @icon="check" />
<DButton @class="cancel" @action={{action "cancelAddField"}} @icon="times" />
{{else}}
<a href {{action "toggleAddField" currentTargetName}} class="no-text">
<a href {{action "toggleAddField" this.currentTargetName}} class="no-text">
{{d-icon "plus"}}
</a>
{{/if}}
@ -62,19 +62,19 @@
<li class="spacer"></li>
<li>
<a href {{action "toggleMaximize"}} class="no-text">
{{d-icon maximizeIcon}}
{{d-icon this.maximizeIcon}}
</a>
</li>
</ul>
</nav>
</div>
{{#if error}}
<pre class="field-error">{{error}}</pre>
{{#if this.error}}
<pre class="field-error">{{this.error}}</pre>
{{/if}}
{{#if warning}}
<pre class="field-warning">{{html-safe warning}}</pre>
{{#if this.warning}}
<pre class="field-warning">{{html-safe this.warning}}</pre>
{{/if}}
<AceEditor @content={{activeSection}} @editorId={{editorId}} @mode={{activeSectionMode}} @autofocus="true" @placeholder={{placeholder}} @htmlPlaceholder={{true}} @save={{action "save"}} @setWarning={{action "setWarning"}} />
<AceEditor @content={{this.activeSection}} @editorId={{this.editorId}} @mode={{this.activeSectionMode}} @autofocus="true" @placeholder={{this.placeholder}} @htmlPlaceholder={{true}} @save={{action "save"}} @setWarning={{action "setWarning"}} />

View File

@ -1,41 +1,41 @@
<div class="user-field">
{{#if (or isEditing (not userField.id))}}
{{#if (or this.isEditing (not this.userField.id))}}
<AdminFormRow @label="admin.user_fields.type">
<ComboBox @content={{fieldTypes}} @value={{buffered.field_type}} @onChange={{action (mut buffered.field_type)}} />
<ComboBox @content={{this.fieldTypes}} @value={{this.buffered.field_type}} @onChange={{action (mut this.buffered.field_type)}} />
</AdminFormRow>
<AdminFormRow @label="admin.user_fields.name">
<Input @value={{buffered.name}} class="user-field-name" @maxlength="255" />
<Input @value={{this.buffered.name}} class="user-field-name" @maxlength="255" />
</AdminFormRow>
<AdminFormRow @label="admin.user_fields.description">
<Input @value={{buffered.description}} class="user-field-desc" @maxlength="255" />
<Input @value={{this.buffered.description}} class="user-field-desc" @maxlength="255" />
</AdminFormRow>
{{#if bufferedFieldType.hasOptions}}
{{#if this.bufferedFieldType.hasOptions}}
<AdminFormRow @label="admin.user_fields.options">
<ValueList @values={{buffered.options}} @inputType="array" />
<ValueList @values={{this.buffered.options}} @inputType="array" />
</AdminFormRow>
{{/if}}
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{buffered.editable}} /> <span>{{i18n "admin.user_fields.editable.title"}}</span>
<Input @type="checkbox" @checked={{this.buffered.editable}} /> <span>{{i18n "admin.user_fields.editable.title"}}</span>
</AdminFormRow>
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{buffered.required}} /> <span>{{i18n "admin.user_fields.required.title"}}</span>
<Input @type="checkbox" @checked={{this.buffered.required}} /> <span>{{i18n "admin.user_fields.required.title"}}</span>
</AdminFormRow>
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{buffered.show_on_profile}} /> <span>{{i18n "admin.user_fields.show_on_profile.title"}}</span>
<Input @type="checkbox" @checked={{this.buffered.show_on_profile}} /> <span>{{i18n "admin.user_fields.show_on_profile.title"}}</span>
</AdminFormRow>
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{buffered.show_on_user_card}} /> <span>{{i18n "admin.user_fields.show_on_user_card.title"}}</span>
<Input @type="checkbox" @checked={{this.buffered.show_on_user_card}} /> <span>{{i18n "admin.user_fields.show_on_user_card.title"}}</span>
</AdminFormRow>
<AdminFormRow @wrapLabel="true">
<Input @type="checkbox" @checked={{buffered.searchable}} /> <span>{{i18n "admin.user_fields.searchable.title"}}</span>
<Input @type="checkbox" @checked={{this.buffered.searchable}} /> <span>{{i18n "admin.user_fields.searchable.title"}}</span>
</AdminFormRow>
<AdminFormRow>
@ -45,18 +45,18 @@
{{else}}
<div class="row">
<div class="form-display">
<b class="name">{{userField.name}}</b>
<b class="name">{{this.userField.name}}</b>
<br>
<span class="description">{{html-safe userField.description}}</span>
<span class="description">{{html-safe this.userField.description}}</span>
</div>
<div class="form-display field-type">{{fieldName}}</div>
<div class="form-display field-type">{{this.fieldName}}</div>
<div class="form-element controls">
<DButton @action={{action "edit"}} @class="btn-default edit" @icon="pencil-alt" @label="admin.user_fields.edit" />
<DButton @action={{destroyAction}} @actionParam={{userField}} @class="btn-danger cancel" @icon="far-trash-alt" @label="admin.user_fields.delete" />
<DButton @action={{moveUpAction}} @actionParam={{userField}} @class="btn-default" @icon="arrow-up" @disabled={{cantMoveUp}} />
<DButton @action={{moveDownAction}} @actionParam={{userField}} @class="btn-default" @icon="arrow-down" @disabled={{cantMoveDown}} />
<DButton @action={{this.destroyAction}} @actionParam={{this.userField}} @class="btn-danger cancel" @icon="far-trash-alt" @label="admin.user_fields.delete" />
<DButton @action={{this.moveUpAction}} @actionParam={{this.userField}} @class="btn-default" @icon="arrow-up" @disabled={{this.cantMoveUp}} />
<DButton @action={{this.moveDownAction}} @actionParam={{this.userField}} @class="btn-default" @icon="arrow-down" @disabled={{this.cantMoveDown}} />
</div>
</div>
<div class="row">{{flags}}</div>
<div class="row">{{this.flags}}</div>
{{/if}}
</div>

View File

@ -1,9 +1,9 @@
<span role="button" onclick={{action "deleteWord"}} class="delete-word-record">{{d-icon "times"}}</span> {{word.word}}
{{#if (or isReplace isLink)}}
&rarr; <span class="replacement">{{word.replacement}}</span>
{{else if isTag}}
<span role="button" onclick={{action "deleteWord"}} class="delete-word-record">{{d-icon "times"}}</span> {{this.word.word}}
{{#if (or this.isReplace this.isLink)}}
&rarr; <span class="replacement">{{this.word.replacement}}</span>
{{else if this.isTag}}
&rarr;
{{#each tags as |tag|}}
{{#each this.tags as |tag|}}
<span class="tag">{{tag}}</span>
{{/each}}
{{/if}}

View File

@ -1,3 +1,3 @@
<Input @id={{typeName}} @type="checkbox" @name="event-choice" @checked={{enabled}} />
<label for={{typeName}}>{{name}}</label>
<p>{{details}}</p>
<Input @id={{this.typeName}} @type="checkbox" @name="event-choice" @checked={{this.enabled}} />
<label for={{this.typeName}}>{{this.name}}</label>
<p>{{this.details}}</p>

View File

@ -1,19 +1,19 @@
<div class="col first status">
<span class={{statusColorClasses}}>{{model.status}}</span>
<span class={{this.statusColorClasses}}>{{this.model.status}}</span>
</div>
<div class="col event-id">{{model.id}}</div>
<div class="col timestamp">{{createdAt}}</div>
<div class="col completion">{{completion}}</div>
<div class="col event-id">{{this.model.id}}</div>
<div class="col timestamp">{{this.createdAt}}</div>
<div class="col completion">{{this.completion}}</div>
<div class="col actions">
<DButton @icon={{expandRequestIcon}} @action={{action "toggleRequest"}} @label="admin.web_hooks.events.request" />
<DButton @icon={{expandResponseIcon}} @action={{action "toggleResponse"}} @label="admin.web_hooks.events.response" />
<DButton @icon={{this.expandRequestIcon}} @action={{action "toggleRequest"}} @label="admin.web_hooks.events.request" />
<DButton @icon={{this.expandResponseIcon}} @action={{action "toggleResponse"}} @label="admin.web_hooks.events.response" />
<DButton @icon="sync" @action={{action "redeliver"}} @label="admin.web_hooks.events.redeliver" />
</div>
{{#if expandDetails}}
{{#if this.expandDetails}}
<div class="details">
<h3>{{i18n "admin.web_hooks.events.headers"}}</h3>
<pre><code>{{headers}}</code></pre>
<h3>{{bodyLabel}}</h3>
<pre><code>{{body}}</code></pre>
<pre><code>{{this.headers}}</code></pre>
<h3>{{this.bodyLabel}}</h3>
<pre><code>{{this.body}}</code></pre>
</div>
{{/if}}

View File

@ -1 +1 @@
{{circleIcon}} {{deliveryStatus}}
{{this.circleIcon}} {{this.deliveryStatus}}

View File

@ -1,13 +1,13 @@
<div class="admin-new-feature-item">
<div class="new-feature-emoji">{{item.emoji}}</div>
<div class="new-feature-emoji">{{this.item.emoji}}</div>
<div class="new-feature-content">
<div class="header">
{{#if item.link}}
<a href={{item.link}} target="_blank" rel="noopener noreferrer">{{item.title}}</a>
{{#if this.item.link}}
<a href={{this.item.link}} target="_blank" rel="noopener noreferrer">{{this.item.title}}</a>
{{else}}
{{item.title}}
{{this.item.title}}
{{/if}}
</div>
<div class="feature-description">{{item.description}}</div>
<div class="feature-description">{{this.item.description}}</div>
</div>
</div>

View File

@ -1,19 +1,19 @@
{{#if newFeatures}}
{{#if this.newFeatures}}
<div class="section-title">
<h2>{{replace-emoji (i18n "admin.dashboard.new_features.title") }}</h2>
</div>
<div class="section-body {{columnCountClass}}">
{{#each newFeatures as |feature|}}
<div class="section-body {{this.columnCountClass}}">
{{#each this.newFeatures as |feature|}}
<DashboardNewFeatureItem @item={{feature}} @tagName="" />
{{/each}}
</div>
<div class="section-footer">
{{#if releaseNotesLink}}
<a rel="noopener noreferrer" target="_blank" href={{releaseNotesLink}} class="btn btn-primary new-features-release-notes">
{{#if this.releaseNotesLink}}
<a rel="noopener noreferrer" target="_blank" href={{this.releaseNotesLink}} class="btn btn-primary new-features-release-notes">
{{i18n "admin.dashboard.new_features.learn_more"}}
</a>
{{/if}}
<DButton @label="admin.dashboard.new_features.dismiss" @class="btn-default new-features-dismiss" @action={{dismissNewFeatures}} />
<DButton @label="admin.dashboard.new_features.dismiss" @class="btn-default new-features-dismiss" @action={{this.dismissNewFeatures}} />
</div>
{{/if}}

View File

@ -1,4 +1,4 @@
{{#if foundProblems}}
{{#if this.foundProblems}}
<div class="section dashboard-problems">
<div class="section-title">
<h2>
@ -8,11 +8,11 @@
</div>
<div class="section-body">
<ConditionalLoadingSection @isLoading={{loadingProblems}}>
{{#if highPriorityProblems.length}}
<ConditionalLoadingSection @isLoading={{this.loadingProblems}}>
{{#if this.highPriorityProblems.length}}
<div class="problem-messages priority-high">
<ul>
{{#each highPriorityProblems as |problem|}}
{{#each this.highPriorityProblems as |problem|}}
<li class={{concat "dashboard-problem " "priority-" problem.priority}}>
{{d-icon "exclamation-triangle"}} {{html-safe problem.message}}
</li>
@ -23,15 +23,15 @@
<div class="problem-messages priority-low">
<ul>
{{#each lowPriorityProblems as |problem|}}
{{#each this.lowPriorityProblems as |problem|}}
<li class={{concat "dashboard-problem " "priority-" problem.priority}}>{{html-safe problem.message}}</li>
{{/each}}
</ul>
</div>
<p class="actions">
<DButton @action={{refreshProblems}} @class="btn-default" @icon="sync" @label="admin.dashboard.refresh_problems" />
{{i18n "admin.dashboard.last_checked"}}: {{problemsTimestamp}}
<DButton @action={{this.refreshProblems}} @class="btn-default" @icon="sync" @label="admin.dashboard.refresh_problems" />
{{i18n "admin.dashboard.last_checked"}}: {{this.problemsTimestamp}}
</p>
</ConditionalLoadingSection>
</div>

View File

@ -9,10 +9,10 @@
</div>
</div>
<AceEditor @content={{editorContents}} @mode={{currentEditorMode}} @editorId={{editorId}} @save={{action "save"}} />
<AceEditor @content={{this.editorContents}} @mode={{this.currentEditorMode}} @editorId={{this.editorId}} @save={{action "save"}} />
<div class="admin-footer">
<div class="buttons">
<DButton @action={{action "reset"}} @disabled={{resetDisabled}} @class="btn-default" @label="admin.customize.email_style.reset" />
<DButton @action={{action "reset"}} @disabled={{this.resetDisabled}} @class="btn-default" @label="admin.customize.email_style.reset" />
</div>
</div>

View File

@ -1,29 +1,29 @@
{{#if editing}}
{{#if this.editing}}
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.host"}}</div>
<Input @value={{buffered.host}} placeholder="example.com" @enter={{action "save"}} class="host-name" @autofocus={{true}} />
<Input @value={{this.buffered.host}} placeholder="example.com" @enter={{action "save"}} class="host-name" @autofocus={{true}} />
</td>
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.class_name"}}</div>
<Input @value={{buffered.class_name}} placeholder="class" @enter={{action "save"}} class="class-name" />
<Input @value={{this.buffered.class_name}} placeholder="class" @enter={{action "save"}} class="class-name" />
</td>
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>
<Input @value={{buffered.allowed_paths}} placeholder="/blog/.*" @enter={{action "save"}} class="path-allowlist" />
<Input @value={{this.buffered.allowed_paths}} placeholder="/blog/.*" @enter={{action "save"}} class="path-allowlist" />
</td>
<td class="editing-input">
<div class="label">{{i18n "admin.embedding.category"}}</div>
<CategoryChooser @value={{categoryId}} @class="small" @onChange={{action (mut categoryId)}} />
<CategoryChooser @value={{this.categoryId}} @class="small" @onChange={{action (mut this.categoryId)}} />
</td>
<td class="editing-controls">
<DButton @icon="check" @action={{action "save"}} @class="btn-primary" @disabled={{cantSave}} />
<DButton @icon="times" @action={{action "cancel"}} @class="btn-danger" @disabled={{host.isSaving}} />
<DButton @icon="check" @action={{action "save"}} @class="btn-primary" @disabled={{this.cantSave}} />
<DButton @icon="times" @action={{action "cancel"}} @class="btn-danger" @disabled={{this.host.isSaving}} />
</td>
{{else}}
<td><div class="label">{{i18n "admin.embedding.host"}}</div>{{host.host}}</td>
<td><div class="label">{{i18n "admin.embedding.class_name"}}</div>{{host.class_name}}</td>
<td><div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>{{host.allowed_paths}}</td>
<td><div class="label">{{i18n "admin.embedding.category"}}</div>{{category-badge host.category allowUncategorized=true}}</td>
<td><div class="label">{{i18n "admin.embedding.host"}}</div>{{this.host.host}}</td>
<td><div class="label">{{i18n "admin.embedding.class_name"}}</div>{{this.host.class_name}}</td>
<td><div class="label">{{i18n "admin.embedding.allowed_paths"}}</div>{{this.host.allowed_paths}}</td>
<td><div class="label">{{i18n "admin.embedding.category"}}</div>{{category-badge this.host.category allowUncategorized=true}}</td>
<td class="controls">
<DButton @icon="pencil-alt" @action={{action "edit"}} />
<DButton @icon="far-trash-alt" @action={{action "delete"}} @class="btn-danger" />

View File

@ -1,11 +1,11 @@
{{#if isCheckbox}}
<label for={{inputId}}>
<Input @checked={{checked}} @id={{inputId}} @type="checkbox" />
{{i18n translationKey}}
{{#if this.isCheckbox}}
<label for={{this.inputId}}>
<Input @checked={{this.checked}} @id={{this.inputId}} @type="checkbox" />
{{i18n this.translationKey}}
</label>
{{else}}
<label for={{inputId}}>{{i18n translationKey}}</label>
<Input @value={{value}} @id={{inputId}} placeholder={{placeholder}} />
<label for={{this.inputId}}>{{i18n this.translationKey}}</label>
<Input @value={{this.value}} @id={{this.inputId}} placeholder={{this.placeholder}} />
{{/if}}
<div class="clearfix"></div>

View File

@ -1,6 +1,6 @@
{{#if collection}}
{{#if this.collection}}
<ul class="values emoji-value-list">
{{#each collection as |data index|}}
{{#each this.collection as |data index|}}
<li class="value" data-index={{index}}>
<DButton @action={{action "removeValue"}} @actionParam={{data}} @icon="times" @class="remove-value-btn btn-small" @disabled={{not data.isEditable}} />
@ -9,7 +9,7 @@
<span class="emoji-name">{{data.value}}</span>
</div>
{{#if showUpDownButtons}}
{{#if this.showUpDownButtons}}
<DButton @action={{action "shift" -1 index}} @icon="arrow-up" @class="shift-up-value-btn btn-small" />
<DButton @action={{action "shift" 1 index}} @icon="arrow-down" @class="shift-down-value-btn btn-small" />
{{/if}}
@ -19,9 +19,9 @@
{{/if}}
<div class="value">
<DButton @action={{action "editValue"}} @actionParam={{data}} @icon="discourse-emojis" @class="add-emoji-button d-editor-textarea-wrapper" @label="admin.site_settings.emoji_list.add_emoji_button.label" />
<DButton @action={{action "editValue"}} @actionParam={{this.data}} @icon="discourse-emojis" @class="add-emoji-button d-editor-textarea-wrapper" @label="admin.site_settings.emoji_list.add_emoji_button.label" />
</div>
<EmojiPicker @isActive={{emojiPickerIsActive}} @isEditorFocused={{isEditorFocused}} @emojiSelected={{action "emojiSelected"}} @onEmojiPickerClose={{action "closeEmojiPicker"}} />
<EmojiPicker @isActive={{this.emojiPickerIsActive}} @isEditorFocused={{this.isEditorFocused}} @emojiSelected={{action "emojiSelected"}} @onEmojiPickerClose={{action "closeEmojiPicker"}} />
<SettingValidationMessage @message={{validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -3,7 +3,7 @@
{{i18n "admin.flags.flagged_by"}}
</div>
<div class="flag-users">
{{#each flaggedPost.post_actions as |postAction|}}
{{#each this.flaggedPost.post_actions as |postAction|}}
<FlagUser @user={{postAction.user}} @date={{postAction.created_at}}>
<div class="flagger-flag-type">
{{post-action-title postAction.post_action_type_id postAction.name_key}}
@ -14,13 +14,13 @@
</div>
</div>
{{#if showResolvedBy}}
{{#if this.showResolvedBy}}
<div class="flagged-post-resolved-by">
<div class="user-list-title">
{{i18n "admin.flags.resolved_by"}}
</div>
<div class="flag-users">
{{#each flaggedPost.post_actions as |postAction|}}
{{#each this.flaggedPost.post_actions as |postAction|}}
<FlagUser @user={{postAction.disposed_by}} @date={{postAction.disposed_at}}>
{{disposition-icon postAction.disposition}}
{{#if postAction.staff_took_action}}

View File

@ -1,14 +1,14 @@
<div class="flag-user">
<LinkTo @route="adminUser" @models={{array user.id user.username}} class="flag-user-avatar">
{{avatar user imageSize="small"}}
<LinkTo @route="adminUser" @models={{array this.user.id this.user.username}} class="flag-user-avatar">
{{avatar this.user imageSize="small"}}
</LinkTo>
<div class="flag-user-details">
<div class="flag-user-who">
<LinkTo @route="adminUser" @models={{array user.id user.username}} class="flag-user-username">
{{user.username}}
<LinkTo @route="adminUser" @models={{array this.user.id this.user.username}} class="flag-user-username">
{{this.user.username}}
</LinkTo>
<div title={{raw-date date}} class="flag-user-date">
{{format-age date}}
<div title={{raw-date this.date}} class="flag-user-date">
{{format-age this.date}}
</div>
</div>
<div class="flag-user-extra">

View File

@ -1 +1 @@
<pre><code class={{lang}}>{{code}}</code></pre>
<pre><code class={{this.lang}}>{{this.code}}</code></pre>

View File

@ -1,8 +1,8 @@
<label class="checkbox-label">
<Input @type="checkbox" @disabled={{disabled}} @checked={{buffer}} />
{{i18n labelKey}}
<Input @type="checkbox" @disabled={{this.disabled}} @checked={{this.buffer}} />
{{i18n this.labelKey}}
</label>
{{#if changed}}
{{#if this.changed}}
<DButton @action={{action "apply"}} @class="btn-primary btn-small submit-edit" @icon="check" />
<DButton @action={{action "cancel"}} @class="btn-small cancel-edit" @icon="times" />
{{/if}}

View File

@ -1,8 +1,8 @@
<RadioButton @name="install-items" @id={{value}} @value={{value}} @selection={{selection}} />
<label class="radio" for={{value}}>
{{#if showIcon}}
<RadioButton @name="install-items" @id={{this.value}} @value={{this.value}} @selection={{this.selection}} />
<label class="radio" for={{this.value}}>
{{#if this.showIcon}}
{{d-icon "plus"}}
{{/if}}
{{i18n label}}
{{i18n this.label}}
</label>
{{d-icon "caret-right"}}

View File

@ -1,10 +1,10 @@
{{#if ip}}
{{#if this.ip}}
<DButton @class="btn-default" @action={{action "lookup"}} @icon="globe" @label="admin.user.ip_lookup" />
{{/if}}
{{#if show}}
{{#if this.show}}
<div class="location-box">
<a href class="close pull-right" {{action "hide"}}>{{d-icon "times"}}</a>
{{#if copied}}
{{#if this.copied}}
<DButton @class="btn-hover pull-right" @icon="copy" @label="ip_lookup.copied" />
{{else}}
<DButton @action={{action "copy"}} @class="pull-right no-text" @icon="copy" />
@ -12,26 +12,26 @@
<h4>{{i18n "ip_lookup.title"}}</h4>
<p class="powered-by">{{html-safe (i18n "ip_lookup.powered_by")}}</p>
<dl>
{{#if location}}
{{#if location.hostname}}
{{#if this.location}}
{{#if this.location.hostname}}
<dt>{{i18n "ip_lookup.hostname"}}</dt>
<dd>{{location.hostname}}</dd>
<dd>{{this.location.hostname}}</dd>
{{/if}}
<dt>{{i18n "ip_lookup.location"}}</dt>
<dd>
{{#if location.location}}
<a href="https://maps.google.com/maps?q={{location.latitude}},{{location.longitude}}" rel="noopener noreferrer" target="_blank">
{{location.location}}
{{#if this.location.location}}
<a href="https://maps.google.com/maps?q={{this.location.latitude}},{{this.location.longitude}}" rel="noopener noreferrer" target="_blank">
{{this.location.location}}
</a>
{{else}}
{{i18n "ip_lookup.location_not_found"}}
{{/if}}
</dd>
{{#if location.organization}}
{{#if this.location.organization}}
<dt>{{i18n "ip_lookup.organisation"}}</dt>
<dd>{{location.organization}}</dd>
<dd>{{this.location.organization}}</dd>
{{/if}}
{{else}}
{{loading-spinner size="small"}}
@ -39,14 +39,14 @@
<dt>
{{i18n "ip_lookup.other_accounts"}}
<strong>{{totalOthersWithSameIP}}</strong>
{{#if other_accounts.length}}
<DButton @class="btn-danger pull-right" @action={{action "deleteOtherAccounts"}} @icon="exclamation-triangle" @translatedLabel={{i18n "ip_lookup.delete_other_accounts" count=otherAccountsToDelete}} />
<strong>{{this.totalOthersWithSameIP}}</strong>
{{#if this.other_accounts.length}}
<DButton @class="btn-danger pull-right" @action={{action "deleteOtherAccounts"}} @icon="exclamation-triangle" @translatedLabel={{i18n "ip_lookup.delete_other_accounts" count=this.otherAccountsToDelete}} />
{{/if}}
</dt>
<ConditionalLoadingSpinner @size="small" @condition={{otherAccountsLoading}}>
{{#if other_accounts.length}}
<ConditionalLoadingSpinner @size="small" @condition={{this.otherAccountsLoading}}>
{{#if this.other_accounts.length}}
<dd class="other-accounts">
<table class="table table-condensed table-hover">
<thead>
@ -59,7 +59,7 @@
</tr>
</thead>
<tbody>
{{#each other_accounts as |a|}}
{{#each this.other_accounts as |a|}}
<tr>
<td>
<LinkTo @route="adminUser" @model={{a}}>

View File

@ -4,11 +4,11 @@
{{html-safe (i18n "admin.user.penalty_post_actions")}}
</div>
</label>
<ComboBox @value={{postAction}} @content={{penaltyActions}} @onChange={{action "penaltyChanged"}} />
<ComboBox @value={{this.postAction}} @content={{this.penaltyActions}} @onChange={{action "penaltyChanged"}} />
</div>
{{#if editing}}
{{#if this.editing}}
<div class="penalty-post-edit">
<Textarea @value={{postEdit}} class="post-editor" />
<Textarea @value={{this.postEdit}} class="post-editor" />
</div>
{{/if}}

View File

@ -2,12 +2,12 @@
<div class="inline-form">
<label>{{i18n "admin.permalink.form.label"}}</label>
<TextField @value={{url}} @disabled={{formSubmitted}} @class="permalink-url" @placeholderKey="admin.permalink.url" @autocorrect="off" @autocapitalize="off" />
<TextField @value={{this.url}} @disabled={{this.formSubmitted}} @class="permalink-url" @placeholderKey="admin.permalink.url" @autocorrect="off" @autocapitalize="off" />
<ComboBox @content={{permalinkTypes}} @value={{permalinkType}} @onChange={{action (mut permalinkType)}} @class="permalink-type" />
<ComboBox @content={{this.permalinkTypes}} @value={{this.permalinkType}} @onChange={{action (mut this.permalinkType)}} @class="permalink-type" />
<TextField @value={{permalinkTypeValue}} @disabled={{formSubmitted}} @placeholderKey={{permalinkTypePlaceholder}} @autocorrect="off" @autocapitalize="off" @keyDown={{action "submitFormOnEnter"}} />
<TextField @value={{this.permalinkTypeValue}} @disabled={{this.formSubmitted}} @placeholderKey={{this.permalinkTypePlaceholder}} @autocorrect="off" @autocapitalize="off" @keyDown={{action "submitFormOnEnter"}} />
<DButton @action={{action "onSubmit"}} @disabled={{formSubmitted}} @label="admin.permalink.form.add" />
<DButton @action={{action "onSubmit"}} @disabled={{this.formSubmitted}} @label="admin.permalink.form.add" />
</div>
</div>

View File

@ -1 +1 @@
<Input @type="checkbox" @checked={{checked}} @click={{action "onChange"}} />
<Input @type="checkbox" @checked={{this.checked}} @click={{action "onChange"}} />

View File

@ -1 +1 @@
<SearchAdvancedCategoryChooser @value={{category}} @onChange={{action "onChange"}} @options={{hash filterable=true}} />
<SearchAdvancedCategoryChooser @value={{this.category}} @onChange={{action "onChange"}} @options={{hash filterable=true}} />

View File

@ -1,5 +1,5 @@
<ComboBox @valueProperty="value" @content={{groupOptions}} @value={{groupId}} @onChange={{action "onChange"}} @options={{hash
allowAny=filter.allow_any
<ComboBox @valueProperty="value" @content={{this.groupOptions}} @value={{this.groupId}} @onChange={{action "onChange"}} @options={{hash
allowAny=this.filter.allow_any
filterable=true
none="admin.dashboard.reports.groups"
}} />

View File

@ -1,5 +1,5 @@
<ComboBox @content={{filter.choices}} @value={{filter.default}} @onChange={{action "onChange"}} @options={{hash
allowAny=filter.allow_any
<ComboBox @content={{this.filter.choices}} @value={{this.filter.default}} @onChange={{action "onChange"}} @options={{hash
allowAny=this.filter.allow_any
filterable=true
none="admin.dashboard.report_filter_any"
}} />

View File

@ -1,3 +1,3 @@
{{uploadingIcon}}
<span class="ru-label">{{text}}</span>
<span style={{progressBar}} class="ru-progress"></span>
{{this.uploadingIcon}}
<span class="ru-label">{{this.text}}</span>
<span style={{this.progressBar}} class="ru-progress"></span>

View File

@ -1,6 +1,6 @@
<label>{{i18n "admin.logs.screened_ips.form.label"}}</label>
<TextField @value={{ip_address}} @disabled={{formSubmitted}} @class="ip-address-input" @placeholderKey="admin.logs.screened_ips.form.ip_address" @autocorrect="off" @autocapitalize="off" />
<TextField @value={{this.ip_address}} @disabled={{this.formSubmitted}} @class="ip-address-input" @placeholderKey="admin.logs.screened_ips.form.ip_address" @autocorrect="off" @autocapitalize="off" />
<ComboBox @content={{actionNames}} @value={{actionName}} @onChange={{action (mut actionName)}} />
<ComboBox @content={{this.actionNames}} @value={{this.actionName}} @onChange={{action (mut this.actionName)}} />
<DButton @class="btn-default" @action={{action "submit"}} @disabled={{formSubmitted}} @label="admin.logs.screened_ips.form.add" />
<DButton @class="btn-default" @action={{action "submit"}} @disabled={{this.formSubmitted}} @label="admin.logs.screened_ips.form.add" />

View File

@ -1,19 +1,19 @@
{{#if collection}}
{{#if this.collection}}
<div class="values">
{{#each collection as |value index|}}
{{#each this.collection as |value index|}}
<div class="value" data-index={{index}}>
<DButton @action={{action "removeValue"}} @actionParam={{value}} @icon="times" @class="remove-value-btn btn-small" />
<Input @value={{value.key}} class="value-input" @focus-out={{action "changeKey" index}} />
<Input @value={{value.secret}} class="value-input" @focus-out={{action "changeSecret" index}} @type={{if isSecret "password" "text"}} />
<Input @value={{value.secret}} class="value-input" @focus-out={{action "changeSecret" index}} @type={{if this.isSecret "password" "text"}} />
</div>
{{/each}}
</div>
{{/if}}
<div class="value">
<TextField @value={{newKey}} @class="new-value-input key" @placeholder={{setting.placeholder.key}} />
<Input @type="password" @value={{newSecret}} class="new-value-input secret" placeholder={{setting.placeholder.value}} />
<TextField @value={{this.newKey}} @class="new-value-input key" @placeholder={{this.setting.placeholder.key}} />
<Input @type="password" @value={{this.newSecret}} class="new-value-input secret" placeholder={{this.setting.placeholder.value}} />
<DButton @action={{action "addValue"}} @icon="plus" @class="add-value-btn btn-small" />
</div>
<SettingValidationMessage @message={{validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,4 +1,4 @@
<div class="validation-error {{unless message "hidden"}}">
<div class="validation-error {{unless this.message "hidden"}}">
{{d-icon "times"}}
{{message}}
{{this.message}}
</div>

View File

@ -4,7 +4,7 @@
{{html-safe (i18n "admin.user.silence_reason_label")}}
</div>
</label>
<TextField @value={{reason}} @class="silence-reason" @placeholderKey="admin.user.silence_reason_placeholder" />
<TextField @value={{this.reason}} @class="silence-reason" @placeholderKey="admin.user.silence_reason_placeholder" />
</div>
<label>
@ -12,4 +12,4 @@
{{i18n "admin.user.silence_message"}}
</div>
</label>
<Textarea @value={{message}} class="silence-message" placeholder={{i18n "admin.user.silence_message_placeholder"}} />
<Textarea @value={{this.message}} class="silence-message" placeholder={{i18n "admin.user.silence_message_placeholder"}} />

View File

@ -1,12 +1,12 @@
{{#if collection}}
{{#if this.collection}}
<div class="values">
{{#each collection as |value index|}}
{{#each this.collection as |value index|}}
<div data-index={{index}} class="value">
<DButton @action={{action "removeValue"}} @actionParam={{value}} @icon="times" @class="remove-value-btn btn-small" />
<Input @title={{value}} @value={{value}} class="value-input" @focus-out={{action "changeValue" index}} />
{{#if showUpDownButtons}}
{{#if this.showUpDownButtons}}
<DButton @action={{action "shift" -1 index}} @icon="arrow-up" @class="shift-up-value-btn btn-small" />
<DButton @action={{action "shift" 1 index}} @icon="arrow-down" @class="shift-down-value-btn btn-small" />
{{/if}}
@ -18,7 +18,7 @@
{{/if}}
<div class="simple-list-input">
<Input @type="text" @value={{newValue}} @placeholderKey="admin.site_settings.simple_list.add_item" class="add-value-input" @autocomplete="off" @autocorrect="off" @autocapitalize="off" />
<Input @type="text" @value={{this.newValue}} @placeholderKey="admin.site_settings.simple_list.add_item" class="add-value-input" @autocomplete="off" @autocorrect="off" @autocapitalize="off" />
<DButton @action={{action "addValue"}} @actionParam={{newValue}} @disabled={{inputEmpty}} @icon="plus" @class="add-value-btn btn-small" />
<DButton @action={{action "addValue"}} @actionParam={{this.newValue}} @disabled={{this.inputEmpty}} @icon="plus" @class="add-value-btn btn-small" />
</div>

View File

@ -1,18 +1,18 @@
<section class="field">
<b>{{i18n "admin.customize.enabled"}}</b>: {{change.enabled}}
<b>{{i18n "admin.customize.enabled"}}</b>: {{this.change.enabled}}
</section>
<SiteCustomizationChangeField @field={{change.stylesheet}} @name="admin.customize.css" />
<SiteCustomizationChangeField @icon="mobile" @field={{change.mobile_stylesheet}} @name="admin.customize.css" />
<SiteCustomizationChangeField @field={{this.change.stylesheet}} @name="admin.customize.css" />
<SiteCustomizationChangeField @icon="mobile" @field={{this.change.mobile_stylesheet}} @name="admin.customize.css" />
<SiteCustomizationChangeField @field={{change.header}} @name="admin.customize.header" />
<SiteCustomizationChangeField @icon="mobile" @field={{change.mobile_header}} @name="admin.customize.header" />
<SiteCustomizationChangeField @field={{this.change.header}} @name="admin.customize.header" />
<SiteCustomizationChangeField @icon="mobile" @field={{this.change.mobile_header}} @name="admin.customize.header" />
<SiteCustomizationChangeField @field={{change.top}} @name="admin.customize.top" />
<SiteCustomizationChangeField @icon="mobile" @field={{change.mobile_top}} @name="admin.customize.top" />
<SiteCustomizationChangeField @field={{this.change.top}} @name="admin.customize.top" />
<SiteCustomizationChangeField @icon="mobile" @field={{this.change.mobile_top}} @name="admin.customize.top" />
<SiteCustomizationChangeField @field={{change.footer}} @name="admin.customize.footer" />
<SiteCustomizationChangeField @icon="mobile" @field={{change.mobile_footer}} @name="admin.customize.footer" />
<SiteCustomizationChangeField @field={{this.change.footer}} @name="admin.customize.footer" />
<SiteCustomizationChangeField @icon="mobile" @field={{this.change.mobile_footer}} @name="admin.customize.footer" />
<SiteCustomizationChangeField @icon="file-text-o" @field={{change.head_tag}} @name="admin.customize.head_tag.text" />
<SiteCustomizationChangeField @icon="file-text-o" @field={{change.body_tag}} @name="admin.customize.body_tag.text" />
<SiteCustomizationChangeField @icon="file-text-o" @field={{this.change.head_tag}} @name="admin.customize.head_tag.text" />
<SiteCustomizationChangeField @icon="file-text-o" @field={{this.change.body_tag}} @name="admin.customize.body_tag.text" />

View File

@ -1,7 +1,7 @@
{{#if field}}
{{#if this.field}}
<section class="field">
<b>{{i18n name}}</b>: ({{i18n "character_count" count=field.length}})
<b>{{i18n this.name}}</b>: ({{i18n "character_count" count=this.field.length}})
<br>
<Textarea @value={{field}} class="plain" />
<Textarea @value={{this.field}} class="plain" />
</section>
{{/if}}

View File

@ -1,30 +1,30 @@
<div class="setting-label">
<h3>
{{#if staffLogFilter}}
{{settingName}}
<LinkTo @route="adminLogs.staffActionLogs" @query={{hash filters=staffLogFilter force_refresh=true}} @title={{i18n "admin.settings.history"}}>
{{#if this.staffLogFilter}}
{{this.settingName}}
<LinkTo @route="adminLogs.staffActionLogs" @query={{hash filters=this.staffLogFilter force_refresh=true}} @title={{i18n "admin.settings.history"}}>
<span class="history-icon">
{{d-icon "history"}}
</span>
</LinkTo>
{{else}}
{{settingName}}
{{this.settingName}}
{{/if}}
</h3>
{{#if defaultIsAvailable}}
<a href onClick={{action "setDefaultValues"}}>{{setting.setDefaultValuesLabel}}</a>
{{#if this.defaultIsAvailable}}
<a href onClick={{action "setDefaultValues"}}>{{this.setting.setDefaultValuesLabel}}</a>
{{/if}}
</div>
<div class="setting-value">
{{component componentName setting=setting value=buffered.value validationMessage=validationMessage preview=preview isSecret=isSecret allowAny=allowAny}}
{{component this.componentName setting=this.setting value=this.buffered.value validationMessage=this.validationMessage preview=this.preview isSecret=this.isSecret allowAny=this.allowAny}}
</div>
{{#if dirty}}
{{#if this.dirty}}
<div class="setting-controls">
<DButton @class="ok" @action={{action "update"}} @icon="check" />
<DButton @class="cancel" @action={{action "cancel"}} @icon="times" />
</div>
{{else if setting.overridden}}
{{#if setting.secret}}
{{else if this.setting.overridden}}
{{#if this.setting.secret}}
<DButton @action={{action "toggleSecret"}} @icon="far-eye-slash" />
{{/if}}
<DButton @class="btn-default undo" @action={{action "resetDefault"}} @icon="undo" @label="admin.settings.reset" />

View File

@ -1,6 +1,6 @@
<label>
<Input @type="checkbox" @checked={{enabled}} />
<span>{{html-safe setting.description}}</span>
<Input @type="checkbox" @checked={{this.enabled}} />
<span>{{html-safe this.setting.description}}</span>
</label>
<SettingValidationMessage @message={{validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,4 +1,4 @@
<CategorySelector @categories={{selectedCategories}} @onChange={{action "onChangeSelectedCategories"}} />
<CategorySelector @categories={{this.selectedCategories}} @onChange={{action "onChangeSelectedCategories"}} />
<div class="desc">{{html-safe setting.description}}</div>
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,6 +1,6 @@
<CategoryChooser @value={{value}} @onChange={{action (mut value)}} @options={{hash
<CategoryChooser @value={{this.value}} @onChange={{action (mut this.value)}} @options={{hash
allowUncategorized=true
none=(eq setting.default "")
none=(eq this.setting.default "")
}} />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,3 @@
<ColorInput @hexValue={{readonly value}} @valid={{valid}} @onlyHex={{false}} @styleSelection={{false}} @onChangeColor={{action "onChangeColor"}} />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<ColorInput @hexValue={{readonly this.value}} @valid={{this.valid}} @onlyHex={{false}} @styleSelection={{false}} @onChangeColor={{action "onChangeColor"}} />
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,6 +1,6 @@
<ListSetting @value={{settingValue}} @settingName={{setting.setting}} @choices={{settingChoices}} @onChange={{action "onChangeListSetting"}} @onChangeChoices={{action "onChangeChoices"}} @options={{hash
allowAny=allowAny
<ListSetting @value={{this.settingValue}} @settingName={{this.setting.setting}} @choices={{this.settingChoices}} @onChange={{action "onChangeListSetting"}} @onChangeChoices={{action "onChangeChoices"}} @options={{hash
allowAny=this.allowAny
}} />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,3 @@
<EmojiValueList @setting={{setting}} @values={{value}} />
<div class="desc">{{html-safe setting.description}}</div>
<SettingValidationMessage @message={{validationMessage}} />
<EmojiValueList @setting={{this.setting}} @values={{this.value}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,12 +1,12 @@
<ComboBox @content={{setting.validValues}} @value={{value}} @onChange={{action (mut value)}} @valueProperty={{setting.computedValueProperty}} @nameProperty={{setting.computedNameProperty}} @options={{hash
<ComboBox @content={{this.setting.validValues}} @value={{this.value}} @onChange={{action (mut this.value)}} @valueProperty={{this.setting.computedValueProperty}} @nameProperty={{this.setting.computedNameProperty}} @options={{hash
castInteger=true
allowAny=setting.allowsNone
allowAny=this.setting.allowsNone
}} />
{{preview}}
{{this.preview}}
<SettingValidationMessage @message={{validationMessage}} />
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">
{{html-safe setting.description}}
{{html-safe this.setting.description}}
</div>

View File

@ -1,3 +1,3 @@
<ListSetting @value={{settingValue}} @choices={{groupChoices}} @settingName="name" @nameProperty={{nameProperty}} @valueProperty={{valueProperty}} @onChange={{action "onChangeGroupListSetting"}} />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<ListSetting @value={{this.settingValue}} @choices={{this.groupChoices}} @settingName="name" @nameProperty={{this.nameProperty}} @valueProperty={{this.valueProperty}} @onChange={{action "onChangeGroupListSetting"}} />
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,6 +1,6 @@
<ListSetting @value={{settingValue}} @settingName={{setting.setting}} @choices={{settingValue}} @onChange={{action "onChange"}} @options={{hash
allowAny=allowAny
<ListSetting @value={{this.settingValue}} @settingName={{this.setting.setting}} @choices={{this.settingValue}} @onChange={{action "onChange"}} @options={{hash
allowAny=this.allowAny
}} />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,3 @@
<ValueList @values={{value}} @inputDelimiter="|" @choices={{setting.choices}} />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<ValueList @values={{this.value}} @inputDelimiter="|" @choices={{this.setting.choices}} />
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,6 +1,6 @@
<ListSetting @value={{settingValue}} @settingName={{setting.setting}} @choices={{settingChoices}} @nameProperty="name" @valueProperty="value" @onChange={{action "onChangeListSetting"}} @options={{hash
allowAny=allowAny
<ListSetting @value={{this.settingValue}} @settingName={{this.setting.setting}} @choices={{this.settingChoices}} @nameProperty="name" @valueProperty="value" @onChange={{action "onChangeListSetting"}} @options={{hash
allowAny=this.allowAny
}} />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,3 @@
<SecretValueList @setting={{setting}} @values={{value}} @isSecret={{isSecret}} />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<SecretValueList @setting={{this.setting}} @values={{this.value}} @isSecret={{this.isSecret}} />
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,3 @@
<SimpleList @values={{value}} @inputDelimiter={{inputDelimiter}} @onChange={{action "onChange"}} />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<SimpleList @values={{this.value}} @inputDelimiter={{this.inputDelimiter}} @onChange={{action "onChange"}} />
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,12 +1,12 @@
{{#if setting.textarea}}
<Textarea @value={{value}} @classNames="input-setting-textarea" />
{{else if setting.json_schema}}
{{#if this.setting.textarea}}
<Textarea @value={{this.value}} @classNames="input-setting-textarea" />
{{else if this.setting.json_schema}}
<DButton @action={{action "launchJsonEditorModal"}} @icon="pencil-alt" @label="admin.site_settings.json_schema.edit" />
{{else if isSecret}}
<Input @type="password" @value={{value}} @classNames="input-setting-string" />
{{else if this.isSecret}}
<Input @type="password" @value={{this.value}} @classNames="input-setting-string" />
{{else}}
<TextField @value={{value}} @classNames="input-setting-string" />
<TextField @value={{this.value}} @classNames="input-setting-string" />
{{/if}}
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,6 +1,6 @@
<TagChooser @tags={{selectedTags}} @onChange={{action "changeSelectedTags"}} @everyTag={{true}} @options={{hash
<TagChooser @tags={{this.selectedTags}} @onChange={{action "changeSelectedTags"}} @everyTag={{true}} @options={{hash
allowAny=false
maximum=null
}} />
<div class="desc">{{html-safe setting.description}}</div>
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,3 +1,3 @@
<UppyImageUploader @imageUrl={{value}} @placeholderUrl={{setting.placeholder}} @additionalParams={{hash for_site_setting=true}} @type="site_setting" @id={{concat "site-setting-image-uploader-" setting.setting}} />
<div class="desc">{{html-safe setting.description}}</div>
<SettingValidationMessage @message={{validationMessage}} />
<UppyImageUploader @imageUrl={{this.value}} @placeholderUrl={{this.setting.placeholder}} @additionalParams={{hash for_site_setting=true}} @type="site_setting" @id={{concat "site-setting-image-uploader-" this.setting.setting}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,3 +1,3 @@
<DButton @label="admin.site_settings.uploaded_image_list.label" @action={{action "showUploadModal"}} @actionParam={{hash value=value setting=setting}} />
<div class="desc">{{html-safe setting.description}}</div>
<SettingValidationMessage @message={{validationMessage}} />
<DButton @label="admin.site_settings.uploaded_image_list.label" @action={{action "showUploadModal"}} @actionParam={{hash value=this.value setting=this.setting}} />
<div class="desc">{{html-safe this.setting.description}}</div>
<SettingValidationMessage @message={{this.validationMessage}} />

View File

@ -1,3 +1,3 @@
<ValueList @values={{value}} @addKey="admin.site_settings.add_url" />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<ValueList @values={{this.value}} @addKey="admin.site_settings.add_url" />
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,3 +1,3 @@
<ValueList @values={{value}} />
<SettingValidationMessage @message={{validationMessage}} />
<div class="desc">{{html-safe setting.description}}</div>
<ValueList @values={{this.value}} />
<SettingValidationMessage @message={{this.validationMessage}} />
<div class="desc">{{html-safe this.setting.description}}</div>

View File

@ -1,5 +1,5 @@
<DButton @label="admin.site_text.edit" @class="btn-default edit" @action={{editAction}} @actionParam={{siteText}} />
<h3 class="site-text-id">{{siteText.id}}</h3>
<div class="site-text-value">{{siteText.value}}</div>
<DButton @label="admin.site_text.edit" @class="btn-default edit" @action={{this.editAction}} @actionParam={{this.siteText}} />
<h3 class="site-text-id">{{this.siteText.id}}</h3>
<div class="site-text-value">{{this.siteText.value}}</div>
<div class="clearfix"></div>

View File

@ -1,7 +1,7 @@
<div class="reason-controls">
<label>
<div class="suspend-reason-label">
{{#if siteSettings.hide_suspension_reasons}}
{{#if this.siteSettings.hide_suspension_reasons}}
{{html-safe (i18n "admin.user.suspend_reason_hidden_label")}}
{{else}}
{{html-safe (i18n "admin.user.suspend_reason_label")}}
@ -11,9 +11,9 @@
<label>
{{i18n "admin.user.suspend_reason_title"}}
</label>
<ComboBox @content={{reasons}} @value={{selectedReason}} @class="suspend-reason" @onChange={{action setSelectedReason}} />
{{#if isCustomReason}}
<TextField @value={{customReason}} @class="suspend-reason" @onChange={{action setCustomReason}} />
<ComboBox @content={{this.reasons}} @value={{this.selectedReason}} @class="suspend-reason" @onChange={{action this.setSelectedReason}} />
{{#if this.isCustomReason}}
<TextField @value={{this.customReason}} @class="suspend-reason" @onChange={{action this.setCustomReason}} />
{{/if}}
</div>
@ -22,4 +22,4 @@
{{i18n "admin.user.suspend_message"}}
</div>
</label>
<Textarea @value={{message}} class="suspend-message" placeholder={{i18n "admin.user.suspend_message_placeholder"}} />
<Textarea @value={{this.message}} class="suspend-message" placeholder={{i18n "admin.user.suspend_message_placeholder"}} />

View File

@ -1,6 +1,6 @@
<label class="btn btn-default {{if addDisabled "disabled"}}">
<label class="btn btn-default {{if this.addDisabled "disabled"}}">
{{d-icon "upload"}}
{{i18n "admin.watched_words.form.upload"}}
<input class="hidden-upload-field" disabled={{addDisabled}} type="file" accept="text/plain,text/csv">
<input class="hidden-upload-field" disabled={{this.addDisabled}} type="file" accept="text/plain,text/csv">
</label>
<span class="instructions">{{i18n "tagging.upload_instructions"}}</span>

View File

@ -1,41 +1,41 @@
<div class="inner-wrapper">
<PluginOutlet @name="admin-customize-themes-list-item" @tagName="span" @connectorTagName="span" @args={{hash theme=theme}} />
<PluginOutlet @name="admin-customize-themes-list-item" @tagName="span" @connectorTagName="span" @args={{hash theme=this.theme}} />
<div class="info">
<span class="name">
{{theme.name}}
{{this.theme.name}}
</span>
<span class="icons">
{{#if theme.selected}}
{{#if this.theme.selected}}
{{d-icon "caret-right"}}
{{else}}
{{#if theme.default}}
{{#if this.theme.default}}
{{d-icon "check" class="default-indicator" title="admin.customize.theme.default_theme_tooltip"}}
{{/if}}
{{#if theme.isPendingUpdates}}
{{#if this.theme.isPendingUpdates}}
{{d-icon "sync" title="admin.customize.theme.updates_available_tooltip" class="light-grey-icon"}}
{{/if}}
{{#if theme.isBroken}}
{{#if this.theme.isBroken}}
{{d-icon "exclamation-circle" class="broken-indicator" title="admin.customize.theme.broken_theme_tooltip"}}
{{/if}}
{{#unless theme.enabled}}
{{#unless this.theme.enabled}}
{{d-icon "ban" class="light-grey-icon" title="admin.customize.theme.disabled_component_tooltip"}}
{{/unless}}
{{/if}}
</span>
</div>
{{#if displayComponents}}
{{#if this.displayComponents}}
<div class="components-list">
<span class="components">{{html-safe childrenString}}</span>
<span class="components">{{html-safe this.childrenString}}</span>
{{#if displayHasMore}}
{{#if this.displayHasMore}}
<a href {{action "toggleChildrenExpanded"}} class="others-count">
{{#if childrenExpanded}}
{{#if this.childrenExpanded}}
{{i18n "admin.customize.theme.collapse"}}
{{else}}
{{i18n "admin.customize.theme.and_x_more" count=moreCount}}
{{i18n "admin.customize.theme.and_x_more" count=this.moreCount}}
{{/if}}
</a>
{{/if}}

View File

@ -1,25 +1,25 @@
<div class="themes-list-header">
<DButton @action={{action "changeView"}} @actionParam={{THEMES}} @class={{concat "themes-tab " "tab " (if themesTabActive "btn-danger active" "")}} @label="admin.customize.theme.title" />
<DButton @action={{action "changeView"}} @actionParam={{COMPONENTS}} @class={{concat "components-tab " "tab " (if componentsTabActive "btn-danger active" "")}} @label="admin.customize.theme.components" @icon="puzzle-piece" />
<DButton @action={{action "changeView"}} @actionParam={{this.THEMES}} @class={{concat "themes-tab " "tab " (if this.themesTabActive "btn-danger active" "")}} @label="admin.customize.theme.title" />
<DButton @action={{action "changeView"}} @actionParam={{this.COMPONENTS}} @class={{concat "components-tab " "tab " (if this.componentsTabActive "btn-danger active" "")}} @label="admin.customize.theme.components" @icon="puzzle-piece" />
</div>
<div class="themes-list-container">
{{#if showFilter}}
{{#if this.showFilter}}
<div class="themes-list-filter themes-list-item">
<Input class="filter-input" placeholder={{i18n "admin.customize.theme.filter_placeholder"}} @autocomplete="off" @type="search" @value={{mut filterTerm}} />
<Input class="filter-input" placeholder={{i18n "admin.customize.theme.filter_placeholder"}} @autocomplete="off" @type="search" @value={{mut this.filterTerm}} />
{{d-icon "search"}}
</div>
{{/if}}
{{#if hasThemes}}
{{#if hasActiveThemes}}
{{#each activeThemes as |theme|}}
{{#if this.hasThemes}}
{{#if this.hasActiveThemes}}
{{#each this.activeThemes as |theme|}}
<ThemesListItem @theme={{theme}} @navigateToTheme={{action "navigateToTheme" theme}} />
{{/each}}
{{#if hasInactiveThemes}}
{{#if this.hasInactiveThemes}}
<div class="themes-list-item inactive-indicator">
<span class="empty">
{{#if themesTabActive}}
{{#if this.themesTabActive}}
{{i18n "admin.customize.theme.inactive_themes"}}
{{else}}
{{i18n "admin.customize.theme.inactive_components"}}
@ -29,8 +29,8 @@
{{/if}}
{{/if}}
{{#if hasInactiveThemes}}
{{#each inactiveThemes as |theme|}}
{{#if this.hasInactiveThemes}}
{{#each this.inactiveThemes as |theme|}}
<ThemesListItem @theme={{theme}} @navigateToTheme={{action "navigateToTheme" theme}} />
{{/each}}
{{/if}}
@ -42,5 +42,5 @@
</div>
<div class="create-actions">
<DButton @action={{installModal}} @icon="upload" @label="admin.customize.install" @class="btn-primary" />
<DButton @action={{this.installModal}} @icon="upload" @label="admin.customize.install" @class="btn-primary" />
</div>

View File

@ -1,12 +1,12 @@
{{#if collection}}
{{#if this.collection}}
<div class="values">
{{#each collection as |value index|}}
{{#each this.collection as |value index|}}
<div data-index={{index}} class="value">
<DButton @action={{action "removeValue"}} @actionParam={{value}} @icon="times" @class="remove-value-btn btn-small" />
<Input @title={{value}} @value={{value}} class="value-input" @focus-out={{action "changeValue" index}} />
{{#if showUpDownButtons}}
{{#if this.showUpDownButtons}}
<DButton @action={{action "shift" -1 index}} @icon="arrow-up" @class="shift-up-value-btn btn-small" />
<DButton @action={{action "shift" 1 index}} @icon="arrow-down" @class="shift-down-value-btn btn-small" />
{{/if}}
@ -15,7 +15,7 @@
</div>
{{/if}}
<ComboBox @valueProperty={{null}} @nameProperty={{null}} @value={{newValue}} @content={{filteredChoices}} @onChange={{action "selectChoice"}} @options={{hash
<ComboBox @valueProperty={{null}} @nameProperty={{null}} @value={{this.newValue}} @content={{this.filteredChoices}} @onChange={{action "selectChoice"}} @options={{hash
allowAny=true
none=noneKey
none=this.noneKey
}} />

View File

@ -6,26 +6,26 @@
<div
class="dashboard-stats version-check
{{if versionCheck.critical_updates "critical" "normal"}}"
{{if this.versionCheck.critical_updates "critical" "normal"}}"
>
<div class="version-number">
<h4>
{{i18n "admin.dashboard.installed_version"}}
</h4>
<h3>
{{dash-if-empty versionCheck.installed_version}}
{{dash-if-empty this.versionCheck.installed_version}}
</h3>
{{#if versionCheck.gitLink}}
{{#if this.versionCheck.gitLink}}
<div class="sha-link">
(
<a href={{versionCheck.gitLink}} rel="noopener noreferrer" target="_blank">
{{versionCheck.shortSha}}
<a href={{this.versionCheck.gitLink}} rel="noopener noreferrer" target="_blank">
{{this.versionCheck.shortSha}}
</a>
)
</div>
{{/if}}
</div>
{{#if versionCheck.noCheckPerformed}}
{{#if this.versionCheck.noCheckPerformed}}
<div class="version-number">
<h4>
{{i18n "admin.dashboard.latest_version"}}
@ -46,20 +46,20 @@
</span>
</div>
</div>
{{else if versionCheck.stale_data}}
{{else if this.versionCheck.stale_data}}
<div class="version-number">
<h4>
{{i18n "admin.dashboard.latest_version"}}
</h4>
<h3>
{{#if versionCheck.version_check_pending}}
{{dash-if-empty versionCheck.installed_version}}
{{#if this.versionCheck.version_check_pending}}
{{dash-if-empty this.versionCheck.installed_version}}
{{/if}}
</h3>
</div>
<div class="version-status">
<div class="face">
{{#if versionCheck.version_check_pending}}
{{#if this.versionCheck.version_check_pending}}
<span class="icon up-to-date">
{{d-icon "far-smile"}}
</span>
@ -71,7 +71,7 @@
</div>
<div class="version-notes">
<span class="normal-note">
{{#if versionCheck.version_check_pending}}
{{#if this.versionCheck.version_check_pending}}
{{i18n "admin.dashboard.version_check_pending"}}
{{else}}
{{i18n "admin.dashboard.stale_data"}}
@ -85,12 +85,12 @@
{{i18n "admin.dashboard.latest_version"}}
</h4>
<h3>
{{dash-if-empty versionCheck.latest_version}}
{{dash-if-empty this.versionCheck.latest_version}}
</h3>
</div>
<div class="version-status">
<div class="face">
{{#if versionCheck.upToDate}}
{{#if this.versionCheck.upToDate}}
<span class="icon up-to-date">
{{d-icon "far-smile"}}
</span>
@ -98,12 +98,12 @@
<span
class="icon
{{if
versionCheck.critical_updates
this.versionCheck.critical_updates
"critical-updates-available"
"updates-available"
}}"
>
{{#if versionCheck.behindByOneVersion}}
{{#if this.versionCheck.behindByOneVersion}}
{{d-icon "far-meh"}}
{{else}}
{{d-icon "far-frown"}}
@ -112,7 +112,7 @@
{{/if}}
</div>
<div class="version-notes">
{{#if versionCheck.upToDate}}
{{#if this.versionCheck.upToDate}}
{{i18n "admin.dashboard.up_to_date"}}
{{else}}
<span class="critical-note">
@ -126,5 +126,5 @@
</div>
</div>
{{/if}}
<CustomHtml @name="upgrade-header" @versionCheck={{versionCheck}} @tagName="div" @classNames="upgrade-header" />
<CustomHtml @name="upgrade-header" @versionCheck={{this.versionCheck}} @tagName="div" @classNames="upgrade-header" />
</div>

View File

@ -1,34 +1,34 @@
<div class="watched-word-input">
<label for="watched-word">{{i18n "admin.watched_words.form.label"}}</label>
<TextField @id="watched-word" @value={{word}} @disabled={{formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey={{placeholderKey}} @title={{i18n placeholderKey}} />
<TextField @id="watched-word" @value={{this.word}} @disabled={{this.formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey={{this.placeholderKey}} @title={{i18n this.placeholderKey}} />
</div>
{{#if canReplace}}
{{#if this.canReplace}}
<div class="watched-word-input">
<label for="watched-replacement">{{i18n "admin.watched_words.form.replace_label"}}</label>
<TextField @id="watched-replacement" @value={{replacement}} @disabled={{formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey="admin.watched_words.form.replace_placeholder" />
<TextField @id="watched-replacement" @value={{this.replacement}} @disabled={{this.formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey="admin.watched_words.form.replace_placeholder" />
</div>
{{/if}}
{{#if canTag}}
{{#if this.canTag}}
<div class="watched-word-input">
<label for="watched-tag">{{i18n "admin.watched_words.form.tag_label"}}</label>
<TagChooser @id="watched-tag" @class="watched-word-input-field" @tags={{selectedTags}} @onChange={{action "changeSelectedTags"}} @everyTag={{true}} @options={{hash
<TagChooser @id="watched-tag" @class="watched-word-input-field" @tags={{this.selectedTags}} @onChange={{action "changeSelectedTags"}} @everyTag={{true}} @options={{hash
allowAny=true
disabled=formSubmitted
disabled=this.formSubmitted
}} />
</div>
{{/if}}
{{#if canLink}}
{{#if this.canLink}}
<div class="watched-word-input">
<label for="watched-replacement">{{i18n "admin.watched_words.form.link_label"}}</label>
<TextField @id="watched-replacement" @value={{replacement}} @disabled={{formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey="admin.watched_words.form.link_placeholder" />
<TextField @id="watched-replacement" @value={{this.replacement}} @disabled={{this.formSubmitted}} @class="watched-word-input-field" @autocorrect="off" @autocapitalize="off" @placeholderKey="admin.watched_words.form.link_placeholder" />
</div>
{{/if}}
<DButton @class="btn btn-primary" @action={{action "submit"}} @disabled={{formSubmitted}} @label="admin.watched_words.form.add" />
<DButton @class="btn btn-primary" @action={{action "submit"}} @disabled={{this.formSubmitted}} @label="admin.watched_words.form.add" />
{{#if showMessage}}
<span class="success-message">{{message}}</span>
{{#if this.showMessage}}
<span class="success-message">{{this.message}}</span>
{{/if}}

View File

@ -1,5 +1,5 @@
<label class="btn btn-default {{if addDisabled "disabled"}}">
<label class="btn btn-default {{if this.addDisabled "disabled"}}">
{{d-icon "upload"}}
{{i18n "admin.watched_words.form.upload"}}
<input class="hidden-upload-field" disabled={{addDisabled}} type="file">
<input class="hidden-upload-field" disabled={{this.addDisabled}} type="file">
</label>

View File

@ -1,17 +1,17 @@
<div class="color-scheme show-current-style">
<div class="admin-container">
<h1>{{#if model.theme_id}}{{model.name}}{{else}}<TextField @class="style-name" @value={{model.name}} />{{/if}}</h1>
<h1>{{#if this.model.theme_id}}{{this.model.name}}{{else}}<TextField @class="style-name" @value={{this.model.name}} />{{/if}}</h1>
<div class="controls">
{{#unless model.theme_id}}
<DButton @class="btn-primary" @action={{action "save"}} @disabled={{model.disableSave}} @label="admin.customize.save" />
{{#unless this.model.theme_id}}
<DButton @class="btn-primary" @action={{action "save"}} @disabled={{this.model.disableSave}} @label="admin.customize.save" />
{{/unless}}
<DButton @class="btn-default" @action={{action "copy" model}} @icon="copy" @label="admin.customize.copy" />
<DButton @class="btn-default copy-to-clipboard" @action={{action "copyToClipboard" model}} @icon="far-clipboard" @label="admin.customize.copy_to_clipboard" />
<span class="saving {{unless model.savingStatus "hidden"}}">{{model.savingStatus}}</span>
{{#if model.theme_id}}
<DButton @class="btn-default" @action={{action "copy" this.model}} @icon="copy" @label="admin.customize.copy" />
<DButton @class="btn-default copy-to-clipboard" @action={{action "copyToClipboard" this.model}} @icon="far-clipboard" @label="admin.customize.copy_to_clipboard" />
<span class="saving {{unless this.model.savingStatus "hidden"}}">{{this.model.savingStatus}}</span>
{{#if this.model.theme_id}}
<span class="not-editable">
{{i18n "admin.customize.theme_owner"}}
<LinkTo @route="adminCustomizeThemes.show" @model={{model.theme_id}}>{{model.theme_name}}</LinkTo>
<LinkTo @route="adminCustomizeThemes.show" @model={{this.model.theme_id}}>{{this.model.theme_name}}</LinkTo>
</span>
{{else}}
<DButton @action={{action "destroy"}} @class="btn-danger" @icon="far-trash-alt" @label="admin.customize.delete" />
@ -19,28 +19,28 @@
</div>
<div class="admin-controls">
{{#unless model.theme_id}}
{{#unless this.model.theme_id}}
<div class="pull-right">
<label>
<Input @type="checkbox" @checked={{onlyOverridden}} />
<Input @type="checkbox" @checked={{this.onlyOverridden}} />
{{i18n "admin.settings.show_overriden"}}
</label>
</div>
{{/unless}}
<div>
{{#if model.theme_id}}
<InlineEditCheckbox @action={{action "applyUserSelectable"}} @labelKey="admin.customize.theme.color_scheme_user_selectable" @checked={{model.user_selectable}} @modelId={{model.id}} />
{{#if this.model.theme_id}}
<InlineEditCheckbox @action={{action "applyUserSelectable"}} @labelKey="admin.customize.theme.color_scheme_user_selectable" @checked={{this.model.user_selectable}} @modelId={{this.model.id}} />
{{else}}
<label>
<Input @type="checkbox" @checked={{model.user_selectable}} />
<Input @type="checkbox" @checked={{this.model.user_selectable}} />
{{i18n "admin.customize.theme.color_scheme_user_selectable"}}
</label>
{{/if}}
</div>
</div>
{{#if colors.length}}
{{#if this.colors.length}}
<table class="table colors">
<thead>
<tr>
@ -50,7 +50,7 @@
</tr>
</thead>
<tbody>
{{#each colors as |c|}}
{{#each this.colors as |c|}}
<tr class="{{if c.changed "changed"}} {{if c.valid "valid" "invalid"}}">
<td class="name" title={{c.name}}>
<h3>{{c.translatedName}}</h3>
@ -58,7 +58,7 @@
</td>
<td class="hex"><ColorInput @hexValue={{c.hex}} @brightnessValue={{c.brightness}} @valid={{c.valid}} /></td>
<td class="actions">
{{#unless model.theme_id}}
{{#unless this.model.theme_id}}
<DButton @class={{concat "btn-default revert " (unless c.savedIsOverriden "invisible")}} @action={{action "revert" c}} @title="admin.customize.colors.revert_title" @label="revert" />
<DButton @class={{concat "btn-default undo " (unless c.changed "invisible")}} @action={{action "undo" c}} @title="admin.customize.colors.undo_title" @label="undo" />
{{/unless}}

View File

@ -2,7 +2,7 @@
<h3>{{i18n "admin.customize.colors.long_title"}}</h3>
<ul>
{{#each model as |scheme|}}
{{#each this.model as |scheme|}}
{{#unless scheme.is_base}}
<li>
<LinkTo @route="adminCustomize.colors.show" @model={{scheme}} @replace={{true}}>

View File

@ -1,7 +1,7 @@
<EmailStylesEditor @styles={{model}} @fieldName={{fieldName}} @save={{action "save"}} />
<EmailStylesEditor @styles={{this.model}} @fieldName={{this.fieldName}} @save={{action "save"}} />
<div class="admin-footer">
<div class="buttons">
<DButton @action={{action "save"}} @disabled={{saveDisabled}} @class="btn-primary" @translatedLabel={{saveButtonText}} />
<DButton @action={{action "save"}} @disabled={{this.saveDisabled}} @class="btn-primary" @translatedLabel={{this.saveButtonText}} />
</div>
</div>

View File

@ -1,19 +1,19 @@
<ComboBox @value={{emailTemplate.id}} @content={{adminCustomizeEmailTemplates.sortedTemplates}} @onChange={{adminCustomizeEmailTemplates.onSelectTemplate}} @nameProperty="title" />
<ComboBox @value={{this.emailTemplate.id}} @content={{this.adminCustomizeEmailTemplates.sortedTemplates}} @onChange={{this.adminCustomizeEmailTemplates.onSelectTemplate}} @nameProperty="title" />
<div class="email-template">
<label>{{i18n "admin.customize.email_templates.subject"}}</label>
{{#if hasMultipleSubjects}}
<h3><LinkTo @route="adminSiteText" @query={{hash q=hasMultipleSubjects}}>{{i18n "admin.customize.email_templates.multiple_subjects"}}</LinkTo></h3>
{{#if this.hasMultipleSubjects}}
<h3><LinkTo @route="adminSiteText" @query={{hash q=this.hasMultipleSubjects}}>{{i18n "admin.customize.email_templates.multiple_subjects"}}</LinkTo></h3>
{{else}}
<Input @value={{buffered.subject}} />
<Input @value={{this.buffered.subject}} />
{{/if}}
<br>
<label>{{i18n "admin.customize.email_templates.body"}}</label>
<DEditor @value={{buffered.body}} />
<DEditor @value={{this.buffered.body}} />
<SaveControls @model={{emailTemplate}} @action={{action "saveChanges"}} @saved={{saved}} @saveDisabled={{saveDisabled}}>
{{#if emailTemplate.can_revert}}
<SaveControls @model={{this.emailTemplate}} @action={{action "saveChanges"}} @saved={{this.saved}} @saveDisabled={{this.saveDisabled}}>
{{#if this.emailTemplate.can_revert}}
<DButton @action={{action "revertChanges"}} @label="admin.customize.email_templates.revert" />
{{/if}}
</SaveControls>

View File

@ -1,13 +1,13 @@
<div class="robots-txt-edit">
<h3>{{i18n "admin.customize.robots.title"}}</h3>
<p>{{i18n "admin.customize.robots.warning"}}</p>
{{#if model.overridden}}
{{#if this.model.overridden}}
<div class="overridden">
{{i18n "admin.customize.robots.overridden"}}
</div>
{{/if}}
<Textarea @value={{buffered.robots_txt}} class="robots-txt-input" />
<SaveControls @model={{this}} @action={{action "save"}} @saved={{saved}} @saveDisabled={{saveDisabled}}>
<DButton @class="btn-default" @disabled={{resetDisabled}} @icon="undo" @action={{action "reset"}} @label="admin.settings.reset" />
<Textarea @value={{this.buffered.robots_txt}} class="robots-txt-input" />
<SaveControls @model={{this}} @action={{action "save"}} @saved={{this.saved}} @saveDisabled={{this.saveDisabled}}>
<DButton @class="btn-default" @disabled={{this.resetDisabled}} @icon="undo" @action={{action "reset"}} @label="admin.settings.reset" />
</SaveControls>
</div>

View File

@ -1,23 +1,23 @@
<div class="current-style {{if maximized "maximized"}}">
<div class="current-style {{if this.maximized "maximized"}}">
<div class="wrapper">
<div class="editor-information">
<DButton @title="go_back" @action={{action "goBack"}} @icon="chevron-left" @class="btn-small editor-back-button" />
<span class="editor-theme-name-wrapper">
{{i18n "admin.customize.theme.edit_css_html"}}
<LinkTo @route={{showRouteName}} @model={{model.id}} @replace={{true}} class="editor-theme-name">
{{model.name}}
<LinkTo @route={{this.showRouteName}} @model={{this.model.id}} @replace={{true}} class="editor-theme-name">
{{this.model.name}}
</LinkTo>
</span>
</div>
<AdminThemeEditor @theme={{model}} @editRouteName={{editRouteName}} @currentTargetName={{currentTargetName}} @fieldName={{fieldName}} @fieldAdded={{action "fieldAdded"}} @maximized={{maximized}} @onlyOverriddenChanged={{action "onlyOverriddenChanged"}} @save={{action "save"}} />
<AdminThemeEditor @theme={{this.model}} @editRouteName={{this.editRouteName}} @currentTargetName={{this.currentTargetName}} @fieldName={{this.fieldName}} @fieldAdded={{action "fieldAdded"}} @maximized={{this.maximized}} @onlyOverriddenChanged={{action "onlyOverriddenChanged"}} @save={{action "save"}} />
<div class="admin-footer">
<div class="status-actions">
{{#unless model.changed}}
{{#unless this.model.changed}}
<a
href={{previewUrl}}
href={{this.previewUrl}}
rel="noopener noreferrer"
title={{i18n "admin.customize.explain_preview"}}
class="preview-link"
@ -29,7 +29,7 @@
</div>
<div class="buttons">
<DButton @action={{action "save"}} @disabled={{saveDisabled}} @class="btn-primary" @translatedLabel={{saveButtonText}} />
<DButton @action={{action "save"}} @disabled={{this.saveDisabled}} @class="btn-primary" @translatedLabel={{this.saveButtonText}} />
</div>
</div>
</div>

View File

@ -1,12 +1,12 @@
<div class="themes-intro admin-intro">
<img src={{womanArtistEmojiURL}} alt={{i18n "admin.customize.theme.themes_intro_emoji"}}>
<img src={{this.womanArtistEmojiURL}} alt={{i18n "admin.customize.theme.themes_intro_emoji"}}>
<div class="content-wrapper">
<h1>{{i18n "admin.customize.theme.themes_intro"}}</h1>
<div class="create-actions">
<DButton @action={{route-action "installModal"}} @icon="upload" @label="admin.customize.install" @class="btn-primary" />
</div>
<div class="external-resources">
{{#each externalResources as |resource|}}
{{#each this.externalResources as |resource|}}
<a href={{resource.link}} class="external-link" rel="noopener noreferrer" target="_blank">
{{d-icon resource.icon}}
{{i18n resource.key}}

View File

@ -1,41 +1,41 @@
<div class="show-current-style">
<PluginOutlet @name="admin-customize-themes-show-top" @tagName="span" @connectorTagName="div" @args={{hash theme=model}} />
<PluginOutlet @name="admin-customize-themes-show-top" @tagName="span" @connectorTagName="div" @args={{hash theme=this.model}} />
<div class="title">
{{#if editingName}}
<TextField @value={{model.name}} @autofocus="true" />
{{#if this.editingName}}
<TextField @value={{this.model.name}} @autofocus="true" />
<DButton @action={{action "finishedEditingName"}} @class="btn-primary btn-small submit-edit" @icon="check" />
<DButton @action={{action "cancelEditingName"}} @class="btn-small cancel-edit" @icon="times" />
{{else}}
<span>{{model.name}}</span>
<span>{{this.model.name}}</span>
<DButton @action={{action "startEditingName"}} @icon="pencil-alt" @class="btn-small" />
{{/if}}
</div>
{{#each model.errors as |error|}}
{{#each this.model.errors as |error|}}
<div class="alert alert-error">{{error}}</div>
{{/each}}
{{#unless model.supported}}
{{#unless this.model.supported}}
<div class="alert alert-error">
{{i18n "admin.customize.theme.required_version.error"}}
{{#if model.remote_theme.minimum_discourse_version}}
{{i18n "admin.customize.theme.required_version.minimum" version=model.remote_theme.minimum_discourse_version}}
{{#if this.model.remote_theme.minimum_discourse_version}}
{{i18n "admin.customize.theme.required_version.minimum" version=this.model.remote_theme.minimum_discourse_version}}
{{/if}}
{{#if model.remote_theme.maximum_discourse_version}}
{{i18n "admin.customize.theme.required_version.maximum" version=model.remote_theme.maximum_discourse_version}}
{{#if this.model.remote_theme.maximum_discourse_version}}
{{i18n "admin.customize.theme.required_version.maximum" version=this.model.remote_theme.maximum_discourse_version}}
{{/if}}
</div>
{{/unless}}
{{#unless model.enabled}}
{{#unless this.model.enabled}}
<div class="alert alert-error">
{{#if model.disabled_by}}
{{#if this.model.disabled_by}}
{{i18n "admin.customize.theme.disabled_by"}}
<UserLink @user={{model.disabled_by}}>
{{avatar model.disabled_by imageSize="tiny"}}
{{model.disabled_by.username}}
<UserLink @user={{this.model.disabled_by}}>
{{avatar this.model.disabled_by imageSize="tiny"}}
{{this.model.disabled_by.username}}
</UserLink>
{{format-date model.disabled_at leaveAgo="true"}}
{{format-date this.model.disabled_at leaveAgo="true"}}
{{else}}
{{i18n "admin.customize.theme.disabled"}}
{{/if}}
@ -44,72 +44,72 @@
{{/unless}}
<div class="metadata control-unit">
{{#if model.remote_theme}}
{{#if model.remote_theme.remote_url}}
{{#if sourceIsHttp}}
<a class="remote-url" href={{remoteThemeLink}}>{{i18n "admin.customize.theme.source_url"}}{{d-icon "link"}}</a>
{{#if this.model.remote_theme}}
{{#if this.model.remote_theme.remote_url}}
{{#if this.sourceIsHttp}}
<a class="remote-url" href={{this.remoteThemeLink}}>{{i18n "admin.customize.theme.source_url"}}{{d-icon "link"}}</a>
{{else}}
<div class="remote-url">
<code>{{model.remote_theme.remote_url}}</code>
{{#if model.remote_theme.branch}}
(<code>{{model.remote_theme.branch}}</code>)
<code>{{this.model.remote_theme.remote_url}}</code>
{{#if this.model.remote_theme.branch}}
(<code>{{this.model.remote_theme.branch}}</code>)
{{/if}}
</div>
{{/if}}
{{/if}}
{{#if model.remote_theme.about_url}}
<a class="url about-url" href={{model.remote_theme.about_url}}>{{i18n "admin.customize.theme.about_theme"}}{{d-icon "link"}}</a>
{{#if this.model.remote_theme.about_url}}
<a class="url about-url" href={{this.model.remote_theme.about_url}}>{{i18n "admin.customize.theme.about_theme"}}{{d-icon "link"}}</a>
{{/if}}
{{#if model.remote_theme.license_url}}
<a class="url license-url" href={{model.remote_theme.license_url}}>{{i18n "admin.customize.theme.license"}}{{d-icon "link"}}</a>
{{#if this.model.remote_theme.license_url}}
<a class="url license-url" href={{this.model.remote_theme.license_url}}>{{i18n "admin.customize.theme.license"}}{{d-icon "link"}}</a>
{{/if}}
{{#if model.description}}
<span class="theme-description">{{model.description}}</span>
{{#if this.model.description}}
<span class="theme-description">{{this.model.description}}</span>
{{/if}}
{{#if model.remote_theme.authors}}<span class="authors"><span class="heading">{{i18n "admin.customize.theme.authors"}}</span> {{model.remote_theme.authors}}</span>{{/if}}
{{#if model.remote_theme.theme_version}}<span class="version"><span class="heading">{{i18n "admin.customize.theme.version"}}</span> {{model.remote_theme.theme_version}}</span>{{/if}}
{{#if this.model.remote_theme.authors}}<span class="authors"><span class="heading">{{i18n "admin.customize.theme.authors"}}</span> {{this.model.remote_theme.authors}}</span>{{/if}}
{{#if this.model.remote_theme.theme_version}}<span class="version"><span class="heading">{{i18n "admin.customize.theme.version"}}</span> {{this.model.remote_theme.theme_version}}</span>{{/if}}
<div class="control-unit">
{{#if model.remote_theme.is_git}}
{{#if this.model.remote_theme.is_git}}
<div class="alert alert-info">
{{html-safe (i18n "admin.customize.theme.remote_theme_edits" repoURL=remoteThemeLink)}}
{{html-safe (i18n "admin.customize.theme.remote_theme_edits" repoURL=this.remoteThemeLink)}}
</div>
{{#if showRemoteError}}
{{#if this.showRemoteError}}
<div class="error-message">
{{d-icon "exclamation-triangle"}} {{i18n "admin.customize.theme.repo_unreachable"}}
</div>
<div class="raw-error">
<code>{{model.remoteError}}</code>
<code>{{this.model.remoteError}}</code>
</div>
{{/if}}
{{#if model.remote_theme.commits_behind}}
{{#if this.model.remote_theme.commits_behind}}
<DButton @action={{action "updateToLatest"}} @icon="download" @class="btn-primary" @label="admin.customize.theme.update_to_latest" />
{{else}}
<DButton @action={{action "checkForThemeUpdates"}} @icon="sync" @class="btn-default" @label="admin.customize.theme.check_for_updates" />
{{/if}}
<span class="status-message">
{{#if updatingRemote}}
{{#if this.updatingRemote}}
{{i18n "admin.customize.theme.updating"}}
{{else}}
{{#if model.remote_theme.commits_behind}}
{{#if hasOverwrittenHistory}}
{{#if this.model.remote_theme.commits_behind}}
{{#if this.hasOverwrittenHistory}}
{{i18n "admin.customize.theme.has_overwritten_history"}}
{{else}}
{{i18n "admin.customize.theme.commits_behind" count=model.remote_theme.commits_behind}}
{{i18n "admin.customize.theme.commits_behind" count=this.model.remote_theme.commits_behind}}
{{/if}}
{{#if model.remote_theme.github_diff_link}}
<a href={{model.remote_theme.github_diff_link}}>
{{#if this.model.remote_theme.github_diff_link}}
<a href={{this.model.remote_theme.github_diff_link}}>
{{i18n "admin.customize.theme.compare_commits"}}
</a>
{{/if}}
{{else}}
{{#unless showRemoteError}}
{{i18n "admin.customize.theme.up_to_date"}} {{format-date model.remote_theme.updated_at leaveAgo="true"}}
{{#unless this.showRemoteError}}
{{i18n "admin.customize.theme.up_to_date"}} {{format-date this.model.remote_theme.updated_at leaveAgo="true"}}
{{/unless}}
{{/if}}
{{/if}}
@ -123,40 +123,40 @@
{{else}}
<span class="heading">{{i18n "admin.customize.theme.creator"}}</span>
<span>
<UserLink @user={{model.user}}>
{{format-username model.user.username}}
<UserLink @user={{this.model.user}}>
{{format-username this.model.user.username}}
</UserLink>
</span>
{{/if}}
</div>
{{#if showCheckboxes}}
{{#if this.showCheckboxes}}
<div class="control-unit">
{{#unless model.component}}
<InlineEditCheckbox @action={{action "applyDefault"}} @labelKey="admin.customize.theme.is_default" @checked={{model.default}} @modelId={{model.id}} />
<InlineEditCheckbox @action={{action "applyUserSelectable"}} @labelKey="admin.customize.theme.user_selectable" @checked={{model.user_selectable}} @modelId={{model.id}} />
{{#unless this.model.component}}
<InlineEditCheckbox @action={{action "applyDefault"}} @labelKey="admin.customize.theme.is_default" @checked={{this.model.default}} @modelId={{this.model.id}} />
<InlineEditCheckbox @action={{action "applyUserSelectable"}} @labelKey="admin.customize.theme.user_selectable" @checked={{this.model.user_selectable}} @modelId={{this.model.id}} />
{{/unless}}
{{#if model.remote_theme}}
<InlineEditCheckbox @action={{action "applyAutoUpdateable"}} @labelKey="admin.customize.theme.auto_update" @checked={{model.auto_update}} @modelId={{model.id}} />
{{#if this.model.remote_theme}}
<InlineEditCheckbox @action={{action "applyAutoUpdateable"}} @labelKey="admin.customize.theme.auto_update" @checked={{this.model.auto_update}} @modelId={{this.model.id}} />
{{/if}}
</div>
{{/if}}
{{#unless model.component}}
{{#unless this.model.component}}
<DSection @class="form-horizontal theme settings control-unit">
<div class="row setting">
<div class="setting-label">
{{i18n "admin.customize.theme.color_scheme"}}
</div>
<div class="setting-value">
<ColorPalettes @content={{colorSchemes}} @value={{colorSchemeId}} @icon="paint-brush" @options={{hash
<ColorPalettes @content={{this.colorSchemes}} @value={{this.colorSchemeId}} @icon="paint-brush" @options={{hash
filterable=true
}} />
<div class="desc">{{i18n "admin.customize.theme.color_scheme_select"}}</div>
</div>
<div class="setting-controls">
{{#if colorSchemeChanged}}
{{#if this.colorSchemeChanged}}
<DButton @action={{action "changeScheme"}} @class="ok submit-edit" @icon="check" />
<DButton @action={{action "cancelChangeScheme"}} @class="cancel cancel-edit" @icon="times" />
{{/if}}
@ -165,38 +165,38 @@
</DSection>
{{/unless}}
{{#if parentThemes}}
{{#if this.parentThemes}}
<div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.component_of"}}</div>
<ul>
{{#each parentThemes as |theme|}}
{{#each this.parentThemes as |theme|}}
<li><LinkTo @route="adminCustomizeThemes.show" @model={{theme}} @replace={{true}}>{{theme.name}}</LinkTo></li>
{{/each}}
</ul>
</div>
{{/if}}
{{#if model.component}}
{{#if this.model.component}}
<DSection @class="form-horizontal theme settings control-unit">
<div class="row setting">
<ThemeSettingRelativesSelector @setting={{relativesSelectorSettingsForComponent}} @model={{model}} @class="theme-setting" />
<ThemeSettingRelativesSelector @setting={{this.relativesSelectorSettingsForComponent}} @model={{this.model}} @class="theme-setting" />
</div>
</DSection>
{{else}}
<DSection @class="form-horizontal theme settings control-unit">
<div class="row setting">
<ThemeSettingRelativesSelector @setting={{relativesSelectorSettingsForTheme}} @model={{model}} @class="theme-setting" />
<ThemeSettingRelativesSelector @setting={{this.relativesSelectorSettingsForTheme}} @model={{this.model}} @class="theme-setting" />
</div>
</DSection>
{{/if}}
{{#unless model.remote_theme.is_git}}
{{#unless this.model.remote_theme.is_git}}
<div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.css_html"}}</div>
{{#if model.hasEditedFields}}
{{#if this.model.hasEditedFields}}
<div class="description">{{i18n "admin.customize.theme.custom_sections"}}</div>
<ul>
{{#each editedFieldsFormatted as |field|}}
{{#each this.editedFieldsFormatted as |field|}}
<li>{{field}}</li>
{{/each}}
</ul>
@ -211,9 +211,9 @@
<div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.uploads"}}</div>
{{#if model.uploads}}
{{#if this.model.uploads}}
<ul class="removable-list">
{{#each model.uploads as |upload|}}
{{#each this.model.uploads as |upload|}}
<li>
<span class="col">${{upload.name}}: <a href={{upload.url}} rel="noopener noreferrer" target="_blank">{{upload.filename}}</a></span>
<span class="col">
@ -229,19 +229,19 @@
</div>
{{/unless}}
{{#if extraFiles.length}}
{{#if this.extraFiles.length}}
<div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.extra_files"}}</div>
<details>
<summary>
{{#if model.remote_theme}}
{{#if this.model.remote_theme}}
{{i18n "admin.customize.theme.extra_files_remote"}}
{{else}}
{{i18n "admin.customize.theme.extra_files_upload"}}
{{/if}}
</summary>
<ul>
{{#each extraFiles as |extraFile|}}
{{#each this.extraFiles as |extraFile|}}
<li>{{extraFile.name}}</li>
{{/each}}
</ul>
@ -249,23 +249,23 @@
</div>
{{/if}}
{{#if hasSettings}}
{{#if this.hasSettings}}
<div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.theme_settings"}}</div>
<DSection @class="form-horizontal theme settings control-unit">
{{#each settings as |setting|}}
<ThemeSettingEditor @setting={{setting}} @model={{model}} @class="theme-setting control-unit" />
{{#each this.settings as |setting|}}
<ThemeSettingEditor @setting={{setting}} @model={{this.model}} @class="theme-setting control-unit" />
{{/each}}
</DSection>
</div>
{{/if}}
{{#if hasTranslations}}
{{#if this.hasTranslations}}
<div class="control-unit">
<div class="mini-title">{{i18n "admin.customize.theme.theme_translations"}}</div>
<DSection @class="form-horizontal theme settings translations control-unit">
{{#each translations as |translation|}}
<ThemeTranslation @translation={{translation}} @model={{model}} @class="theme-translation" />
{{#each this.translations as |translation|}}
<ThemeTranslation @translation={{translation}} @model={{this.model}} @class="theme-translation" />
{{/each}}
</DSection>
</div>
@ -273,15 +273,15 @@
<div class="theme-controls">
<a href={{previewUrl}} title={{i18n "admin.customize.explain_preview"}} rel="noopener noreferrer" target="_blank" class="btn btn-default">{{d-icon "desktop"}}{{i18n "admin.customize.theme.preview"}}</a>
<a class="btn btn-default export" rel="noopener noreferrer" target="_blank" href={{downloadUrl}}>{{d-icon "download"}} {{i18n "admin.export_json.button_text"}}</a>
<a href={{this.previewUrl}} title={{i18n "admin.customize.explain_preview"}} rel="noopener noreferrer" target="_blank" class="btn btn-default">{{d-icon "desktop"}}{{i18n "admin.customize.theme.preview"}}</a>
<a class="btn btn-default export" rel="noopener noreferrer" target="_blank" href={{this.downloadUrl}}>{{d-icon "download"}} {{i18n "admin.export_json.button_text"}}</a>
{{#if showConvert}}
<DButton @action={{action "switchType"}} @label="admin.customize.theme.convert" @icon={{convertIcon}} @class="btn-default btn-normal" @title={{convertTooltip}} />
{{#if this.showConvert}}
<DButton @action={{action "switchType"}} @label="admin.customize.theme.convert" @icon={{this.convertIcon}} @class="btn-default btn-normal" @title={{this.convertTooltip}} />
{{/if}}
{{#if model.component}}
{{#if model.enabled}}
{{#if this.model.component}}
{{#if this.model.enabled}}
<DButton @class="btn-default" @action={{action "disableComponent"}} @icon="ban" @label="admin.customize.theme.disable" />
{{else}}
<DButton @class="btn-default" @action={{action "enableComponent"}} @icon="check" @label="admin.customize.theme.enable" />

View File

@ -1,5 +1,5 @@
{{#unless editingTheme}}
<ThemesList @themes={{fullThemes}} @components={{childThemes}} @currentTab={{currentTab}} @installModal={{route-action "installModal"}} />
{{#unless this.editingTheme}}
<ThemesList @themes={{this.fullThemes}} @components={{this.childThemes}} @currentTab={{this.currentTab}} @installModal={{route-action "installModal"}} />
{{/unless}}
{{outlet}}

View File

@ -1,5 +1,5 @@
<AdminNav>
{{#if currentUser.admin}}
{{#if this.currentUser.admin}}
<NavItem @route="adminCustomizeThemes" @label="admin.customize.theme.title" @class="admin-customize-themes" />
<NavItem @route="adminCustomize.colors" @label="admin.customize.colors.title" @class="admin-customize-colors" />
<NavItem @route="adminSiteText" @label="admin.site_text.title" @class="admin-customize-site-text" />

Some files were not shown because too many files have changed in this diff Show More