Tasks/templates/_head.html

139 lines
7.3 KiB
HTML
Raw Normal View History

2015-11-18 00:58:03 +08:00
<!DOCTYPE html>
<html>
<head>
2016-02-06 14:55:50 +08:00
<title>{{if eq .Navigation "pending"}} Tasks {{ else if eq .Navigation "completed"}}Completed {{ else if eq .Navigation "deleted"}}Deleted
{{ else if eq .Navigation "edit"}} Edit {{else }} {{.Navigation}} {{end}}
</title>
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- Bootstrap CSS -->
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/css/bootstrap-glyphicons.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="/static/css/styles.css" rel="stylesheet">
<!--<link href="/static/css/jquery-ui.min.css" rel="stylesheet">-->
2016-02-06 14:55:50 +08:00
<link href="/static/css/sidebar.css" rel="stylesheet">
<link href="/static/css/sidebar-bootstrap.css" rel="stylesheet">
<link href="/static/css/font-awesome.min.css" rel="stylesheet">
<!-- Include Modernizr in the head, before any other Javascript -->
<!--<script src="/static/js/modernizr-2.6.2.min.js"></script>-->
<!-- All Javascript at the bottom of the page for faster page loading -->
<script src="/static/js/jquery.min.js"></script>
<!--<script src="/static/js/jquery-ui.min.js"></script> ENABLE WHEN DUE DATE FEATURE IS REQUIRED-->
2016-07-30 23:21:16 +08:00
2016-02-06 14:55:50 +08:00
<!-- If no online access, fallback to our hardcoded version of jQuery
2015-11-18 00:58:03 +08:00
<script>window.jQuery || document.write('<script src="/static/js/jquery-1.8.2.min.js"><\/script>')</script>
-->
2016-02-06 14:55:50 +08:00
<!-- Bootstrap JS -->
<script src="/static/js/bootstrap.min.js"></script>
2015-11-18 00:58:03 +08:00
2016-02-06 14:55:50 +08:00
<!-- Custom JS -->
<script src="/static/js/script.js"></script>
<script src="/static/js/hammer.min.js"></script>
<script src="/static/js/sidebar.js"></script>
2015-11-18 00:58:03 +08:00
</head>
2016-02-06 14:55:50 +08:00
2015-11-18 00:58:03 +08:00
<body>
2016-02-06 14:55:50 +08:00
<!-- The navigation bar-->
2016-02-17 00:51:01 +08:00
<div id = "noti" class='notification {{if eq .Message ""}} hidden {{end}}'><span id="message"><p id="actlMsg">{{.Message}}</p></span></div>
2016-02-06 14:55:50 +08:00
<nav class="navbar navbar-default navbar-fixed-top mainHeader">
<div class="container-fluid">
{{$url := ""}}
<div class="navbar-header">
{{if .Search}} <a class="navbar-brand"> Results for: {{.Search}}</a> {{else}} {{ if eq .Navigation "pending"}}
{{ $url:="" }} {{else if eq .Navigation "completed"}} {{ $url := "" }} {{else if eq .Navigation "deleted"}}
2016-02-06 18:02:58 +08:00
{{$url := ""}} {{else if eq .Navigation "edit"}} {{$url := ""}} {{else}} {{$url := "/category"}}{{end}}
2016-02-06 14:55:50 +08:00
<p class="navbar-brand" href="{{$url}}/{{.Navigation}}">
{{if eq .Navigation "pending"}} Pending {{ else if eq .Navigation "completed"}}Completed {{ else if eq .Navigation "deleted"}}Deleted
{{ else if eq .Navigation "edit"}} Edit {{else }} {{.Navigation}} {{end}} {{end}}
</p>
<form action="/upd-category/{{.Navigation}}" method="POST" class="hidden" id="EditForm">
<input type="text" name="catname" placeholder="new cat name" >
2016-02-06 18:02:58 +08:00
<input type="submit" value="Submit" class="btn btn-default" />
2016-02-06 14:55:50 +08:00
</form>
<form action="/search/" method="POST" class="hidden" id="SearchForm">
<input type="text" name="query" placeholder="Search" >
2016-02-06 18:02:58 +08:00
<input type="submit" value="Submit" class="btn btn-default" />
2016-02-06 14:55:50 +08:00
</form>
<span id="icons">
2016-02-06 18:02:58 +08:00
<button data-original-title="Search" data-placement="bottom" data-toggle="tooltip" title="" id="searchFormBtn" class="btn btn-action glyphicon glyphicon-search" type="button"></button>
{{if eq .Navigation "pending"}}
2016-02-06 14:55:50 +08:00
{{ else if eq .Navigation "completed"}}
{{ else if eq .Navigation "deleted"}}
{{ else if eq .Navigation "edit"}}
2016-02-29 10:04:58 +08:00
{{ else if eq .Navigation "search"}}
2016-02-06 14:55:50 +08:00
{{else }}
<a href="/del-category/{{.Navigation}}"> <button data-original-title="Delete Category" data-placement="bottom" data-toggle="tooltip" title="" class="btn btn-action glyphicon glyphicon-trash" type="button"></button></a>
2016-02-06 18:02:58 +08:00
<button data-original-title="Edit Category" data-placement="bottom" data-toggle="tooltip" id="editCatFrmBtn" title="" class="btn btn-action glyphicon glyphicon-pencil" type="button"></button>
2016-02-06 14:55:50 +08:00
{{end}}
2016-05-09 10:11:05 +08:00
<a href="/logout"> <button data-original-title="Logout" data-placement="bottom" data-toggle="tooltip" title="Logout" class="btn btn-action glyphicon glyphicon-off" type="button"></button></a>
2016-02-06 14:55:50 +08:00
</span>
</div>
</div>
</nav>
<!-- SIDEBAR -->
<div data-sidebar="true" class="sidebar-trigger">
<a class="sidebar-toggle" href="">
<span class="glyphicon glyphicon-align-justify"></span>
</a>
<div class="sidebar-wrapper sidebar-default">
<div class="sidebar-scroller">
<ul class="sidebar-menu">
<li class="sidebar-group"><span>Tasks</span>
<ul class="sidebar-group-menu">
2016-02-03 01:40:44 +08:00
<li class="sidebar-item">
2016-02-06 14:55:50 +08:00
<a href="/" {{ if eq .Navigation "pending"}} class="active" {{end}}><span class="glyphicon glyphicon-tasks"></span> <span class="nav-item">Pending</span></a>
</li>
2016-02-03 01:40:44 +08:00
<li class="sidebar-item">
2016-02-06 14:55:50 +08:00
<a href="/completed/" {{ if eq .Navigation "completed"}} class="active" {{end}}><span class="glyphicon glyphicon-check"></span> <span class="nav-item"> Completed</span></a>
</li>
2016-02-03 01:40:44 +08:00
<li class="sidebar-item">
2016-02-06 14:55:50 +08:00
<a href="/deleted/" {{ if eq .Navigation "deleted"}} class="active" {{end}}><span class="glyphicon glyphicon-trash"></span> <span class="nav-item"> Deleted</span></a>
</li>
2016-02-03 01:40:44 +08:00
<hr>
2016-02-06 14:55:50 +08:00
2016-02-03 01:40:44 +08:00
<li class="sidebar-item">
2016-02-05 02:36:44 +08:00
{{$nav := .Navigation}}
2016-02-06 14:55:50 +08:00
<h5> Categories</h5>
<!--<button title="New category" id="toggleCategoryForm" data-placement="left" data-toggle="tooltip" class="btn glyphicon glyphicon-plus" style="font-size:small; margin-left:120px;"></button>-->
<span id="categoryForm">
2016-02-03 01:40:44 +08:00
<form action="/add-category/" method="POST">
2016-02-05 02:36:44 +08:00
<span>
<input type="text" name="category" width="50px">
<input type="submit" text="submit" class="btn btn-primary" value="Submit"/>
</span>
2016-02-06 14:55:50 +08:00
</form>
</span>
</li>
2016-02-05 02:36:44 +08:00
{{ range $index, $cat := .Categories }}
2016-02-03 01:40:44 +08:00
<li class="sidebar-item">
2016-02-06 14:55:50 +08:00
<a href="/category/{{$cat.Name}}" {{ if eq $cat.Name $nav }} class="active" {{end}}>
2016-02-06 02:08:52 +08:00
<span class="nav-item"> {{$cat.Name}}</span> <span class="badge pull-right">{{$cat.Count}}</span></a>
2016-02-06 14:55:50 +08:00
</li>
2016-02-03 01:40:44 +08:00
{{end}}
2016-02-06 14:55:50 +08:00
</ul>
</li>
</ul>
</div>
</div>
</div>