aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/search_results.py4
-rw-r--r--wqflask/wqflask/templates/search_result_page.html8
2 files changed, 6 insertions, 6 deletions
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index 807e7305..858ca56d 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -203,8 +203,8 @@ class SearchResultPage:
for i, trait in enumerate(trait_list):
for key in trait.keys():
if key == "authors":
- authors_string = ",".join(str(trait[key]).split(",")[:6]) + ", et al."
- self.max_widths[key] = max(len(authors_string), self.max_widths[key]) if key in self.max_widths else len(str(trait[key]))
+ authors_string = ",".join(str(trait[key]).split(",")[:2]) + ", et al."
+ self.max_widths[key] = max(len(authors_string), self.max_widths[key]) if key in self.max_widths else len(str(authors_string))
else:
self.max_widths[key] = max(len(str(trait[key])), self.max_widths[key]) if key in self.max_widths else len(str(trait[key]))
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index c6e4b4d2..b9859229 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -313,8 +313,8 @@
{
'title': "Authors",
'type': "natural",
- {% if (max_widths.authors * 7) < 500 %}
- 'width': "{{ max_widths.authors * 7 }}px",
+ {% if (max_widths.authors * 5) < 500 %}
+ 'width': "{{ max_widths.authors * 5 }}px",
{% else %}
'width': "500px",
{% endif %}
@@ -322,8 +322,8 @@
'targets': 5,
'render': function(data, type, row, meta) {
author_list = data.authors.split(",")
- if (author_list.length >= 6) {
- author_string = author_list.slice(0, 6).join(",") + ", et al."
+ if (author_list.length >= 2) {
+ author_string = author_list.slice(0, 2).join(",") + ", et al."
} else{
author_string = data.authors
}