From 97c45929501ab70de696ee053c908cf80ed0b376 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 18 Jul 2017 21:21:09 +0100 Subject: [PATCH] Display provider-specific data for each channel in the UI --- .../templates/admin/plugins-chat-provider.hbs | 9 ++++++++- .../templates/components/channel-details.hbs | 11 ++++++++++- assets/stylesheets/chat-integration-admin.scss | 6 ++---- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/assets/javascripts/discourse/templates/admin/plugins-chat-provider.hbs b/assets/javascripts/discourse/templates/admin/plugins-chat-provider.hbs index 86d57c4..7dc72fa 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-chat-provider.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-chat-provider.hbs @@ -7,7 +7,14 @@ {{/if}} {{# each model.channels as |channel|}} - {{channel-details channel=channel provider=provider store=store refresh='refresh' edit='editChannel' test='testChannel'}} + {{channel-details + channel=channel + provider=model.provider + store=store + refresh='refresh' + edit='editChannel' + test='testChannel' + }} {{/each}} diff --git a/assets/javascripts/discourse/templates/components/channel-details.hbs b/assets/javascripts/discourse/templates/components/channel-details.hbs index ed9a5d1..d3ce21d 100644 --- a/assets/javascripts/discourse/templates/components/channel-details.hbs +++ b/assets/javascripts/discourse/templates/components/channel-details.hbs @@ -1,5 +1,4 @@
- {{channel.data.identifier}}
{{d-button action="edit" actionParam=channel icon="pencil" title="chat_integration.edit_channel" label="chat_integration.edit_channel"}} @@ -7,6 +6,16 @@ {{d-button class='cancel' action="delete" actionParam=channel icon="trash" title="chat_integration.delete_channel" label="chat_integration.delete_channel"}}
+ + + {{# each provider.channel_parameters as |param|}} + {{i18n (concat 'chat_integration.provider.' channel.provider '.param.' param.key '.title')}}: + {{get channel.data param.key}}
+ + {{/each}} + +
+
diff --git a/assets/stylesheets/chat-integration-admin.scss b/assets/stylesheets/chat-integration-admin.scss index c9b7a71..60e45b2 100644 --- a/assets/stylesheets/chat-integration-admin.scss +++ b/assets/stylesheets/chat-integration-admin.scss @@ -6,12 +6,12 @@ white-space:nowrap; } td:not(:last-child){ - width: 25%; + width: 30%; } } div.table-footer{ - margin-top: 10px; + margin: 10px; } div.error { @@ -22,8 +22,6 @@ margin-bottom: 10px; background-color: dark-light-diff($quaternary, $secondary, 70%, -70%); padding: 15px; - - } div.channel-details{