all.html (1972B)
1 {% extends 'base.html' %} 2 3 {% block title %}Hours{% endblock %} 4 5 {% block content %} 6 <section class="hours-grid"> 7 <h3>{{ user.fname }} {{ user.lname }}</h3><!-- IF logged in user has permission allow this username section to be a dropdown for modifying user time sheets. --> 8 <h1 id="clock"></h1> 9 <table> 10 {% for event in hours %} 11 <tr> 12 {% for entry in event %} 13 <td>{{ event[entry] }}</br></td> 14 {% endfor %} 15 </tr> 16 {# <td><a href="{{url_for('updateDate',mod_username=current_user.username,timeid=entry._id)}}">{{ entry.date.date().isoformat() }}</a></td> 17 <td><a href="{{url_for('updateProjectTime',mod_username=current_user.username,timeid=entry._id)}}">{{ entry.project[0]['project_name'] }}</a></td> 18 <td><a href="{{url_for('updateStartTime',mod_username=current_user.username,timeid=entry._id)}}">{{ entry.clock_in[-1].time().isoformat(timespec='minutes') }}</a></td> 19 <td><a href="{{url_for('updateEndTime',mod_username=current_user.username,timeid=entry._id)}}">{{ entry.clock_out[-1].time().isoformat(timespec='minutes') }}</a></td> 20 {% if entry.lunch %} 21 <td><a href="{{url_for('toggle_lunch',timeid=entry._id)}}">Yes</a></td> 22 {% else %} 23 <td><a href="{{url_for('toggle_lunch',timeid=entry._id)}}">No</a></td> 24 {% endif %} 25 {% if entry.per_diem %} 26 <td><a href="{{url_for('toggle_per_diem',timeid=entry._id)}}">Yes</a></td> 27 {% else %} 28 <td><a href="{{url_for('toggle_per_diem',timeid=entry._id)}}">No</a></td> 29 {% endif %} 30 {% if entry.note %} 31 <td><a href="{{url_for('updateNote',mod_username=current_user.username,timeid=entry._id)}}">{{ entry.note }}</a></td> 32 {% else %} 33 <td><a href="{{url_for('updateNote',mod_username=current_user.username,timeid=entry._id)}}">Add Note</a></td> 34 {% endif %} 35 <td><a href="{{url_for( 'removetime',timeid=entry._id) }}" class="action-button">Remove</a></td> 36 #} 37 </tr> 38 {% endfor %} 39 </table> 40 </form> 41 </section> 42 {% endblock %}