csrf token & collapsible note content

This commit is contained in:
Suraj Arun Patil 2016-01-18 06:32:37 +05:30
parent ab4a743b88
commit 84def84f55
4 changed files with 16 additions and 18 deletions

View File

@ -3,18 +3,17 @@
<div class="timeline"> <div class="timeline">
{{ if .Tasks}} {{range .Tasks}} {{ if .Tasks}} {{range .Tasks}}
<div class="note"> <div class="note">
<p class="noteHeading">{{.Title}}</p> <p class="noteHeading">{{.Title}}</p> <span class="toggle glyphicon glyphicon-resize-full"></span>
<hr>
<p class="noteContent">{{.Content}}</p> <p class="noteContent">{{.Content}}</p>
<span class="notefooter"> <span class="notefooter">
<ul class="menu"> <ul class="menu">
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/incomplete/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/incomplete/{{.Id}}">
<span class="glyphicon glyphicon-share"></span> Mark incomplete</a> <span class="glyphicon glyphicon-eye-close"></span></a>
</li> </li>
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/trash/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/trash/{{.Id}}">
<span class="glyphicon glyphicon-trash"></span> Trash</a> <span class="glyphicon glyphicon-trash"></span></a>
</li> </li>
<!--<li role="presentation"> <!--<li role="presentation">
<a role="menuitem" tabindex="-1" href="/mask/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/mask/{{.Id}}">

View File

@ -9,8 +9,7 @@
<div class="timeline"> <div class="timeline">
{{ if .Tasks}} {{range .Tasks}} {{ if .Tasks}} {{range .Tasks}}
<div class="note"> <div class="note">
<p class="noteHeading">{{.Title}}</p> <p class="noteHeading">{{.Title}}</p> <span class="toggle glyphicon glyphicon-resize-full"></span>
<hr>
<p class="noteContent">{{.Content}}</p> <p class="noteContent">{{.Content}}</p>
<span class="notefooter"> <span class="notefooter">
<ul class="menu"> <ul class="menu">
@ -28,11 +27,11 @@
</li>!--> </li>!-->
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/delete/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/delete/{{.Id}}">
<span class="glyphicon glyphicon-trash"></span> Delete</a> <span class="glyphicon glyphicon-trash"></span></a>
</li> </li>
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/restore/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/restore/{{.Id}}">
<span class="glyphicon glyphicon-inbox"></span> Restore</a> <span class="glyphicon glyphicon-inbox"></span></a>
</li> </li>
</ul> </ul>
</span> </span>

View File

@ -16,6 +16,7 @@
<div class="form-group"> <div class="form-group">
<!-- <label for="note-title" class="control-label">Title:</label> --> <!-- <label for="note-title" class="control-label">Title:</label> -->
<input type="text" name="title" class="form-control" id="add-note-title" placeholder="Title" style="border:none;border-bottom:1px solid gray; box-shadow:none;"> <input type="text" name="title" class="form-control" id="add-note-title" placeholder="Title" style="border:none;border-bottom:1px solid gray; box-shadow:none;">
<input type="hidden" name="CSRFToken" value={{.CSRFToken}}>
</div> </div>
<div class="form-group"> <div class="form-group">
<!-- <label for="note-content" class="control-label">Content:</label> --> <!-- <label for="note-content" class="control-label">Content:</label> -->
@ -43,18 +44,18 @@
<span class="glyphicon glyphicon-time"></span> {{.Created}}</li> <span class="glyphicon glyphicon-time"></span> {{.Created}}</li>
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/mask/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/mask/{{.Id}}">
<span class="glyphicon glyphicon-lock"></span> Mask</a></li> <span class="glyphicon glyphicon-lock"></span></a></li>
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/trash/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/trash/{{.Id}}">
<span class="glyphicon glyphicon-trash"></span> Trash</a> <span class="glyphicon glyphicon-trash"></span></a>
</li> </li>
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/complete/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/complete/{{.Id}}">
<span class="glyphicon glyphicon-check"></span> Complete</a> <span class="glyphicon glyphicon-check"></span></a>
</li> </li>
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/edit/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/edit/{{.Id}}">
<span class="glyphicon glyphicon-pencil"></span> Edit</a> <span class="glyphicon glyphicon-pencil"></span></a>
</li> </li>
</ul> </ul>
@ -67,7 +68,7 @@
</div> </div>
{{end}} {{end}}
</div> </div>
{{template "footer.gtpl"}} {{template "_footer.html" .}}
</body> </body>

View File

@ -2,8 +2,7 @@
<div class="timeline"> <div class="timeline">
{{ if .Tasks}} {{range .Tasks}} {{ if .Tasks}} {{range .Tasks}}
<div class="note"> <div class="note">
<p class="noteHeading">{{.Title}}</p> <p class="noteHeading">{{.Title}}</p> <span class="toggle glyphicon glyphicon-resize-full"></span>
<hr>
<p class="noteContent">{{.Content}}</p> <p class="noteContent">{{.Content}}</p>
<span class="notefooter"> <span class="notefooter">
<ul class="menu"> <ul class="menu">
@ -14,15 +13,15 @@
<span class="glyphicon glyphicon-lock"></span> Mask</a></li> !--> <span class="glyphicon glyphicon-lock"></span> Mask</a></li> !-->
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/trash/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/trash/{{.Id}}">
<span class="glyphicon glyphicon-trash"></span> Trash</a> <span class="glyphicon glyphicon-trash"></span></a>
</li> </li>
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/complete/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/complete/{{.Id}}">
<span class="glyphicon glyphicon-check"></span> Complete</a> <span class="glyphicon glyphicon-check"></span></a>
</li> </li>
<li role="presentation"> <li role="presentation">
<a role="menuitem" tabindex="-1" href="/edit/{{.Id}}"> <a role="menuitem" tabindex="-1" href="/edit/{{.Id}}">
<span class="glyphicon glyphicon-pencil"></span> Edit</a> <span class="glyphicon glyphicon-pencil"></span></a>
</li> </li>
</ul> </ul>