TaskFlow/templates/home.html

121 lines
5.3 KiB
HTML
Raw Normal View History

2015-11-21 21:20:51 +08:00
{{template "_head.html" .}}
2015-11-18 00:58:03 +08:00
2016-02-06 14:55:31 +08:00
<!--end mainHeader -->
<button class=" btn-danger btn glyphicon glyphicon-plus floating-action-icon floating-action-icon-add"></button>
2015-11-18 00:58:03 +08:00
2016-02-06 14:55:31 +08:00
<!-- Add note modal -->
<div class="modal fade " id="addNoteModal" tabindex="-1" role="dialog" aria-labelledby="newNoteLabel" aria-hidden="true">
2015-11-18 00:58:03 +08:00
<div class="modal-dialog">
2016-02-06 14:55:31 +08:00
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="newNoteLabel"><span class="glyphicon glyphicon-pencil"></span> New Task</h4>
2015-11-18 00:58:03 +08:00
</div>
2016-02-06 14:55:31 +08:00
<div class="modal-body">
<form enctype="multipart/form-data" action="/add/" method="POST">
<div class="form-group">
2016-02-17 00:51:01 +08:00
<input type="text" name="title" class="form-control" id="add-note-title" placeholder="Title" />
<input class="hidden" name="CSRFToken" value="{{.CSRFToken}}" />
2016-02-06 14:55:31 +08:00
</div>
<div class="form-group">
2016-01-28 23:19:59 +08:00
<textarea class="form-control" name="content" id="add-note-content" placeholder="Content" rows="10" ></textarea>
2016-02-06 18:02:58 +08:00
<a id="toggleAddFileGrp">Add File</a>
<span id="file-group" class="hidden">
File: <input type="file" name="uploadfile" />
</span>
2016-02-06 14:55:31 +08:00
<br> Priority:
<input type="radio" name="priority" value="3" /> High
<input type="radio" name="priority" value="2" /> Medium
<input type="radio" name="priority" value="1" /> Low
</div>
Category:
<select name="category" class="dropdown">
<option>---</option>
{{$navigation := .Navigation}} {{$categories := .Categories}} {{range $cat := $categories}}
<option value="{{$cat.Name}}" {{if eq $cat.Name $navigation }} selected="true" {{end}}> {{$cat.Name}} </option>
2016-02-06 14:55:31 +08:00
{{end}}
</select>
2015-11-18 00:58:03 +08:00
</div>
2016-02-06 14:55:31 +08:00
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
<input type="submit" value="Submit" class="btn btn-primary" id="addNoteBtn" />
2016-02-06 14:55:31 +08:00
</div>
2016-02-17 01:18:13 +08:00
</form>
2015-11-18 00:58:03 +08:00
</div>
</div>
2016-02-06 14:55:31 +08:00
</div>
2015-11-18 00:58:03 +08:00
2016-02-06 14:55:31 +08:00
<div class="timeline">
2016-02-05 02:36:53 +08:00
{{ if .Tasks}} {{range $key, $value := .Tasks}}
<div class="note" id="{{$value.Id}}">
2016-03-01 02:26:41 +08:00
<p class="noteHeading ">{{ $value.Title}}
{{if $value.IsOverdue}}<span class="overdue">Overdue</span>{{end}}
</p> <span class="toggle glyphicon glyphicon-resize-full"></span>
<span class="noteContent">
{{$value.Content}}
2016-02-15 12:10:35 +08:00
<div class="commentslist">
{{range $value.Comments}}
2016-02-17 00:53:03 +08:00
<div class="comment">
<span>{{.Content}}</span>
<span class="timestamp">{{.Created}}</span>
<a href="/del-comment/{{.ID}}"><span class="glyphicon glyphicon-trash timestamp"></span></a>
</div>
{{end}}
2016-02-15 12:10:35 +08:00
<div class="comment">
<form method="POST" action="/add-comment/">
2016-02-29 10:05:38 +08:00
<textarea rows="1" cols="75" name="commentText" placeholder="Add Comment"></textarea>
<input type="text" class="hidden" name="taskID" value="{{$value.Id}}">
<input type="submit" value="Comment" class="btn btn-primary" />
</form>
2016-02-15 12:10:35 +08:00
</div>
</div>
</span>
2016-02-06 14:55:31 +08:00
<span class="notefooter">
2016-01-23 21:47:34 +08:00
<ul class="menu">
2016-02-05 02:36:53 +08:00
<li role="presentation">Priority: {{$value.Priority}}</li>
2016-01-23 21:47:34 +08:00
<li role="presentation">
2016-02-05 02:36:53 +08:00
<span class="glyphicon glyphicon-time"></span> {{$value.Created}}</li>
2016-02-29 10:05:38 +08:00
<li role="presentation">
2016-01-29 00:13:17 +08:00
2016-02-06 14:55:31 +08:00
<a role="menuitem" tabindex="-1" href="/mask/{{.Id}}">
<span class="glyphicon glyphicon-lock"></span></a>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" href="/trash/{{.Id}}">
<span class="glyphicon glyphicon-trash"></span></a>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" href="/complete/{{.Id}}">
<span class="glyphicon glyphicon-check"></span></a>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" href="/edit/{{.Id}}">
<span class="glyphicon glyphicon-pencil"></span></a>
</li>
2016-02-29 10:05:38 +08:00
<li role="presentation">
<a href="/category/{{$value.Category}}"> {{$value.Category}}</a>
</li>
2016-02-06 14:55:31 +08:00
</ul>
</span>
2015-11-18 00:58:03 +08:00
</div>
{{end}} {{else}}
2015-11-21 18:42:14 +08:00
<div class="note">
2016-02-06 14:55:31 +08:00
<p class="noteHeading">No Tasks here</p>
<p class="notefooter">Create new task
<button class="floating-action-icon-add" >
here </button>
2016-02-06 14:55:31 +08:00
</p>
2015-11-21 18:42:14 +08:00
</div>
2015-11-18 00:58:03 +08:00
{{end}}
2016-02-06 14:55:31 +08:00
</div>
{{template "_footer.html" .}}
2015-11-18 00:58:03 +08:00
</body>
2015-11-13 17:04:42 +08:00
2016-02-29 10:05:38 +08:00
</html>