UX: modifies admin email template to have more space for the form (#7993)

UX: modifies admin email template to have more space for the form (#7993)

diff --git a/app/assets/javascripts/admin/controllers/admin-customize-email-templates.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-email-templates.js.es6
index 7bf7659..8631bab 100644
--- a/app/assets/javascripts/admin/controllers/admin-customize-email-templates.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-customize-email-templates.js.es6
@@ -6,5 +6,11 @@ export default Ember.Controller.extend({
     this._super(...arguments);
 
     this.titleSorting = ["title"];
+  },
+
+  actions: {
+    selectTemplate(template) {
+      this.transitionToRoute("adminCustomizeEmailTemplates.edit", template);
+    }
   }
 });
diff --git a/app/assets/javascripts/admin/templates/customize-email-templates.hbs b/app/assets/javascripts/admin/templates/customize-email-templates.hbs
index 7dd95b0..d89624e 100644
--- a/app/assets/javascripts/admin/templates/customize-email-templates.hbs
+++ b/app/assets/javascripts/admin/templates/customize-email-templates.hbs
@@ -1,15 +1,8 @@
-<div class='row'>
-  <div class='content-list'>
-    <ul>
-      {{#each sortedTemplates as |et|}}
-        <li>
-          {{#link-to 'adminCustomizeEmailTemplates.edit' et}}{{et.title}}{{/link-to}}
-        </li>
-      {{/each}}
-    </ul>
-  </div>
+{{combo-box
+  content=sortedTemplates
+  valueAttribute="id"
+  nameProperty="title"
+  onSelect=(action "selectTemplate")
+}}
 
-  <div class='content-editor'>
-    {{outlet}}
-  </div>
-</div>
+{{outlet}}
diff --git a/app/assets/stylesheets/common/admin/customize.scss b/app/assets/stylesheets/common/admin/customize.scss
index ce30f49..11c3a5c 100644
--- a/app/assets/stylesheets/common/admin/customize.scss
+++ b/app/assets/stylesheets/common/admin/customize.scss
@@ -791,6 +791,17 @@
   }
 }
 
+.admin-customize-email-templates {
+  .email-template,
+  .controls {
+    margin-top: 1em;
+  }
+
+  .d-editor {
+    height: 50vh;
+  }
+}
+
 .admin-customize-email-style {
   .ace-wrapper {
     position: relative;

GitHub sha: 731f61a8

1 Like