Commit e45f4870 authored by Tiago Salmito's avatar Tiago Salmito
Browse files

Including datatables on base and list projects

parent 4592e832
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -7,10 +7,13 @@
		
		


		<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
		<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
		<link href="//netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" media="screen">
		<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.13/css/jquery.dataTables.css">
		<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
		<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
		<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
		<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>


		<script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
		<script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.13/js/jquery.dataTables.js"></script>
		<link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
		<link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">


		<script type="text/javascript">
		<script type="text/javascript">
+10 −17
Original line number Original line Diff line number Diff line
@@ -13,30 +13,16 @@
	<form class="form-horizontal" role="form" action="" method="post">
	<form class="form-horizontal" role="form" action="" method="post">
		{% csrf_token %}
		{% csrf_token %}


		{% for field in form %}
		
		<div class="form-group">
		{{field.errors}}
			<div class="col-sm-3">
				<label for="{{ field.id_for_label }}" class="control-label">{{ field.label }}</label>
			</div>
			<div class="col-sm-7">
				{{field}}
			</div>
			<div class="col-sm-1">
				<button type="" class="btn btn-primary">Search</button>
			</div>
		</div>
		{% endfor %}
	
	{% if no_result == False %}		
	{% if no_result == False %}		
		<table class="table">
		<table class="table" id="projectList">
			<thead>
			<tr>
			<tr>
				<th>{{ project_headers.project_name }}</th>
				<th>{{ project_headers.project_name }}</th>
				<th>{{ project_headers.project_owner }}</th>
				<th>{{ project_headers.project_owner }}</th>
				<th>{{ project_headers.project_purpose }}</th>
				<th>{{ project_headers.project_purpose }}</th>
				<th></th>
				<th></th>
			</tr>
			</tr>
			</thead>
			<tbody>
			<tbody>
				{% for project, project_values in projects.items %}
				{% for project, project_values in projects.items %}
					<tr>
					<tr>
@@ -68,6 +54,12 @@
		</table>
		</table>
	</form>	
	</form>	


	<script type="text/javascript">
	$(document).ready( function () {
	    $('#projectList').DataTable();
	} );
	</script>



	{% else %}
	{% else %}


@@ -75,4 +67,5 @@


	{% endif %}
	{% endif %}



{% endblock content %}
{% endblock content %}