Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

send_later: Extract send later options to separate template.

Daniil Fadeev45c3f8aa9670
diff --git a/web/templates/send_later_modal.hbs b/web/templates/send_later_modal.hbs
index 037f403b968..ee50f1b49b8 100644
--- a/web/templates/send_later_modal.hbs
+++ b/web/templates/send_later_modal.hbs
@@ -8,32 +8,7 @@
<button class="modal__close" aria-label="{{t 'Close modal' }}" data-micromodal-close></button>
</header>
<main class="modal__content">
- <div class="send_later_options">
- <ul class="nav nav-list">
- {{#if possible_send_later_today}}
- {{#each possible_send_later_today}}
- <li>
- <a id="{{@key}}" class="send_later_today" data-send-stamp="{{this.stamp}}" tabindex="0">{{this.text}}</a>
- </li>
- {{/each}}
- {{/if}}
- {{#each send_later_tomorrow}}
- <li>
- <a id="{{@key}}" class="send_later_tomorrow" data-send-stamp="{{this.stamp}}" tabindex="0">{{this.text}}</a>
- </li>
- {{/each}}
- {{#if possible_send_later_monday }}
- {{#each possible_send_later_monday}}
- <li>
- <a id="{{@key}}" class="send_later_monday" data-send-stamp="{{this.stamp}}" tabindex="0">{{this.text}}</a>
- </li>
- {{/each}}
- {{/if}}
- <li>
- <a class="send_later_custom" tabindex="0">{{t 'Custom time'}}</a>
- </li>
- </ul>
- </div>
+ {{> send_later_modal_options }}
</main>
</div>
</div>
diff --git a/web/templates/send_later_modal_options.hbs b/web/templates/send_later_modal_options.hbs
new file mode 100644
index 00000000000..6aea2026fd3
--- /dev/null
+++ b/web/templates/send_later_modal_options.hbs
@@ -0,0 +1,26 @@
+<div class="send_later_options">
+ <ul class="nav nav-list">
+ {{#if possible_send_later_today}}
+ {{#each possible_send_later_today}}
+ <li>
+ <a id="{{@key}}" class="send_later_today" data-send-stamp="{{this.stamp}}" tabindex="0">{{this.text}}</a>
+ </li>
+ {{/each}}
+ {{/if}}
+ {{#each send_later_tomorrow}}
+ <li>
+ <a id="{{@key}}" class="send_later_tomorrow" data-send-stamp="{{this.stamp}}" tabindex="0">{{this.text}}</a>
+ </li>
+ {{/each}}
+ {{#if possible_send_later_monday }}
+ {{#each possible_send_later_monday}}
+ <li>
+ <a id="{{@key}}" class="send_later_monday" data-send-stamp="{{this.stamp}}" tabindex="0">{{this.text}}</a>
+ </li>
+ {{/each}}
+ {{/if}}
+ <li>
+ <a class="send_later_custom" tabindex="0">{{t 'Custom time'}}</a>
+ </li>
+ </ul>
+</div>