UX: Minor layout fixes and improved consistency on theme admin

UX: Minor layout fixes and improved consistency on theme admin

diff --git a/app/assets/javascripts/admin/templates/customize-themes-show.hbs b/app/assets/javascripts/admin/templates/customize-themes-show.hbs
index 0e452a9..73d78b0 100644
--- a/app/assets/javascripts/admin/templates/customize-themes-show.hbs
+++ b/app/assets/javascripts/admin/templates/customize-themes-show.hbs
@@ -2,13 +2,14 @@
   <div class="title">
     {{#if editingName}}
       {{text-field value=model.name autofocus="true"}}
-      {{d-button action=(action "finishedEditingName") class="btn-primary submit-edit" icon="check"}}
-      {{d-button action=(action "cancelEditingName") class="cancel-edit" icon="times"}}
+      {{d-button action=(action "finishedEditingName") class="btn-primary btn-small submit-edit" icon="check"}}
+      {{d-button action=(action "cancelEditingName") class="btn-small cancel-edit" icon="times"}}
     {{else}}
       <span>{{model.name}}</span>
       {{d-button
         action=(action "startEditingName")
         icon="pencil-alt"
+        class="btn-small"
       }}
     {{/if}}
   </div>
@@ -52,93 +53,92 @@
     </div>
   {{/unless}}
 
-  {{#unless model.component}}
-    <div class="control-unit">
-      {{inline-edit-checkbox action=(action "applyDefault") labelKey="admin.customize.theme.is_default" checked=model.default}}
-      {{inline-edit-checkbox action=(action "applyUserSelectable") labelKey="admin.customize.theme.user_selectable" checked=model.user_selectable}}
-    </div>
-  {{/unless}}
-
-  {{#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>
-      {{else}}
-        <div class="remote-url"><code>{{model.remote_theme.remote_url}}</code></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}}
-    {{#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}}
-
-    {{#if model.description}}
-      <span class="theme-description">{{model.description}}</span>
-    {{/if}}
+  <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>
+          {{else}}
+            <div class="remote-url"><code>{{model.remote_theme.remote_url}}</code></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}}
+        {{#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}}
 
-    <span class="metadata">
-      {{#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}}
-    </span>
+        {{#if model.description}}
+          <span class="theme-description">{{model.description}}</span>
+        {{/if}}
 
-    <div class="control-unit">
-      {{#if model.remote_theme.is_git}}
+        {{#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 showRemoteError}}
-          <div class="error-message">
-            {{d-icon "exclamation-triangle"}} {{i18n "admin.customize.theme.repo_unreachable"}}
-          </div>
-          <div class="raw-error">
-            <code>{{model.remoteError}}</code>
-          </div>
-        {{/if}}
+      <div class="control-unit">
+        {{#if model.remote_theme.is_git}}
 
-        {{#if model.remote_theme.commits_behind}}
-          {{#d-button action=(action "updateToLatest") icon="download" class="btn-primary"}}{{i18n "admin.customize.theme.update_to_latest"}}{{/d-button}}
-        {{else}}
-          {{#d-button action=(action "checkForThemeUpdates") icon="sync" class="btn-default"}}{{i18n "admin.customize.theme.check_for_updates"}}{{/d-button}}
-        {{/if}}
+          {{#if showRemoteError}}
+            <div class="error-message">
+              {{d-icon "exclamation-triangle"}} {{i18n "admin.customize.theme.repo_unreachable"}}
+            </div>
+            <div class="raw-error">
+              <code>{{model.remoteError}}</code>
+            </div>
+          {{/if}}
 
-        <span class="status-message">
-          {{#if updatingRemote}}
-            {{i18n "admin.customize.theme.updating"}}
+          {{#if model.remote_theme.commits_behind}}
+            {{d-button action=(action "updateToLatest") icon="download" class="btn-primary" label="admin.customize.theme.update_to_latest"}}
           {{else}}
-            {{#if model.remote_theme.commits_behind}}
-              {{i18n "admin.customize.theme.commits_behind" count=model.remote_theme.commits_behind}}
-              {{#if model.remote_theme.github_diff_link}}
-                <a href={{model.remote_theme.github_diff_link}}>
-                  {{i18n "admin.customize.theme.compare_commits"}}
-                </a>
-              {{/if}}
+            {{d-button action=(action "checkForThemeUpdates") icon="sync" class="btn-default" label="admin.customize.theme.check_for_updates"}}
+          {{/if}}
+
+          <span class="status-message">
+            {{#if updatingRemote}}
+              {{i18n "admin.customize.theme.updating"}}
             {{else}}
-              {{#unless showRemoteError}}
-                {{i18n "admin.customize.theme.up_to_date"}} {{format-date model.remote_theme.updated_at leaveAgo="true"}}
-              {{/unless}}
+              {{#if model.remote_theme.commits_behind}}
+                {{i18n "admin.customize.theme.commits_behind" count=model.remote_theme.commits_behind}}
+                {{#if model.remote_theme.github_diff_link}}
+                  <a href={{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}}
+              {{/if}}
             {{/if}}
-          {{/if}}
-        </span>
-      {{else}}
-        <span class="status-message">
-          {{d-icon "info-circle"}} {{i18n "admin.customize.theme.imported_from_archive"}}
+          </span>
+        {{else}}
+          <span class="status-message">
+            {{d-icon "info-circle"}} {{i18n "admin.customize.theme.imported_from_archive"}}
+          </span>
+        {{/if}}
+      </div>
+    {{else}}
+        <span class="heading">{{i18n "admin.customize.theme.creator"}}</span>
+        <span>
+          {{#user-link user=model.user}}
+            {{format-username model.user.username}}
+          {{/user-link}}
         </span>
-      {{/if}}
-    </div>
-  {{else}}
+    {{/if}}
+  </div>
+
+
+  {{#unless model.component}}
     <div class="control-unit">

[... diff too long, it was truncated ...]

GitHub sha: a92a6b7b

1 Like