-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(search): add ability to search for staff or asset by id (#191)
* feat(search): add ability to search for staff or asset by id Co-authored-by: Daniel Rahamim <[email protected]> * style(app): fix syntax issue in core code Signed-off-by: Daniel Rahamim <[email protected]> * fix(links): staff id links incorrectly tried to load assets detail Signed-off-by: Daniel Rahamim <[email protected]> * style(app): remove excess spaces Signed-off-by: Daniel Rahamim <[email protected]> --------- Signed-off-by: Daniel Rahamim <[email protected]> Co-authored-by: Daniel Rahamim <[email protected]>
- Loading branch information
Showing
5 changed files
with
103 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{% extends 'base.html' %} | ||
{% block content %} | ||
<h1>{% block title %} Search {% endblock %}</h1> | ||
<h4>Staff</h4> | ||
<table id="staff" class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th>Staff ID</th> | ||
<th>First Name</th> | ||
<th>Last Name</th> | ||
<th>Division</th> | ||
<th>Department</th> | ||
<th>Title</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for person in staff %} | ||
<tr> | ||
<td><a href='/single_history/staff/{{person.id}}'> {{ person.id }}</a></td> | ||
<td>{{ person.first_name }}</td> | ||
<td>{{ person.last_name }}</td> | ||
<td>{{ person.division }}</td> | ||
<td>{{ person.department }}</td> | ||
<td>{{ person.title }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
|
||
<h4>Assets</h4> | ||
<table id="assets" class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th>Asset ID</th> | ||
<th>Asset Type</th> | ||
<th>Asset Status</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for item in assets %} | ||
<tr> | ||
<td><a href='/single_history/asset/{{item.id}}'> {{ item.id }}</a></td> | ||
<td>{{ item.asset_type }}</td> | ||
<td>{{ item.asset_status }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endblock %} |