<%@page import="java.util.Iterator"%>
<%@page import="retro.Idea"%>
<%@page import="java.util.List"%>
<%@page import="fonctions.IdeaDAO"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
    <link href="../bootstrap3/css/bootstrap.css" rel="stylesheet" />
    <link href="../assets/css/ct-paper.css" rel="stylesheet"/>
    <link href="../assets/css/demo.css" rel="stylesheet" />

    <!--     Fonts and icons     -->
    <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'>
<title>access-meeting</title>
</head>
<body>
<%@include file="../pages/header.jsp" %>     

<div style = "margin: 5% !important">
<%
String id_member = request.getParameter("id_member");
String id_meeting = request.getParameter("id_meeting");
%>
<h2 style="padding-top: 1em;">Insert Ideas</h2>


<div style="padding: 5%">
<form action="../controller/join/insert_idea_controller.jsp?id_meeting=<%=id_meeting%>&id_member=<%=id_member%>">


<p>
		<label style="width: 300px; display: block; float: left;">Title : </label>
		<div class="form-group">
            	<input name="libelle_idea" type="text" value="" placeholder="Title" class="form-control" required/>
            </div>
</p>
<p>
		<label style="width: 300px; display: block; float: left;">Description : </label>
        	<div class="form-group">
            	<input name="description_idea" type="text" value="" placeholder="Description" class="form-control" />
            </div>
</p>

<p>
	<label style="width: 300px; display: block; ">Idea Type : </label>
	
	  <div style="margin-left: 0px !important" class="row">
                    
                    <p>
                            <input type="radio"   name="libelle_type_idea" value="Liked" required>
                            <i></i>Liked</p>
                            <p>
                            <input type="radio"   name="libelle_type_idea" value="Learned" >
                            <i></i>Learned</p>
                            <p>
                            <input type="radio"   name="libelle_type_idea" value="Longed_For">
                            <i></i>Longed For</p>
                            <p>
                            <input type="radio"   name="libelle_type_idea" value="Lacked" >
                            <i></i>Lacked</p>
                                   
	</div>
	

<p style="display : none;">
<input type="text" name="id_member" value="<%=id_member%>">
<input type="text" name="id_meeting" value="<%=id_meeting%>">
</p>
<input class="btn btn-success" type="submit" value="Add">

</form>

<hr>

<%
			IdeaDAO obj_ReadValues1 = new IdeaDAO();
			List<Idea> list1 = obj_ReadValues1.get_IdeaByIDmember(id_member, id_meeting);
			Iterator<Idea> it_list1 = list1.iterator();
		%>

		<center>
			<table style="width: 100%; border-collapse: collapse;">

				<style>
th, td {
	padding: 3px;
	border: 1px solid #fff;
	text-align: center;
}

th {
	background: #999690;
	color: white;
	font-weight: bold;
}
</style>

				<th>ID</th>
				<th>Title</th>
				<th>Description</th>
				<th>Idea Type</th>
				
				
				<%
					while (it_list1.hasNext()) {
						Idea obj_Idea1 = new Idea();
						obj_Idea1 = it_list1.next();
				%>

						<tr>
							<td><%=obj_Idea1.getId_idea()%></td>
							<td><%=obj_Idea1.getLibelle_idea()%></td>
							<td><%=obj_Idea1.getDescription_idea()%></td>
							<td><%=obj_Idea1.getLibelle_type_idea()%></td>
							<td><a href="../controller/join/delete_idea.jsp?id_meeting=<%=id_meeting%>&id_member=<%=id_member %>&id_idea=<%=obj_Idea1.getId_idea()%>"><span class="label label-danger">DELETE</span></a></td>
							
						</tr>

				<%
					}
				%>
			</table>
						
			<br><br>
			<p><a href="access-page.jsp?id_member=<%= request.getParameter("id_member") %>">Previous</a></p>
			</div>
			<hr>
			
			<%@include file="../display-ideas.jsp" %>
			
</div>
<%@include file="footer.jsp" %>     

</body>

<script src="../assets/js/jquery-1.10.2.js" type="text/javascript"></script>
	<script src="../assets/js/jquery-ui-1.10.4.custom.min.js" type="text/javascript"></script>

	<script src="../bootstrap3/js/bootstrap.js" type="text/javascript"></script>

	<!--  Plugins -->
	<script src="../assets/js/ct-paper-checkbox.js"></script>
	<script src="../assets/js/bootstrap-select.js"></script>
	<script src="../assets/js/bootstrap-datepicker.js"></script>
<script src="../assets/js/ct-paper-radio.js"></script>
	<script src="../assets/js/ct-paper.js"></script>
</html>