Closed Bibiko closed 7 years ago
The column 'name' in ./phylogenies/index.csv should be used. Is this imported into the database somewhere?
Yes, it is. The tree has a Source
, and the name
attribute of this source is filled from the CSV.
Ah, I see - the column is "hidden" in table source > name - I'll try to fetch this field for displaying.
This does the trick:
diff --git a/dplace_app/static/partials/societies/tree.html b/dplace_app/static/partials/societies/tree.html
index 59474e9..effa967 100644
--- a/dplace_app/static/partials/societies/tree.html
+++ b/dplace_app/static/partials/societies/tree.html
@@ -20,7 +20,7 @@
class="form-control"
style="width:100%"
ng-change="treeSelected()"
- ng-options="tree.name for tree in trees| orderBy:'name'"
+ ng-options="tree.source ? tree.source.name: tree.name for tree in trees| orderBy:'name'"
ng-show="!globalTree"
>
<option value="">Select a Tree</option>
@@ -158,4 +158,4 @@
</div>
</td></tr>
</table>
yeap - it does
If you want to select a phylogeny tree the list now will come up with e.g.
bouckaert_et_al2012
bowers_and_atkinson2012
dunn_et_al_2011_utoaztecan
... Firstly, it's a bit ugly, but secondly if an user doesn't know these sources s/he has no clue which area/societies/families a tree covers, except fordunn_et_al_2011_utoaztecan
.Better would be maybe something like:
Bouckaert et al 2012. (Indo-European)
Bowers and Atkinson 2012. (Pama-Nyungan)
Dunn et al 2011. (Uto-Aztecan)
The cleanest way would be to provide this information separately for the import. Of course, one also could rename theses trees accordingly like:
Bowers_and_Atkinson_2012_(Pama-Nyungan)
but then we could have problems if a name contains diacritics.Comments?