diff --git a/app/assets/javascripts/admin/controllers/admin-plugins.js.es6 b/app/assets/javascripts/admin/controllers/admin-plugins.js.es6 index ae7f95915d9..5e91ad297da 100644 --- a/app/assets/javascripts/admin/controllers/admin-plugins.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-plugins.js.es6 @@ -7,5 +7,14 @@ export default Ember.Controller.extend({ } }) .compact(); - }.property() + }.property(), + actions: { + clearFilter() { + this.setProperties({ filter: "", onlyOverridden: false }); + }, + + toggleMenu() { + $(".admin-detail").toggleClass("mobile-closed mobile-open"); + } + } }); diff --git a/app/assets/javascripts/admin/templates/admin.hbs b/app/assets/javascripts/admin/templates/admin.hbs index cf4d231d4ed..495a51cf460 100644 --- a/app/assets/javascripts/admin/templates/admin.hbs +++ b/app/assets/javascripts/admin/templates/admin.hbs @@ -1,8 +1,10 @@ {{#admin-wrapper class="container"}}
-
+
+
+
+
diff --git a/app/assets/javascripts/admin/templates/api-keys.hbs b/app/assets/javascripts/admin/templates/api-keys.hbs index b25eebd69a6..e1907da87ff 100644 --- a/app/assets/javascripts/admin/templates/api-keys.hbs +++ b/app/assets/javascripts/admin/templates/api-keys.hbs @@ -1,33 +1,35 @@ {{#if model}} - - +
+ - - {{#each model as |k|}} - - - - - - {{/each}} + + + {{#each model as |k|}} + + + + + + {{/each}} +
{{i18n 'admin.api.key'}} {{i18n 'admin.api.user'}}  
{{k.key}} - {{#if k.user}} - {{#link-to 'adminUser' k.user}} - {{avatar k.user imageSize="small"}} - {{/link-to}} - {{else}} - {{i18n 'admin.api.all_users'}} - {{/if}} - - {{d-button action="regenerateKey" actionParam=k icon="undo" label='admin.api.regenerate'}} - {{d-button action="revokeKey" actionParam=k icon="times" label='admin.api.revoke'}} -
{{k.key}} + {{#if k.user}} + {{#link-to 'adminUser' k.user}} + {{avatar k.user imageSize="small"}} + {{/link-to}} + {{else}} + {{i18n 'admin.api.all_users'}} + {{/if}} + + {{d-button action="regenerateKey" actionParam=k icon="undo" label='admin.api.regenerate'}} + {{d-button action="revokeKey" actionParam=k icon="times" label='admin.api.revoke'}} +
{{else}}

{{i18n 'admin.api.none'}}

{{/if}} {{#unless hasMasterKey}} - + {{/unless}} diff --git a/app/assets/javascripts/admin/templates/backups-index.hbs b/app/assets/javascripts/admin/templates/backups-index.hbs index a8220a4e1ac..3b20c7935e6 100644 --- a/app/assets/javascripts/admin/templates/backups-index.hbs +++ b/app/assets/javascripts/admin/templates/backups-index.hbs @@ -1,9 +1,4 @@ - - - - - - +
{{i18n 'admin.backups.columns.filename'}}{{i18n 'admin.backups.columns.size'}} -
+
{{resumable-upload target="/admin/backups/upload" success="uploadSuccess" error="uploadError" uploadText=uploadLabel title="admin.backups.upload.title"}} {{#if site.isReadOnly}} {{d-button icon="eye" action="toggleReadOnlyMode" disabled=status.isOperationRunning title="admin.backups.read_only.disable.title" label="admin.backups.read_only.disable.label"}} @@ -11,14 +6,19 @@ {{d-button icon="eye" action="toggleReadOnlyMode" disabled=status.isOperationRunning title="admin.backups.read_only.enable.title" label="admin.backups.read_only.enable.label"}} {{/if}}
-
+ + + + + + {{#each model as |backup|}} - - - + + {{/each}} +
{{i18n 'admin.backups.columns.filename'}}{{i18n 'admin.backups.columns.size'}}
{{backup.filename}}{{human-size backup.size}} -
+
{{backup.filename}}{{human-size backup.size}} +
{{d-button class="download" action="download" actionParam=backup @@ -42,4 +42,5 @@
diff --git a/app/assets/javascripts/admin/templates/backups.hbs b/app/assets/javascripts/admin/templates/backups.hbs index 33229e22534..ac36550404c 100644 --- a/app/assets/javascripts/admin/templates/backups.hbs +++ b/app/assets/javascripts/admin/templates/backups.hbs @@ -5,9 +5,7 @@ {{nav-item route='admin.backups.index' label='admin.backups.menu.backups'}} {{nav-item route='admin.backups.logs' label='admin.backups.menu.logs'}} {{plugin-outlet name="downloader" tagName=""}} - - -
+
{{#if model.canRollback}} {{d-button action="rollback" class="btn-rollback" @@ -30,6 +28,10 @@ icon="rocket"}} {{/if}}
+ + + +
diff --git a/app/assets/javascripts/admin/templates/components/embeddable-host.hbs b/app/assets/javascripts/admin/templates/components/embeddable-host.hbs index e21685831b5..07f635bcf68 100644 --- a/app/assets/javascripts/admin/templates/components/embeddable-host.hbs +++ b/app/assets/javascripts/admin/templates/components/embeddable-host.hbs @@ -1,27 +1,31 @@ {{#if editing}} - + +
{{i18n "admin.embedding.host"}}
{{input value=buffered.host placeholder="example.com" enter="save" class="host-name"}} - + +
{{i18n "admin.embedding.class_name"}}
{{input value=buffered.class_name placeholder="class" enter="save" class="class-name"}} - + +
{{i18n "admin.embedding.path_whitelist"}}
{{input value=buffered.path_whitelist placeholder="/blog/.*" enter="save" class="path-whitelist"}} - + +
{{i18n "admin.embedding.category"}}
{{category-chooser value=categoryId class="small"}} - + {{d-button icon="check" action="save" class="btn-primary" disabled=cantSave}} {{d-button icon="times" action="cancel" class="btn-danger" disabled=host.isSaving}} {{else}} - {{host.host}} - {{host.class_name}} - {{host.path_whitelist}} - {{category-badge host.category}} - +
{{i18n "admin.embedding.host"}}
{{host.host}} +
{{i18n "admin.embedding.class_name"}}
{{host.class_name}} +
{{i18n "admin.embedding.path_whitelist"}}
{{host.path_whitelist}} +
{{i18n "admin.embedding.category"}}
{{category-badge host.category}} + {{d-button icon="pencil" action="edit"}} {{d-button icon="trash-o" action="delete" class='btn-danger'}} -{{/if}} +{{/if}} \ No newline at end of file diff --git a/app/assets/javascripts/admin/templates/embedding.hbs b/app/assets/javascripts/admin/templates/embedding.hbs index 752f7a920db..d9e97c1c5a1 100644 --- a/app/assets/javascripts/admin/templates/embedding.hbs +++ b/app/assets/javascripts/admin/templates/embedding.hbs @@ -1,16 +1,18 @@
{{#if embedding.embeddable_hosts}} - - +
+ - + + {{#each embedding.embeddable_hosts as |host|}} {{embeddable-host host=host deleteHost="deleteHost"}} {{/each}} +
{{i18n "admin.embedding.host"}} {{i18n "admin.embedding.class_name"}} {{i18n "admin.embedding.path_whitelist"}} {{i18n "admin.embedding.category"}}  
{{else}}

{{i18n "admin.embedding.get_started"}}

diff --git a/app/assets/javascripts/admin/templates/flags-topics-index.hbs b/app/assets/javascripts/admin/templates/flags-topics-index.hbs index 5ece61b6b72..9a37bc78fcd 100644 --- a/app/assets/javascripts/admin/templates/flags-topics-index.hbs +++ b/app/assets/javascripts/admin/templates/flags-topics-index.hbs @@ -1,7 +1,7 @@ {{plugin-outlet name="flagged-topics-before" noTags=true args=(hash flaggedTopics=flaggedTopics)}} {{#if flaggedTopics}} - +
{{plugin-outlet name="flagged-topic-header-row" noTags=true}} @@ -10,7 +10,7 @@ - + {{#each flaggedTopics as |ft|}} {{plugin-outlet name="flagged-topic-row" noTags=true args=(hash topic=ft.topic)}} @@ -18,7 +18,7 @@ - - - {{/each}} +
{{i18n "admin.flags.flagged_topics.topic"}} {{i18n "admin.flags.flagged_topics.last_flagged"}}
{{replace-emoji ft.topic.fancy_title}} + {{#each ft.flag_counts as |fc|}}
{{post-action-title fc.post_action_type_id fc.name_key}} @@ -29,10 +29,10 @@
{{flagged-topic-users users=ft.users tagName=""}} + {{format-age ft.last_flag_at}} + {{#link-to "adminFlags.topics.show" ft.id @@ -44,6 +44,7 @@
{{else}} {{i18n "admin.flags.flagged_topics.no_results"}} diff --git a/app/assets/javascripts/admin/templates/logs/screened-emails.hbs b/app/assets/javascripts/admin/templates/logs/screened-emails.hbs index f99ff865e15..b370ae419f7 100644 --- a/app/assets/javascripts/admin/templates/logs/screened-emails.hbs +++ b/app/assets/javascripts/admin/templates/logs/screened-emails.hbs @@ -1,6 +1,6 @@

{{i18n 'admin.logs.screened_emails.description'}} - +


diff --git a/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs b/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs index e8ee4d896dd..4c1654c0f27 100644 --- a/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs +++ b/app/assets/javascripts/admin/templates/logs/screened-ip-addresses.hbs @@ -1,32 +1,32 @@

{{i18n 'admin.logs.screened_ips.description'}}

-
- {{text-field value=filter class="ip-address-input" placeholderKey="admin.logs.screened_ips.form.filter" autocorrect="off" autocapitalize="off"}} - {{d-button action="rollUp" title="admin.logs.screened_ips.roll_up.title" label="admin.logs.screened_ips.roll_up.text"}} - {{d-button action="exportScreenedIpList" icon="download" title="admin.export_csv.button_title.screened_ip" label="admin.export_csv.button_text"}} +
+
+ {{text-field value=filter class="ip-address-input" placeholderKey="admin.logs.screened_ips.form.filter" autocorrect="off" autocapitalize="off"}} + {{d-button action="rollUp" title="admin.logs.screened_ips.roll_up.title" label="admin.logs.screened_ips.roll_up.text"}} + {{d-button action="exportScreenedIpList" icon="download" title="admin.export_csv.button_title.screened_ip" label="admin.export_csv.button_text"}} +
+ {{screened-ip-address-form action="recordAdded"}}
-
- {{screened-ip-address-form action="recordAdded"}} -
+ {{#conditional-loading-spinner condition=loading}} {{#if model.length}} -
-
-
{{i18n 'admin.logs.ip_address'}}
-
{{i18n 'admin.logs.action'}}
-
{{i18n 'admin.logs.match_count'}}
-
{{i18n 'admin.logs.last_match_at'}}
-
{{i18n 'admin.logs.created_at'}}
-
-
-
- + + + + + + + + + + {{#each model as |item|}} -
-
+
+ + + + + + + + {{/each}} - + +
{{i18n 'admin.logs.ip_address'}}{{i18n 'admin.logs.action'}}{{i18n 'admin.logs.match_count'}}{{i18n 'admin.logs.created_at'}}{{i18n 'admin.logs.last_match_at'}}
{{#if item.editing}} {{text-field value=item.ip_address autofocus="autofocus"}} {{else}} @@ -38,23 +38,24 @@ {{/if}} {{/if}} - -
+
{{#if item.isBlocked}} {{d-icon "ban"}} {{else}} {{d-icon "check"}} {{/if}} {{item.actionName}} - -
{{item.match_count}}
-
+
{{i18n 'admin.logs.match_count'}}
{{item.match_count}}
{{i18n 'admin.logs.created_at'}}
{{age-with-tooltip item.created_at}}
{{#if item.last_match_at}} - {{age-with-tooltip item.last_match_at}} +
{{i18n 'admin.logs.last_match_at'}} {{age-with-tooltip item.last_match_at}}
{{/if}} - -
{{age-with-tooltip item.created_at}}
-
+
{{#unless item.editing}} {{d-button action="destroy" actionParam=item icon="trash-o" class="btn-danger"}} {{d-button action="edit" actionParam=item icon="pencil"}} @@ -67,11 +68,11 @@ {{d-button action="save" actionParam=item label="admin.logs.save"}} {{i18n 'cancel'}} {{/unless}} - -
- +
{{else}} {{i18n 'search.no_results'}} diff --git a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs index 3445abf8df5..594dd18a314 100644 --- a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs +++ b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs @@ -32,58 +32,67 @@ {{else}} {{i18n "admin.logs.staff_actions.filter"}} {{combo-box content=userHistoryActions value=filterActionId none="admin.logs.staff_actions.all"}} {{/if}} - -
- {{d-button action="exportStaffActionLogs" label="admin.export_csv.button_text" icon="download"}} -
+ + {{d-button action="exportStaffActionLogs" label="admin.export_csv.button_text" icon="download"}}
{{#staff-actions}} -
-
{{i18n 'admin.logs.staff_actions.staff_user'}}
-
{{i18n 'admin.logs.action'}}
-
{{i18n 'admin.logs.staff_actions.subject'}}
-
{{i18n 'admin.logs.staff_actions.when'}}
-
{{i18n 'admin.logs.staff_actions.details'}}
-
{{i18n 'admin.logs.staff_actions.context'}}
-
-
- {{#conditional-loading-spinner condition=loading}} + + + + + + + + + + + + + + {{#each model as |item|}} -
-
+
+ + + + + + + {{else}} {{i18n 'search.no_results'}} {{/each}} + +
{{i18n 'admin.logs.staff_actions.staff_user'}}{{i18n 'admin.logs.action'}}{{i18n 'admin.logs.staff_actions.subject'}}{{i18n 'admin.logs.staff_actions.when'}}{{i18n 'admin.logs.staff_actions.details'}}{{i18n 'admin.logs.staff_actions.context'}}
+
{{#link-to 'adminUser' item.acting_user}}{{avatar item.acting_user imageSize="tiny"}}{{/link-to}} - {{item.acting_user.username}} -
- - +
+ {{item.actionName}} + +
+ {{#if item.target_user}} {{#link-to 'adminUser' item.target_user}}{{avatar item.target_user imageSize="tiny"}}{{/link-to}} - {{item.target_user.username}} + {{item.target_user.username}} {{/if}} {{#if item.subject}} - {{item.subject}} + {{item.subject}} {{/if}} -
-
{{age-with-tooltip item.created_at}}
-
+
+
{{age-with-tooltip item.created_at}} {{{item.formattedDetails}}} {{#if item.useCustomModalForDetails}} - {{i18n 'admin.logs.staff_actions.show'}} + {{d-icon "info-circle"}} {{i18n 'admin.logs.staff_actions.show'}} {{/if}} {{#if item.useModalForDetails}} - {{i18n 'admin.logs.staff_actions.show'}} + {{d-icon "info-circle"}} {{i18n 'admin.logs.staff_actions.show'}} {{/if}} - -
{{item.context}}
-
- +
{{item.context}}
{{/conditional-loading-spinner}} + {{/staff-actions}} diff --git a/app/assets/javascripts/admin/templates/permalinks.hbs b/app/assets/javascripts/admin/templates/permalinks.hbs index 3ff0b00539f..068d1afdcaf 100644 --- a/app/assets/javascripts/admin/templates/permalinks.hbs +++ b/app/assets/javascripts/admin/templates/permalinks.hbs @@ -7,46 +7,44 @@ {{#conditional-loading-spinner condition=loading}} {{#if model.length}} -