-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tunes date checking for taxon determinations. Taxon determinations vi…
…ews. Validation for taxon determinations.
- Loading branch information
Showing
18 changed files
with
119 additions
and
127 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# forms.js.coffee | ||
# A temporary place to include form-related javascripts | ||
|
||
# A page can not have more than one form with required data | ||
bind_required_fields_and_submit = () -> | ||
$("form input.required_for_submit").change -> | ||
empty = false | ||
$("form input.required_for_submit").each -> | ||
empty = true if $(this).val() is "" | ||
return | ||
|
||
if empty | ||
$("#submit_with_required").attr "disabled", "disabled" | ||
else | ||
$("#submit_with_required").removeAttr "disabled" | ||
return | ||
return | ||
|
||
$(document).on 'ready page:load', -> | ||
bind_required_fields_and_submit(); | ||
return | ||
|
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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
module TaxonDeterminationsHelper | ||
|
||
def taxon_determination_tag(taxon_determination) | ||
return nil if taxon_determination.nil? | ||
"foo" | ||
#otu_tag(taxon_determination.otu) + " for " + object_tag(taxon_determination.biological_collection_object.metamorphosize) | ||
end | ||
end |
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
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 |
---|---|---|
@@ -1,6 +1,3 @@ | ||
<h1>Editing asserted_distribution</h1> | ||
|
||
<%= render 'form' %> | ||
<%= link_to 'Show', @asserted_distribution %> | | ||
<%= link_to 'Back', asserted_distributions_path %> |
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,31 @@ | ||
<div class="attributes"> | ||
<p> | ||
<strong>Otu:</strong> | ||
<%= otu_link(@taxon_determination.otu) %> | ||
</p> | ||
|
||
<p> | ||
<strong>Biological collection object:</strong> | ||
<%= collection_object_link(@taxon_determination.biological_collection_object.metamorphosize) %> | ||
</p> | ||
|
||
<p> | ||
<strong>Year made:</strong> | ||
<%= @taxon_determination.year_made %> | ||
</p> | ||
|
||
<p> | ||
<strong>Month made:</strong> | ||
<%= @taxon_determination.month_made %> | ||
</p> | ||
|
||
<p> | ||
<strong>Day made:</strong> | ||
<%= @taxon_determination.day_made %> | ||
</p> | ||
|
||
<p> | ||
<strong>Position:</strong> | ||
<%= @taxon_determination.position %> | ||
</p> | ||
</div> |
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 |
---|---|---|
@@ -1,43 +1 @@ | ||
<h1>Taxon Determinations</h1> | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>Biological collection object</th> | ||
<th>Otu</th> | ||
<th>Position</th> | ||
<th>Year made</th> | ||
<th>Month made</th> | ||
<th>Day made</th> | ||
<th>Created by</th> | ||
<th>Updated by</th> | ||
<th>Project</th> | ||
<th></th> | ||
<th></th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<% @taxon_determinations.each do |taxon_determination| %> | ||
<tr> | ||
<td><%= taxon_determination.biological_collection_object_id %></td> | ||
<td><%= taxon_determination.otu_id %></td> | ||
<td><%= taxon_determination.position %></td> | ||
<td><%= taxon_determination.year_made %></td> | ||
<td><%= taxon_determination.month_made %></td> | ||
<td><%= taxon_determination.day_made %></td> | ||
<td><%= taxon_determination.created_by_id %></td> | ||
<td><%= taxon_determination.updated_by_id %></td> | ||
<td><%= taxon_determination.project_id %></td> | ||
<td><%= link_to 'Show', taxon_determination %></td> | ||
<td><%= link_to 'Edit', edit_taxon_determination_path(taxon_determination) %></td> | ||
<td><%= link_to 'Destroy', taxon_determination, method: :delete, data: { confirm: 'Are you sure?' } %></td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
|
||
<br> | ||
|
||
<%= link_to 'New Taxon determination', new_taxon_determination_path %> | ||
<%= render '/shared/data/index' %> |
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 |
---|---|---|
@@ -1,49 +1 @@ | ||
<p id="notice"><%= notice %></p> | ||
|
||
<p> | ||
<strong>Biological collection object:</strong> | ||
<%= @taxon_determination.biological_collection_object_id %> | ||
</p> | ||
|
||
<p> | ||
<strong>Otu:</strong> | ||
<%= @taxon_determination.otu_id %> | ||
</p> | ||
|
||
<p> | ||
<strong>Position:</strong> | ||
<%= @taxon_determination.position %> | ||
</p> | ||
|
||
<p> | ||
<strong>Year made:</strong> | ||
<%= @taxon_determination.year_made %> | ||
</p> | ||
|
||
<p> | ||
<strong>Month made:</strong> | ||
<%= @taxon_determination.month_made %> | ||
</p> | ||
|
||
<p> | ||
<strong>Day made:</strong> | ||
<%= @taxon_determination.day_made %> | ||
</p> | ||
|
||
<p> | ||
<strong>Created by:</strong> | ||
<%= @taxon_determination.created_by_id %> | ||
</p> | ||
|
||
<p> | ||
<strong>Updated by:</strong> | ||
<%= @taxon_determination.updated_by_id %> | ||
</p> | ||
|
||
<p> | ||
<strong>Project:</strong> | ||
<%= @taxon_determination.project_id %> | ||
</p> | ||
|
||
<%= link_to 'Edit', edit_taxon_determination_path(@taxon_determination) %> | | ||
<%= link_to 'Back', taxon_determinations_path %> | ||
<%= render(partial: '/shared/data/show', locals: {object: @taxon_determination}) -%> |
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