55 lines
1.4 KiB
Handlebars
55 lines
1.4 KiB
Handlebars
<div class="category_entry">
|
|
<div class="category_header">
|
|
<div class="category_icon"
|
|
style="background-color: {{this.category.color}}"
|
|
></div>
|
|
<span class="category_name">{{this.category.name}}</span>
|
|
<div class="category_button_container">
|
|
<form
|
|
action="/category/{{@key}}/bump_session/minutes/5"
|
|
id="bump-form-{{@key}}"
|
|
method="post"></form>
|
|
<button
|
|
{{#if this.category.started}}
|
|
class="category_bump_button"
|
|
{{else}}
|
|
class="category_bump_button display_none"
|
|
{{/if}}
|
|
id="bump-button-{{@key}}"
|
|
form="bump-form-{{@key}}"
|
|
type="submit">+5m</button>
|
|
<!-- without this extra tag, every even noscript tag seems to not trigger -->
|
|
<!-- what is even happening help -->
|
|
<noscript></noscript>
|
|
<noscript>
|
|
<form
|
|
{{#if this.category.started}}
|
|
action="/category/{{@key}}/end_session"
|
|
{{else}}
|
|
action="/category/{{@key}}/start_session"
|
|
{{/if}}
|
|
id="toggle-form-{{@key}}"
|
|
method="post"></form>
|
|
</noscript>
|
|
<button
|
|
id="toggle-button-{{@key}}"
|
|
type="submit"
|
|
form="toggle-form-{{@key}}"
|
|
onClick="toggle_category('{{@key}}')"
|
|
{{#if this.category.started}}
|
|
class="category_button category_button_toggled"
|
|
{{else}}
|
|
class="category_button"
|
|
{{/if}}>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
{{#if this.children}}
|
|
<div class="category_children">
|
|
{{#each this.children}}
|
|
{{> category_entry}}
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|