Display category children & Add calendar stats
This commit is contained in:
31
server/templates/category_entry.hbs
Normal file
31
server/templates/category_entry.hbs
Normal file
@ -0,0 +1,31 @@
|
||||
<li 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>
|
||||
{{#if this.category.started}}
|
||||
<form action="/api/category/{{@key}}/bump_session/minutes/5", method="post">
|
||||
<button style="height: 100%; color: green;" type="submit">+5</button>
|
||||
</form>
|
||||
{{/if}}
|
||||
<div class="category_button_container">
|
||||
<button
|
||||
id="toggle-button-{{@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}}
|
||||
<ul class="category_children striped_list">
|
||||
{{#each this.children}}
|
||||
{{> category_entry}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
</li>
|
||||
Reference in New Issue
Block a user