You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
7.8 KiB

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