-
Notifications
You must be signed in to change notification settings - Fork 3
/
positionlist.html
52 lines (44 loc) · 1.41 KB
/
positionlist.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% include header.html%}
<script>
function submitForm() {
var newUrl = window.location.origin + '/searchresult/' + searchbar.value + '/' + typeschoice.value + '/';
window.location.replace(newUrl);
}
</script>
<input id="searchbar" type="text" size="40" name="field_name" placeholder="Search">
<select id="typeschoice" name="type">
<option value="alltypes" selected>all types</option>
<option value="internship">Internship</option>
<option value="apprenticeships">Apprenticeships</option>
<option value="workexperience">Work experience</option>
</select>
<button id="searchbutton" name="searchbutton">Search</button>
{% if position %}
{% for item in position %}
<img id="positionimage" src="/static/computer.jpg">
<article class="right-two">
<h2><a href="/position/{{item.id}}/">{{item.positionname}}</a> </h2>
<h3>{{item.positiontype}} at {{item.companyname}}</h3>
<p>{{item.blurb[:100]}}...</p>
</article>
<hr>
{% end for %}
{% end if %}
{% if not position %}
<p>No results found</p>
{% end if %}
</main>
<footer>
<h5>footer</h5>
</footer>
<script>
searchbutton.onclick = submitForm;
searchbar.onkeypress = function(ev){
if(ev.key == 'Enter'){
submitForm()
}
}
</script>
</body>
</html>
{% include footer.html %}