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" data-badge-caption="online"></span>
56 <p>{{user.description}}</p>
57 </li>
58 </ul>
59 </div>
60
61
62 <div class="col s12 m8 l10">
63 <div class="row">
64 <div class="card white col s12 m12 l5">
65 <div class="card-content">
66 <span class="card-title">Projects</span>
67 <div class="collection">
68 <a href="#!" ng-click="projectSelect($index)" ng-repeat="project in projects" class="collection-item avatar white">
69 <div class="right">
70 <div class="waves-effect waves-light btn-floating indigo lighten-2" ng-click="editProject($index)">
71 <i class="material-icons"><img src="img/edit.png" class="o_trash_icon" /></i>
72 </div>
73 <div class="waves-effect waves-light btn-floating deep-orange lighten-2" ng-click="removeProject($index)">
74 <i class="material-icons"><img src="img/trash.png" class="o_trash_icon" /></i>
75 </div>
76 </div>
77 <img ng-src="img/{{project.icon}}.png" class="circle"/>
78 <span class="title">{{project.title}}</span>
79 <p class="grey-text">{{project.description}}</p>
80 <p class="grey-text">{{project.totaltime | secondsToDateTime | date:'HH:mm:ss'}}</p>
81 <p class="grey-text">
82 <div ng-repeat="user in project.users">{{user.username}}</div>
83 </p>
84 </a>
85 </div>
86 </div>
87 <div class="card-action" ng-show="!editingProject">
88 <div class="input-field col s6">
89 <input ng-model="newproject.title" id="newprojectname" type="text" class="validate">
90 <label for="newprojectname">New project name</label>
91 </div>
92 <div class="input-field col s6">
93 <input ng-model="newproject.icon" id="icon" type="text" class="validate">
94 <label for="icon">icon</label>
95 </div>
96 <div class="input-field col s12">
97 <input ng-model="newproject.description" id="description" type="text" class="validate">
98 <label for="description">description</label>
99 </div>
100 <a ng-click="addNewProject()" class="waves-effect waves-light btn blue-grey lighten-1 right">Add new project</a>
101 </div>
102 <div class="card-action" ng-show="editingProject">
103 <div class="input-field col s6">
104 <input ng-model="editingProject.title" id="newprojectname" value=" " type="text" class="validate">
105 <label for="newprojectname">New project name</label>
106 </div>
107 <div class="input-field col s6">
108 <input ng-model="editingProject.icon" id="icon" value=" " type="text" class="validate">
109 <label for="icon">icon</label>
110 </div>
111 <a ng-click="cancelEditProject()" class="waves-effect waves-light btn red lighten-2">Cancel</a>
112 <a ng-click="updateProject()" class="waves-effect waves-light btn blue lighten-2 right">Update project</a>
113 </div>
114 </div>
115
116 <div ng-show="currentproject.title" class="card white col s12 m12 l7">
117 <div class="card-content">
118 <span class="card-title">
119 <img ng-src="img/{{currentproject.icon}}.png" class="o_project_title_img"/>
120 {{currentproject.title}}
121 </span>
122 <p>
123 Total time: {{currentproject.totaltime | secondsToDateTime | date:'HH:mm:ss'}}
124 </p>
125 <p ng-repeat="user in currentproject.users">
126 {{user.username}}: <b>{{user.time | secondsToDateTime | date:'HH:mm:ss'}}</b>
127 </p>
128
129 </div>
130 <div class="card-action">
131 <div ng-show="arrayObjectIndexOf(currentproject.users, user.username, 'username')!=-1">
132 <a ng-click="btnWork()" ng-show="!working" class="waves-effect waves-light btn green lighten-2">Work!</a>
133 <a ng-click="btnStop()" ng-show="working" class="waves-effect waves-light btn red lighten-2">Stop!</a>
134 </div>
135 <div ng-show="arrayObjectIndexOf(currentproject.users, user.username, 'username')==-1">
136 <a ng-click="joinProject()" class="waves-effect waves-light btn blue lighten-2">Join!</a>
137 </div>
138
139 <!--<a class="waves-effect waves-light btn deep-orange lighten-2">Stop working!</a>-->
140 </div>
141 <div class="divider"></div>
142 <div class="card-content">
143 <!-- here the charts -->
144 <canvas id="bar" class="chart chart-bar"
145 chart-data="currentproject.chart.data" chart-labels="currentproject.chart.labels" chart-series="currentproject.chart.series">
146 </canvas>
147
148 </div>
149 </div>
150 <div ng-show="!currentproject.title" class="card white col s12 m12 l7" style="height: 200px;">
151 <span class="card-title">
152 Select a project
153 </span>
154 </div>
155
156
157 </div><!-- </row -->
158 </div>
159</div>