index.dev.html (2472B)
1 {% extends 'base.html' %} 2 3 {% block title %}Hours{% endblock %} 4 5 {% block content %} 6 {% with messages = get_flashed_messages() %} 7 {% if messages %} 8 {% for message in messages %} 9 <div id='messagebanner'><p>{{message}}</p></div> 10 {% endfor %} 11 {% endif %} 12 {% endwith %} 13 14 <section class="hours-grid"> 15 {{ cd[2] }} 16 {{ cd[1] }} 17 {{ bd[2] }} 18 {{ bd[1] }} 19 {{ current_user.birthday }} 20 <h1 id="clock"></h1> 21 <div><!-- abstract to payPeriod() --> 22 <h6>$payperiod range</h6> 23 <!--<h5>Total:{# {{ statement_hours }} #}</h5> --> 24 </div> 25 <form action="" method="POST" novalidate> 26 <table><tr> 27 28 {% for entry in hours %} 29 <tr> 30 <td><a href="{{url_for('updateDate',mod_username=current_user.username,timeid=entry._id)}}">{{ entry.date.date().isoformat() }}</a></td> 31 {% if entry.project[0] %} 32 <td><a href="{{url_for('updateProjectTime',mod_username=current_user.username,timeid=entry._id)}}">{{ entry.project[0]['project_name'] }}</a></td> 33 {% else %} 34 <td><a href="{{url_for('updateProjectTime',mod_username=current_user.username,timeid=entry._id)}}">Project not Found</a></td> 35 {% endif %} 36 <td><a href="{{url_for('updateStartTime',mod_username=current_user.username,timeid=entry._id)}}">{{ entry.clock_in[-1].time().isoformat(timespec='minutes') }}</a></td> 37 <td><a href="{{url_for('updateEndTime',mod_username=current_user.username,timeid=entry._id)}}">{{ entry.clock_out[-1].time().isoformat(timespec='minutes') }}</a></td> 38 {% if entry.lunch %} 39 <td><a href="{{url_for('toggle_lunch',timeid=entry._id)}}">Yes</a></td> 40 {% else %} 41 <td><a href="{{url_for('toggle_lunch',timeid=entry._id)}}">No</a></td> 42 {% endif %} 43 {% if entry.per_diem %} 44 <td><a href="{{url_for('toggle_per_diem',timeid=entry._id)}}">Yes</a></td> 45 {% else %} 46 <td><a href="{{url_for('toggle_per_diem',timeid=entry._id)}}">No</a></td> 47 {% endif %} 48 {% if entry.note %} 49 <td><a href="{{url_for('updateNote',mod_username=current_user.username,timeid=entry._id)}}">{{ entry.note }}</a></td> 50 {% else %} 51 <td><a href="{{url_for('updateNote',mod_username=current_user.username,timeid=entry._id)}}">Add Note</a></td> 52 {% endif %} 53 <td><a href="{{url_for( 'removetime',timeid=entry._id) }}" class="action-button">Remove</a></td> 54 {#{{ form.hidden_tag() }}#} 55 </tr> 56 {# {{entry}} #} 57 {% endfor %} 58 </table> 59 </form> 60 </section> 61 {# 62 {% for time in tspp %} 63 {{ time }} 64 </br> 65 {% endfor %} 66 #} 67 {% endblock %}