Skip to content

Commit

Permalink
genbank in search form
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosp420 committed Dec 18, 2014
1 parent c1cdc1e commit 984ebaa
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 19 deletions.
8 changes: 7 additions & 1 deletion voseq/public_interface/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@ class AdvancedSearchForm(ModelSearchForm):
auctor = forms.CharField(label="Author", max_length=100, help_text="Person that described this taxon.", required=False)

# Sequences model
YES = 'y'
NO = 'n'
GENBANK_CHOICES = (
(YES, 'Yes'),
(NO, 'No'),
)
gene_code = forms.CharField(max_length=100, required=False)
genbank = forms.NullBooleanField(widget=forms.CheckboxInput, required=False)
genbank = forms.ChoiceField(widget=forms.RadioSelect, choices=GENBANK_CHOICES, required=False)
accession = forms.CharField(max_length=100, required=False)
labPerson = forms.CharField(max_length=100, required=False)

Expand Down
40 changes: 22 additions & 18 deletions voseq/public_interface/templates/public_interface/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,6 @@ <h3 class="panel-title"><b>Search by collection data</b></h3>
</table>
</div><!-- panel -->

<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><b>Search by publication and notes</b></h3>
</div>

<table class="table table-condensed table-striped">
<tr>
<td><b>Published in:</b></td>
<td><b>Notes:</b></td>
</tr>
<tr>
<td>{{ form.publishedIn }}</td>
<td>{{ form.notes }}</td>
</tr>
</table>
</div><!-- panel -->

</div><!-- col -->


Expand Down Expand Up @@ -189,7 +172,11 @@ <h3 class="panel-title"><b>Search by sequence information</b></h3>
</tr>
<tr>
<td><b>In Genbank?</b></td>
<td>{{ form.genbank }}</td>
<td>
{% for radio in form.genbank %}
{{ radio }}
{% endfor %}
</td>
</tr>
<tr>
<td><b>Accession number</b></td>
Expand All @@ -201,6 +188,23 @@ <h3 class="panel-title"><b>Search by sequence information</b></h3>
</tr>
</table>
</div><!-- panel -->

<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><b>Search by publication and notes</b></h3>
</div>

<table class="table table-condensed table-striped">
<tr>
<td><b>Published in:</b></td>
<td><b>Notes:</b></td>
</tr>
<tr>
<td>{{ form.publishedIn }}</td>
<td>{{ form.notes }}</td>
</tr>
</table>
</div><!-- panel -->
<input type="submit" value="Search">
</div><!-- row -->
</div>
Expand Down

0 comments on commit 984ebaa

Please sign in to comment.