Skip to content

Commit

Permalink
#468 solved request params for app.vue issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrflood committed Aug 23, 2018
1 parent 8463170 commit 904a30d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/controllers/tasks/nomenclature/by_source_controller.rb
Expand Up @@ -8,7 +8,8 @@ def index
redirect_to sources_path and return
end

@source = Source.find(params[:id]) if !params[:id].blank?
@source = Source.find(params[:id]) unless params[:id].blank?
@source ||= Project.find(sessions_current_project_id).project_sources.first.source

end
end
9 changes: 5 additions & 4 deletions app/javascript/vue/tasks/nomenclature/by_source/app.vue
Expand Up @@ -7,22 +7,22 @@
:full-screen="true"
legend="Loading..."
:logo-size="{ width: '100px', height: '100px'}"/>

<nomen-source />
</div>
<div class="flexbox">
<div class="flexbox">
<h2>Cite a Taxon Name</h2>
<cite-taxon-name />
<taxon-names />
<cite-taxon-name /><br>
<taxon-names /><br>
<taxon-name-relationships />
</div>
</div>
</div>

</div>
</template>
<script>
import SmartSelector from './components/smartSelector'
import NomenSource from './components/nomen_source'
import CiteTaxonName from './components/cite_taxon_name'
import TaxonNames from './components/taxon_names'
import TaxonNameRelationships from './components/taxon_name_relationships'
Expand All @@ -38,6 +38,7 @@
export default {
components: {
SmartSelector,
NomenSource,
CiteTaxonName,
TaxonNames,
TaxonNameRelationships,
Expand Down
@@ -0,0 +1,21 @@
<template>
<div
style="width:400px; height:200px;">
<h2>Nomenclatural source: </h2>
<pre>{{ value }}</pre>
</div>
</template>
<script>
export default {
props: {
value: {
type: String,
default: window.location.href
},
sourceText: {
type: String,
default: 'This is the source from which we derive all the taxa and otus'
},
}
}
</script>
@@ -1,5 +1,5 @@
<template>
<div>
Taxon Names
<h3>Taxon Names</h3>
</div>
</template>

0 comments on commit 904a30d

Please sign in to comment.