diff options
author | Alvin Li <liweitianux@gmail.com> | 2013-08-13 14:13:24 +0800 |
---|---|---|
committer | Alvin Li <liweitianux@gmail.com> | 2013-08-13 14:13:24 +0800 |
commit | 9636d4a6767f49384d5c386bc3f1142c88b90613 (patch) | |
tree | 3a70f6d9e4be1791d36c87cc7cbfd1d5aa2b39dd /97suifangqa/templates/search | |
parent | 9383d9a8a5988d071766c3d08a5c946e9c5b02ae (diff) | |
download | 97dev-9636d4a6767f49384d5c386bc3f1142c88b90613.tar.bz2 |
cloned from 'bitbucket', 2013/08/13
Diffstat (limited to '97suifangqa/templates/search')
7 files changed, 106 insertions, 0 deletions
diff --git a/97suifangqa/templates/search/indexes/indicator/indicator_text.txt b/97suifangqa/templates/search/indexes/indicator/indicator_text.txt new file mode 100644 index 0000000..4ccb33e --- /dev/null +++ b/97suifangqa/templates/search/indexes/indicator/indicator_text.txt @@ -0,0 +1,6 @@ +{{ object.name }} +{{ object.pinyin }} +{{ object.englishName }} +{{ object.description }} +{{ object.helpText }} + diff --git a/97suifangqa/templates/search/indexes/indicator/indicatorcategory_text.txt b/97suifangqa/templates/search/indexes/indicator/indicatorcategory_text.txt new file mode 100644 index 0000000..df4ffac --- /dev/null +++ b/97suifangqa/templates/search/indexes/indicator/indicatorcategory_text.txt @@ -0,0 +1,5 @@ +{{ object.name }} +{{ object.pinyin }} +{{ object.englishName }} +{{ object.description }} + diff --git a/97suifangqa/templates/search/indexes/info/query_text.txt b/97suifangqa/templates/search/indexes/info/query_text.txt new file mode 100644 index 0000000..1451635 --- /dev/null +++ b/97suifangqa/templates/search/indexes/info/query_text.txt @@ -0,0 +1,2 @@ +{{ object.content }} +{{ object.user.get_full_name }} diff --git a/97suifangqa/templates/search/indexes/sciblog/blogannotation_text.txt b/97suifangqa/templates/search/indexes/sciblog/blogannotation_text.txt new file mode 100644 index 0000000..a347fc0 --- /dev/null +++ b/97suifangqa/templates/search/indexes/sciblog/blogannotation_text.txt @@ -0,0 +1,5 @@ +{{ object.brief_content }} +{{ object.detail }} +{% for keyword in object.keywords.all %} +{{ keyword.content }} +{% endfor %} diff --git a/97suifangqa/templates/search/indexes/sciblog/sciblog_text.txt b/97suifangqa/templates/search/indexes/sciblog/sciblog_text.txt new file mode 100644 index 0000000..edc145c --- /dev/null +++ b/97suifangqa/templates/search/indexes/sciblog/sciblog_text.txt @@ -0,0 +1,30 @@ +{{ object.title }} +{{ object.subhead }} +{{ object.journal }} +{{ object.entitle }} +{{ object.authors }} +{{ object.method }} +{{ object.aim }} +{{ object.abstract_result }} +{{ object.abstractAE }} +{{ object.treatment_content }} +{{ object.endpoint_content }} +{% for endpoint in object.endpoint_content.all %} +{{ endpoint.content }} +{% endfor %} + +{% for que in object.query.all %} +{{ que.content }} +{% endfor %} + +{{ object.conclusion }} + +{% for piece in object.konwledge_piece.all %} +{{ piece.content }} +{% endfor %} + +{{ object.detectionAssay }} + +{% for result in object.results.all %} +{{ result.content }} +{% endfor %} diff --git a/97suifangqa/templates/search/query/index.html b/97suifangqa/templates/search/query/index.html new file mode 100644 index 0000000..7e504fc --- /dev/null +++ b/97suifangqa/templates/search/query/index.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block otherlinks %} + <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400,600"> +{% endblock %} + +{% block bodyclass %}bg{% endblock %} + +{% block body %} + {% include "profile/person-info.html" %} + <div class="body"> + <form method="post" class="search" action="/blog/query"> + {% csrf_token %} + <input type="text" name="q" placeholder="乙肝甲肝各种肝炎" class="queinput"> + <input type="submit" value="提问" class="quebtn"> + </form> + <div class="site_logo"></div> + </div> +{% endblock %} diff --git a/97suifangqa/templates/search/search.html b/97suifangqa/templates/search/search.html new file mode 100644 index 0000000..7308de0 --- /dev/null +++ b/97suifangqa/templates/search/search.html @@ -0,0 +1,39 @@ +{% extends 'base.html' %} + +{% block page %} + <h2>Search</h2> + + <form method="get" action="."> + <table> + {{ form.as_table }} + <tr> + <td> </td> + <td> + <input type="submit" value="Search" /> + </td> + </tr> + </table> + + {% if query %} + <h3>Results</h3> + + {% for result in page.object_list %} + <p> + <a href="{{ result.object.get_absolute_url }}">{{ result.object.show }}</a> + </p> + {% empty %} + <p>No results found.</p> + {% endfor %} + + {% if page.has_previous or page.has_next %} + <div> + {% if page.has_previous %}<a href="?q={{ query }}&page={{ page.previous_page_number }}">{% endif %}« Previous{% if page.has_previous %}</a>{% endif %} + | + {% if page.has_next %}<a href="?q={{ query }}&page={{ page.next_page_number }}">{% endif %}Next »{% if page.has_next %}</a>{% endif %} + </div> + {% endif %} + {% else %} + {# Show some example queries to run, maybe query syntax, something else? #} + {% endif %} + </form> +{% endblock %} |