From dcdb588f736df433d3a09aedd0fe50cb9f80e794 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Fri, 27 Sep 2019 10:50:44 -0500
Subject: Added extra larger buttons to submit changes to news and other pages
+ fixed issue where encoding was sometimes weird for Authors in search result
(still need to do this in other places)
---
wqflask/wqflask/templates/docedit.html | 8 +++++++-
wqflask/wqflask/templates/search_result_page.html | 9 +++++++--
wqflask/wqflask/views.py | 2 +-
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/wqflask/wqflask/templates/docedit.html b/wqflask/wqflask/templates/docedit.html
index e8aa7da1..b87c5b41 100644
--- a/wqflask/wqflask/templates/docedit.html
+++ b/wqflask/wqflask/templates/docedit.html
@@ -5,20 +5,26 @@
{% block content %}
Edit: {{title}}
-
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index 2c67f6c3..262a563d 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -348,9 +348,14 @@
'render': function(data, type, row, meta) {
author_list = data.authors.split(",")
if (author_list.length >= 6) {
- return author_list.slice(0, 6).join(",") + ", et al."
+ author_string = author_list.slice(0, 6).join(",") + ", et al."
} else{
- return data.authors
+ author_string = data.authors
+ }
+ try {
+ return decodeURIComponent(escape(author_string))
+ } catch(err){
+ return escape(author_string)
}
}
},
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 70748040..bff9f9d2 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -307,7 +307,7 @@ def submit_trait_form():
@app.route("/create_temp_trait", methods=('POST',))
def create_temp_trait():
logger.info(request.url)
- print("REQUEST.FORM:", request.form)
+
#template_vars = submit_trait.SubmitTrait(request.form)
doc = docs.Docs("links")
--
cgit v1.2.3