diff options
author | Lei Yan | 2014-12-18 16:51:47 +0000 |
---|---|---|
committer | Lei Yan | 2014-12-18 16:51:47 +0000 |
commit | 4ea8b8a5efc848c99767894cbdbef2f135e3b83c (patch) | |
tree | cecfbdeb17d9ce468c284f4fd9cb7420544e680b /wqflask | |
parent | 5ec961a719246d5082814c8eb49ee3f3d7cea11e (diff) | |
download | genenetwork2-4ea8b8a5efc848c99767894cbdbef2f135e3b83c.tar.gz |
Committer: Lei Yan <lei@penguin.uthsc.edu>
On branch master
Diffstat (limited to 'wqflask')
-rwxr-xr-x | wqflask/wqflask/docs.py | 1 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/docedit.html (renamed from wqflask/wqflask/templates/testhtmleditor.html) | 8 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/docs.html | 5 | ||||
-rwxr-xr-x | wqflask/wqflask/views.py | 7 |
4 files changed, 14 insertions, 7 deletions
diff --git a/wqflask/wqflask/docs.py b/wqflask/wqflask/docs.py index 65255987..07b0b81a 100755 --- a/wqflask/wqflask/docs.py +++ b/wqflask/wqflask/docs.py @@ -11,5 +11,6 @@ class Docs(object): WHERE Docs.entry LIKE '%s' """ result = g.db.execute(sql % (entry)).fetchone() + self.entry = entry self.title = result[0] self.content = result[1] diff --git a/wqflask/wqflask/templates/testhtmleditor.html b/wqflask/wqflask/templates/docedit.html index 1d258d0e..1a9e8ca8 100755 --- a/wqflask/wqflask/templates/testhtmleditor.html +++ b/wqflask/wqflask/templates/docedit.html @@ -1,18 +1,18 @@ {% extends "base.html" %} -{% block title %}Test html editor{% endblock %} +{% block title %}Edit: {{title}}{% endblock %} {% block content %} <div class="container"> - <h2>Test HTML Editor</h2> + <h3>Edit: {{title}}</h3> <form> <textarea name="ckcontent" id="ckcontent"> - Test HTML + {{content|safe}} </textarea> <script type="text/javascript" src="/static/packages/ckeditor/ckeditor.js"></script> <script type="text/javascript"> CKEDITOR.replace('ckcontent', { - height: '500px', + height: '650px', }); </script> </form> diff --git a/wqflask/wqflask/templates/docs.html b/wqflask/wqflask/templates/docs.html index cbaf1e70..08f95721 100755 --- a/wqflask/wqflask/templates/docs.html +++ b/wqflask/wqflask/templates/docs.html @@ -5,6 +5,11 @@ {% block content %} <div class="container"> <h3>{{title}}</h3> + <div style="text-align: right;"> + <a href="docedit?entry={{entry}}"> + <img style="width: 25px;" src="/static/images/edit.png"> + </a> + </div> {{content|safe}} </div> {% endblock %} diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index cdf93147..deb566ba 100755 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -134,9 +134,10 @@ def search_page(): else: return render_template("search_result_page.html", **result) -@app.route("/testhtmleditor") -def testhtmleditor_page(): - return render_template("testhtmleditor.html") +@app.route("/docedit") +def docedit(): + doc = docs.Docs(request.args['entry']) + return render_template("docedit.html", **doc.__dict__) @app.route("/help") def help(): |