widget.html (2306B)
1 <section class="activeusers"> 2 <h3>Clocked in Crew List</h3> 3 {# 4 {% for user in clocked_in_users %} 5 {%- print(user.modified_by.0) %} 6 {% endfor %} 7 #} 8 <form> 9 <!-- <input type="submit" value="Clock Crew Out"> --> 10 <table><!-- replace w/ function getUserHours(username) --> 11 {% for user in clocked_in_users %} 12 <tr> 13 <td><a href="{{ url_for('hours',username=user.modified_by.0) }}" class="action-button">{{ user.modified_by.0 }}</a></td> 14 <td><a href="{{ url_for('toggle_lunch',timeid=user._id) }}"> 15 {% if user.lunch %} 16 <input type="checkbox" name="lunch" checked><label for="lunch">Lunch</label> 17 {% else %} 18 <input type="checkbox" name="lunch"><label for="lunch">Lunch</label> 19 {% endif %} 20 </a></td> 21 <td><a href="{{ url_for('toggle_per_diem',timeid=user._id) }}"> 22 {% if user.per_diem %} 23 <input type="checkbox" name="per_diem" checked><label for="per_diem">Per Diem</label> 24 {% else %} 25 <input type="checkbox" name="per_diem"><label for="per_diem">Per Diem</label> 26 {% endif %} 27 </a></td> 28 <td><a href="{{ url_for('hours',username=user.modified_by.0) }}" class="action-button">{{ user.clock_in.0.isoformat(timespec='minutes') }}</a></td><!-- can format/display non-military time with format %I:%M%p removed.time() after index to try and show date value--> 29 <td><a href="{{ url_for('clockout_by_id',modusernm=current_user.username,timeid=user._id) }}" class="action-button">Clock Out</a></td> 30 </tr> 31 {% endfor %} 32 </table> 33 </form> 34 <a href="{{ url_for('clockin_new_user') }}" class="action-button">Clock in User</a> 35 <a href="{{ url_for('new_user_time') }}" class="action-button">New User Entry</a> 36 <!-- clock in clocked out user MIGHT NEED TO COMMENT OUT... DOES NOT GET DATA FROM FORMS ON SUBMIT... ONLY USES DEFAULT.data --> 37 <!-- <form> 38 <table> 39 <tr> 40 <td>{{ crewform.userSel.label }} {{ crewform.userSel() }}</td> 41 <td>{{ crewform.projectSel.label }} {{ crewform.projectSel() }}</td> 42 <td>{{ crewform.time.label }} {{ crewform.time() }}</td> 43 <td><button type="submit"><a href="{{ url_for('clockin_by_id', modusernm=current_user.username, intime=crewform.time.data, project=crewform.projectSel.data, usertoinid=crewform.userSel.data) }}">Clock In</a></button></td> 44 </tr> 45 </table> 46 </form> 47 --> 48 </section>