Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

improve indel primer list page #36

Merged
merged 2 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions base/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -638,3 +638,13 @@ article {
padding-left: 0px;
padding-right: 0px;
}

.dataTables_filter {
padding-top: 10px;
padding-bottom: 10px;
}

.dataTables_length {
padding-top: 10px;
padding-bottom: 10px;
}
18 changes: 9 additions & 9 deletions base/templates/tools/indel_primer.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
These regions should be avoided because indel calls are less reliable and high levels of variation will make primer searches more error-prone.
</p>
</div>
<div class='row'>
<div class='col-md-4'></div>
<div class='col-md-4 btn-top-row'>
<a role="button" class="btn btn-primary btn-block" href='{{ url_for("indel_primer.indel_primer_result_list") }}' >
<span class="glyphicon glyphicon-list" aria-hidden="true"></span>
My Indel Primer Results
</a>
</div>
</div>
<div class='row'>
<form id='form-submit' method="POST">
{{ form.csrf_token }}
Expand All @@ -47,15 +56,6 @@
</div>
<div class="row">
<div id="browser"></div>
<div class='row'>
<div class='col-md-4'></div>
<div class='col-md-4 btn-mid-row'>
<a role="button" class="btn btn-primary btn-block" href='{{ url_for("indel_primer.indel_primer_result_list") }}' >
<span class="glyphicon glyphicon-list" aria-hidden="true"></span>
My Indel Primer Results
</a>
</div>
</div>
<table id="results" class='table table-striped table-hover table-compact'></table>
</div>

Expand Down
79 changes: 61 additions & 18 deletions base/templates/tools/ip_result_list.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,55 @@
{% extends "_layouts/default.html" %}

{% block custom_head %}
<link rel="stylesheet" href="//cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css" />
<script type="text/javascript" src="//cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js"></script>
{% endblock %}

{% block style %}
<style>

table.dataTable thead .sorting_asc {
background: url("http://cdn.datatables.net/1.10.0/images/sort_asc.png") no-repeat center left;
}
table.dataTable thead .sorting_desc {
background: url("http://cdn.datatables.net/1.10.0/images/sort_desc.png") no-repeat center left;
}
table.dataTable thead .sorting {
background: url("http://cdn.datatables.net/1.10.0/images/sort_both.png") no-repeat center left;
}

</style>
{% endblock %}

{% block content %}

<div class="row">
<div class="col-md-12">

<table class='table strain-table table-striped table-hover table-compact' style='width:100%;table-layout:fixed;'>

<table id='ip-table' class='strain-table table-striped table-hover table-compact' style='width:100%;table-layout:fixed;'>
<thead>
<tr class="header">
<th><strong> Site </strong></th>
<th></th>
<th><strong> Strain 1 </strong></th>
<th><strong> Strain 2 </strong></th>
<th><strong> Empty </strong></th>
<th><strong> Status </strong></th>
<th><strong> Date </strong></th>
<th></th>
<th style='width:25%' class='data-site sorting'><strong> Site </strong></th>
<th style='width:13%' class='data-s1 sorting'><strong> Strain 1 </strong></th>
<th style='width:13%' class='data-s2 sorting'><strong> Strain 2 </strong></th>
<th style='width:9%' class='data-empty ordering'><strong> Empty </strong></th>
<th style='width:15%' class='data-status ordering'><strong> Status </strong></th>
<th style='width:25%' class='data-date ordering'><strong> Date </strong></th>
</tr>
</thead>

<tbody>
{% for item in items %}
<tr>
{% if item %}
<td colspan="2"> {{ item.site }} </td>
<td> {{ item.strain1 }} </td>
<td> {{ item.strain2 }} </td>
<td class="data-site"> {{ item.site }} </td>
<td class="data-s1"> {{ item.strain1 }} </td>
<td class="data-s2"> {{ item.strain2 }} </td>
{% if item.empty %}
<td><i class="glyphicon glyphicon-ok"></i></td>
<td class="data-empty" data-order='1'><i class="glyphicon glyphicon-ok" data-order='1'></i></td>
{% else %}
<td></td>
<td class="data-empty" data-order='0'></td>
{% endif %}
<td>
<td class="data-status">
{% if item.status == 'COMPLETE' %}
<a href="{{ url_for('indel_primer.pairwise_indel_query_results', id=item.key.name) }}">
{{ item.status }}
Expand All @@ -42,7 +59,7 @@
{% endif %}
</td>
{% endif %}
<td colspan="2"> {{ item.created_on|date_format }} </td>
<td class="data-date" data-order="{{ item.created_on }}""> {{ item.created_on|date_format }} </td>
</tr>
{% endfor %}
</tbody>
Expand All @@ -54,3 +71,29 @@


{% endblock %}

{% block script %}

<script>

$(document).ready(function(){

$('#ip-table').DataTable( {
paging: true,
pageLength: 25,
aaSorting: [ [5,'desc'] ],
aoColumns: [
null,
null,
null,
null,
null,
null
]
} );
});

</script>


{% endblock %}