Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
119 lines (110 sloc) 3.29 KB
<script id="loggedin" type="text/x-handlebars-template">
<li><a>{{name}}</a></li>
<li><a href="#!/logout/">Logout</a></li>
</script>
<script id="loggedout" type="text/x-handlebars-template">
<li><a href="#!/login/">Login</a></li>
</script>
<script id="loggedout_splash" type="text/x-handlebars-template">
<h3>Welcome! Please login to continue.</h3>
</script>
<script id="category" type="text/x-handlebars-template">
<div class="span12">
<ul class="breadcrumb">
{{#if parents.length}}
{{#each parents}}
<li>
<span class="divider">/</span>
<a href="{{this.url}}">{{this.name}}</a>
</li>
{{/each}}
<li class="active">
<span class="divider">/</span>
{{model.name}}
</li>
{{else}}
<li class="active">
<span class="divider">/</span>
Home
</li>
{{/if}}
</ul>
</div>
<div class="span12">
<div class="item_header category_header">
<h3>{{model.name}}</h3>
{{#if parents.length}}
<div class="note_icons pull-right">
<a href="#!/notes/{{model.id}}/edit"><i class="icon-pencil" title="Edit Category"></i></a>
<a href="#!/new_note/{{model.id}}"><i class="icon-plus-sign" title="Add Child"></i></a>
<a href="#!/" class="delete"><i class="icon-trash" title="Delete Category"></i></a>
</div>
{{/if}}
</div>
</div>
<div class="span3">
<div class="well new_note">
<h4>New note</h4>
<p>Click here to add a new note or category.</p>
</div>
</div>
{{#each children}}
<div class="span3">
<div class="well {{this.attributes.type}}" data-href="#!/notes/{{this.attributes.id}}">
<h4>{{this.attributes.name}}</h4>
</div>
</div>
{{/each}}
</script>
<script id="note" type="text/x-handlebars-template">
<div class="span12">
<ul class="breadcrumb">
{{#each parents}}
<li>
<span class="divider">/</span>
<a href="{{this.url}}">{{this.name}}</a>
</li>
{{/each}}
<li class="active">
<span class="divider">/</span>
{{model.name}}
</li>
</ul>
</div>
<div class="span12">
<div class="well">
<div class="item_header note_header">
<h3>{{model.name}}</h3>
<div class="note_icons pull-right">
<a href="#!/notes/{{model.id}}/edit"><i class="icon-pencil" title="Edit Note"></i></a>
<a href="#!/new_note/{{model.id}}"><i class="icon-plus-sign" title="Add Child"></i></a>
<a href="#!/" class="delete"><i class="icon-trash" title="Delete Note"></i></a>
</div>
</div>
{{{model.content}}}
</div>
</div>
{{#if children.length}}
{{#each children}}
<div class="span3 well {{this.attributes.type}}" data-href="#!/notes/{{this.attributes.id}}">
<h4>{{this.attributes.name}}</h4>
</div>
{{/each}}
{{/if}}
</script>
<script id="edit_note" type="text/x-handlebars-template">
<form>
{{#if name}}
<legend>Edit Note</legend>
{{else}}
<legend>New Note</legend>
{{/if}}
<div>
<input type="text" name="title" placeholder="Title" class="span8" value="{{name}}">
</div>
<div>
<textarea class="span11 note_input"">{{content}}</textarea>
</div>
<a href="#" class="save btn">Save</a>
</form>
</script>