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.

159 lines
7.6 KiB

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