UX: In mobile view show button only under topic controls. (#35)

UX: In mobile view show button only under topic controls. (#35)

diff --git a/assets/javascripts/discourse-assign/connectors/topic-footer-main-buttons-before-create/assign-button.hbs b/assets/javascripts/discourse-assign/connectors/topic-footer-main-buttons-before-create/assign-button.hbs
index f5ac2cf..9c40acf 100644
--- a/assets/javascripts/discourse-assign/connectors/topic-footer-main-buttons-before-create/assign-button.hbs
+++ b/assets/javascripts/discourse-assign/connectors/topic-footer-main-buttons-before-create/assign-button.hbs
@@ -1,13 +1,15 @@
-{{#if topic.assigned_to_user.username}}
-{{d-button class="btn-default assign"
-           icon="user-times"
-           action=(action "unassign")
-           label="discourse_assign.unassign.title"
-           title="discourse_assign.unassign.help"}}
-{{else}}
-{{d-button class="btn-default assign"
-           icon="user-plus"
-           action=(action "assign")
-           label="discourse_assign.assign.title"
-           title="discourse_assign.assign.help"}}
-{{/if}}
+{{#unless site.mobileView}}
+  {{#if topic.assigned_to_user.username}}
+  {{d-button class="btn-default assign"
+             icon="user-times"
+             action=(action "unassign")
+             label="discourse_assign.unassign.title"
+             title="discourse_assign.unassign.help"}}
+  {{else}}
+  {{d-button class="btn-default assign"
+             icon="user-plus"
+             action=(action "assign")
+             label="discourse_assign.assign.title"
+             title="discourse_assign.assign.help"}}
+  {{/if}}
+{{/unless}}

GitHub sha: 22129d19

1 Like