openworktime/webapp/dashboard.html
webapp/dashboard.htmlRaw
1
2
3
4<nav>
5 <div class="nav-wrapper blue-grey darken-4">
6 <a href="#" class="brand-logo">Open Work Time <small>- v0.1</small></a>
7 <ul id="nav-mobile" class="right">
8 <li>
9 <a ng-click="openCode()" target="_blank">
10 <i class="large material-icons" title="Visit code">code</i>
11 </a>
12 </li>
13 <li>
14 <a ng-click="deleteStorage()">
15 <i class="large material-icons" title="Delete storage">info_outline</i>
16 </a>
17 </li>
18 <li>
19 <a ng-click="onBtnLogout()" title="Logout">
20 <i class="large material-icons">power_settings_new</i>
21 </a>
22 </li>
23 </ul>
24 </div>
25</nav>
26
27<div class="row">
28 <div class="col s12 m4 l2 blue-grey darken-3 white-text">
29 <!-- Grey navigation panel -->
30 <br>
31 <div class="row">
32 <div class="col s4">
33 <img ng-src="img/avatars/{{user.avatar}}.png" alt="" class="circle responsive-img blue-grey lighten-5">
34 </div>
35 <div class="col s8">
36 <h5>{{user.username}}</h5>
37 </div>
38 </div>
39 <p>
40 {{user.description}}
41 </p>
42 <p>
43 <a ng-href="http://{{user.github}}" target="_blank">{{user.github}}</a>
44 </p>
45 <p>
46 <a ng-href="http://{{user.web}}" target="_blank">{{user.web}}</a>
47 </p>
48 <!--<p>
49 Total worked time: {{user.totalWorkedTime | secondsToDateTime | date:'HH:mm'}}h
50 </p>-->
51 <ul class="collection">
52 <li ng-repeat="user in users" class="collection-item avatar blue-grey darken-3">
53 <img ng-src="img/avatars/{{user.avatar}}.png" class="circle">
54 <span class="title">{{user.username}}</span>
55 <span ng-show="user.connected" class="new badge blue" data-badge-caption="online"></span>
56 <span ng-show="user.working" class="new badge" data-badge-caption="working"></span>
57 <p>{{user.description}}</p>
58 </li>
59 </ul>
60 </div>
61
62
63 <div class="col s12 m8 l10">
64 <div class="row">
65 <div class="card white col s12 m12 l5">
66 <div class="card-content">
67 <span class="card-title">Projects</span>
68 <div class="collection">
69 <a href="#!" ng-click="projectSelect($index)" ng-repeat="project in projects" class="collection-item avatar white">
70 <div class="right">
71 <div class="waves-effect waves-light btn-floating indigo lighten-2" ng-click="editProject($index)">
72 <i class="material-icons"><img src="img/edit.png" class="o_trash_icon" /></i>
73 </div>
74 <div class="waves-effect waves-light btn-floating deep-orange lighten-2" ng-click="removeProject($index)">
75 <i class="material-icons"><img src="img/trash.png" class="o_trash_icon" /></i>
76 </div>
77 </div>
78 <img ng-src="img/{{project.icon}}.png" class="circle"/>
79 <span class="title">{{project.title}}</span>
80 <p class="grey-text">{{project.description}}</p>
81 <p class="grey-text">{{project.totaltime | secondsToDateTime | date:'HH:mm:ss'}}</p>
82 <p class="grey-text">
83 <div ng-repeat="user in project.users">{{user.username}}</div>
84 </p>
85 </a>
86 </div>
87 </div>
88 <div class="card-action" ng-show="!editingProject">
89 <div class="input-field col s6">
90 <input ng-model="newproject.title" id="newprojectname" type="text" class="validate">
91 <label for="newprojectname">New project name</label>
92 </div>
93 <div class="input-field col s6">
94 <input ng-model="newproject.icon" id="icon" type="text" class="validate">
95 <label for="icon">icon</label>
96 </div>
97 <div class="input-field col s12">
98 <input ng-model="newproject.description" id="description" type="text" class="validate">
99 <label for="description">description</label>
100 </div>
101 <a ng-click="addNewProject()" class="waves-effect waves-light btn blue-grey lighten-1 right">Add new project</a>
102 </div>
103 <div class="card-action" ng-show="editingProject">
104 <div class="input-field col s6">
105 <input ng-model="editingProject.title" id="newprojectname" value=" " type="text" class="validate">
106 <label for="newprojectname">New project name</label>
107 </div>
108 <div class="input-field col s6">
109 <input ng-model="editingProject.icon" id="icon" value=" " type="text" class="validate">
110 <label for="icon">icon</label>
111 </div>
112 <a ng-click="cancelEditProject()" class="waves-effect waves-light btn red lighten-2">Cancel</a>
113 <a ng-click="updateProject()" class="waves-effect waves-light btn blue lighten-2 right">Update project</a>
114 </div>
115 </div>
116
117 <div ng-show="currentproject.title" class="card white col s12 m12 l7">
118 <div class="card-content">
119 <span class="card-title">
120 <img ng-src="img/{{currentproject.icon}}.png" class="o_project_title_img"/>
121 {{currentproject.title}}
122 </span>
123 <p>
124 Current strike time: {{currentproject.totaltime | secondsToDateTime | date:'HH:mm:ss'}}
125 </p>
126 <p ng-repeat="user in currentproject.users">
127 {{user.username}}: <b>{{user.time | secondsToDateTime | date:'HH:mm:ss'}}</b>
128 </p>
129
130 </div>
131 <div class="card-action">
132 <div ng-show="arrayObjectIndexOf(currentproject.users, user.username, 'username')!=-1">
133 <a ng-click="btnWork()" ng-show="!user.working" class="waves-effect waves-light btn green lighten-2">Work!</a>
134
135 <div ng-show="user.working" class="progress">
136 <div class="indeterminate"></div>
137 </div>
138 <a ng-click="btnStop()" ng-show="user.working" class="waves-effect waves-light btn red lighten-2">Stop!</a>
139 </div>
140 <div ng-show="arrayObjectIndexOf(currentproject.users, user.username, 'username')==-1">
141 <a ng-click="joinProject()" class="waves-effect waves-light btn blue lighten-2">Join!</a>
142 </div>
143
144 <!--<a class="waves-effect waves-light btn deep-orange lighten-2">Stop working!</a>-->
145 </div>
146 <div class="divider"></div>
147 <div class="card-content">
148 <!-- here the charts -->
149 <canvas id="bar" class="chart chart-bar"
150 chart-data="currentproject.chart.data" chart-labels="currentproject.chart.labels" chart-series="currentproject.chart.series">
151 </canvas>
152
153 </div>
154 </div>
155 <div ng-show="!currentproject.title" class="card white col s12 m12 l7" style="height: 200px;">
156 <span class="card-title">
157 Select a project
158 </span>
159 </div>
160
161
162 </div><!-- </row -->
163 </div>
164</div>