<%@ include file="/includes.jsp"%>
<%@ include file="lockMeetingPopUp.jsp" %>
<div class="meetingNavigationPanel" style="width:100%;">
			<table width="100%">
				<tr>
					<th>
					Meeting actions
					</th>
					<th>
						<c:if test="${emdt.currentMeeting != null}">
							Attendee actions
						</c:if>
					</th>
					<th>
						<c:if test="${emdt.currentMeeting != null}">
							Patient actions
						</c:if>
					</th>
				</tr>
				<tr>
					<td>
					 	<sec:authorize access="hasAnyRole('MEETING_ADMIN','ADMIN')">
							<a href="createAndEditMeeting.form?action=create">Add a New Meeting... <img src="../images/16x16/bullet_go.png" /></a>
						</sec:authorize>
					
						<br/>
						<br/>
						<c:if test="${emdt.currentMeeting != null}">						
							<a href="printPatientsInCurrentMeeting.jsp" target="_blank">Print Meeting <img src="../images/16x16/bullet_go.png" /> </a> <br/>
							<br/>
						</c:if>
						<a href="setMeetingFilter.form?filterId=0">Select Another Meeting <img src="../images/16x16/bullet_go.png" /> </a> <br/>
						 <br/>

					 	<sec:authorize access="hasAnyRole('MEETING_ADMIN','ADMIN')">
						 
							<a href="../meetings/meetingSchedule.form">View or edit Meetings Schedule <img src="../images/16x16/bullet_go.png" /> </a> <br/>					
							
							 <br/>
							 
							<c:if test="${emdt.currentMeeting != null}">						
								<a href="createAndEditMeeting.form?action=edit">Edit Meeting <img src="../images/16x16/bullet_go.png" /> </a> <br/>
								<br/>
							</c:if>
							<c:if test="${emdt.currentMeeting != null}">						
							<!-- 
								TODO next
								<a href="createAndEditMeeting.form?action=lock" target="_blank">Lock Meeting <img src="../images/16x16/bullet_go.png" /> </a> <br/>
								<br/>
							 -->
							</c:if>
							<c:if test="${emdt.currentMeeting.locked eq 'false'}">
								<c:if test="${emdt.currentMeeting.id gt 0 and emdt.currentMeeting.pastMeeting eq 'true'}">
									<a href="javaScript:confirmLockMeeting();">Lock Meeting <img src="../images/16x16/bullet_go.png" /></a> <br/> <br/>
								</c:if>
							</c:if>
						</sec:authorize>

                        <c:if test="${emdt.currentMeeting != null}">
                            <a href="closeMeeting.form" onclick="return dataGuard()">Close&nbsp;Meeting<img src="../images/16x16/bullet_go.png" /></a> <br/> <br/>
                            <a href="resumeMeeting.form">Return to Current Meeting <img src="../images/16x16/arrow_undo.png" /> </a> <br/>
						</c:if>
					</td>
					
					<td>
					 	<sec:authorize access="hasAnyRole('MEETING_ADMIN','ADMIN')">
							<c:if test="${emdt.currentMeeting != null}">
											
							<a href="viewMeetingAttendee.form">Change or Invite Attendees <img src="../images/16x16/bullet_go.png" /></a> <br/>
							<br/>
							<a href="editMeetingFollowupMails.form">Post-Meeting Follow Ups <img src="../images/16x16/bullet_go.png" /> </a> <br/>
							<br/>
							</c:if>
						</sec:authorize>
					</td>
					
					<td>
					 	<sec:authorize access="hasAnyRole('MEETING_ADMIN','ADMIN')">
							<c:if test="${emdt.currentMeeting != null}">
								<a href="addMeetingPatients.form">Change Patients <img src="../images/16x16/bullet_go.png" /> </a> <br/>
								<br/>
							</c:if>
						</sec:authorize>
						<c:if test="${emdt.currentMeeting != null}">
							<c:if test="${emdt.currentMeeting.currentItem.patientDiscussed != null}">
								<a href="patientMeetingHistoryReport.form?patient=${emdt.currentMeeting.currentItem.patientDiscussed.guid}" target="_blank">All meetings involving this patient <img src="../images/16x16/bullet_go.png" /> </a> <br/>
								<br/>
							</c:if>
					
						 	<sec:authorize access="hasAnyRole('MEETING_ADMIN','ADMIN')">
							<c:choose>
								<c:when test="${requestScope.message ne null and requestScope.message eq 'There are no patients in this meeting.'}">
								  <a onmouseover="this.href='javascript:void(0)';this.disabled=true" >Change Patient Order  </a> 
								</c:when>
								<c:otherwise>
									<a href="reOrderMeetingItems.jsp" >Change Patient Order <img src="../images/16x16/bullet_go.png" />  </a> 
								</c:otherwise>
							</c:choose>
							</sec:authorize>
						</c:if>
					</td>
				</tr>
			
			</table>
		</div>