-
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.
- Loading branch information
Showing
7 changed files
with
144 additions
and
1 deletion.
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
95 changes: 95 additions & 0 deletions
95
app/assets/javascripts/species/templates/taxon_concept/_cites_processes.handlebars
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,95 @@ | ||
<strong class="title">CITES PROCESSES</strong> | ||
{{#unless citesProcesses}} | ||
{{#if citesProcessesIsLoading}} | ||
{{ partial 'species/spinner'}} | ||
{{else}} | ||
<p class="empty">There are no current cases for this species.</p> | ||
{{/if}} | ||
{{else}} | ||
<table summary="data table"> | ||
<thead> | ||
<tr> | ||
<th class="col2">RESOLUTION</th> | ||
<th class="col14">COUNTRY</th> | ||
<th class="col2">DATE ENTRY</th> | ||
<th class="col14">DOCUMENT</th> | ||
<th class="col14">CASE STATUS</th> | ||
<th class="col2">NOTES</th> | ||
</tr> | ||
</thead> | ||
<tbody {{bind-attr class="controller.citesProcessExpanded:historic_expanded"}}> | ||
{{#each process in currentCitesProcesses}} | ||
<tr class="current"> | ||
<td> | ||
{{process.resolution}} | ||
</td> | ||
<td> | ||
{{process.geo_entity.name}} | ||
</td> | ||
<td> | ||
{{process.start_event_name}} ({{process.start_date}}) | ||
</td> | ||
<td> | ||
</td> | ||
<td> | ||
{{process.status}} | ||
</td> | ||
<td> | ||
{{process.notes}} | ||
</td> | ||
</tr> | ||
{{else}} | ||
<tr class="current"> | ||
<td colspan=4>There are no current cases for this species.</td> | ||
</tr> | ||
{{/each}} | ||
</tbody> | ||
</table> | ||
{{#if historicCitesProcesses}} | ||
<div {{bind-attr class=":historic controller.citesProcessesExpanded::hidden"}}> | ||
<table summary="data table"> | ||
<thead> | ||
<tr> | ||
<th class="col2"> </th> | ||
<th class="col14"> </th> | ||
<th class="col2"> </th> | ||
<th class="col14"> </th> | ||
<th class="col14"> </th> | ||
<th class="col2"> </th> | ||
</tr> | ||
</thead> | ||
<tbody {{bind-attr class="controller.citesProcessExpanded:historic_expanded"}}> | ||
{{#each process in historicCitesProcesses}} | ||
<tr> | ||
<td> | ||
{{process.resolution}} | ||
</td> | ||
<td> | ||
{{process.geo_entity.name}} | ||
</td> | ||
<td> | ||
{{process.start_event_name}} ({{process.start_date}}) | ||
</td> | ||
<td> | ||
</td> | ||
<td> | ||
{{process.status}} | ||
</td> | ||
<td> | ||
{{process.notes}} | ||
</td> | ||
</tr> | ||
{{/each}} | ||
</tbody> | ||
</table> | ||
</div> | ||
<div {{bind-attr class=":btn-hloder citesProcessesExpanded:expanded"}}> | ||
{{#if controller.citesProcessesExpanded}} | ||
<a class="link active" {{action 'contractList' 'cites_processes' 'citesProcessesExpanded'}}>HIDE HISTORY</a> | ||
{{else}} | ||
<a class="link" {{action 'expandList' 'cites_processes' 'citesProcessesExpanded'}}>SHOW HISTORY</a> | ||
{{/if}} | ||
</div> | ||
{{/if}} | ||
|
||
{{/unless}} |
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,10 @@ | ||
class Species::CitesProcessSerializer < ActiveModel::Serializer | ||
attributes :resolution, { :start_date_formatted => :start_date }, | ||
:notes, :geo_entity, :status, :start_event_name | ||
|
||
|
||
def start_event_name | ||
object.start_event.name | ||
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