diff options
author | gnowgi <nagarjun@gnowledge.org> | 2012-03-22 01:20:55 -0700 |
---|---|---|
committer | gnowgi <nagarjun@gnowledge.org> | 2012-03-22 01:20:55 -0700 |
commit | 1edaea35cf1e398bec7eba6cda88a3a9ce52311e (patch) | |
tree | d92611529720e4005c17756583652cf925fd487d /gstudio/templates | |
parent | 1ec24912e9268162b24a4651187a0e46192231c3 (diff) | |
parent | 23edfaddef66dcfad8236ba49dfcd2843d160a8e (diff) | |
download | gnowsys-1edaea35cf1e398bec7eba6cda88a3a9ce52311e.tar.gz |
Merge pull request #5 from anujag/master
Changed models.py in both the apps. Added extra fields "rurl" and "content_org". Search is modified to work for all node objects.
Diffstat (limited to 'gstudio/templates')
-rw-r--r-- | gstudio/templates/gstudio/base.html | 4 | ||||
-rw-r--r-- | gstudio/templates/gstudio/nodes_search.html | 49 |
2 files changed, 52 insertions, 1 deletions
diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index 2c612e1..94a72eb 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -25,7 +25,7 @@ <div class="search"> <h3>{% trans "Search" %}</h3> - <form method="get" id="searchform" action="{% url objectapp_gbobject_search %}"> + <form method="get" id="searchform" action="{% url nodes_search %}"> <p> <input type="text" value="{% trans "Keywords..." %}" name="pattern" id="searchbox" onfocus="this.value=''" /> <input type="submit" class="submitbutton" value="OK" /> @@ -35,10 +35,12 @@ </p> </form> </div> +<!-- <div class="objecttypes"> <h3>{% trans "Objecttypes" %}</h3> {% get_objecttypes %} </div> +--> <div class="authors"> <h3>{% trans "Authors" %}</h3> {% get_authors %} diff --git a/gstudio/templates/gstudio/nodes_search.html b/gstudio/templates/gstudio/nodes_search.html new file mode 100644 index 0000000..7fbc53d --- /dev/null +++ b/gstudio/templates/gstudio/nodes_search.html @@ -0,0 +1,49 @@ +{% extends "gstudio/nodetype_list.html" %} +{% load i18n gstudio_tags %} + +{% block title %}{% trans "Search results for" %} {% if pattern %}'{{ pattern }}'{% endif %}{% if page_obj %}{% ifnotequal page_obj.number 1 %} | {% trans "Page" %} {{ page_obj.number }}{% endifnotequal %}{% endif %}{% endblock %} + +{% block meta-description %}{% trans "Search results for" %} {% if pattern %}'{{ pattern }}'{% endif %}{% if page_obj %}{% ifnotequal page_obj.number 1 %} {% trans "page" %} {{ page_obj.number }}{% endifnotequal %}{% endif %}{% endblock %} + +{% block link %} + {{ block.super }} + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of search result of" %} '{{ pattern }}'" href="{% url gstudio_nodetype_search_feed %}?pattern={{ pattern }}" /> +{% endblock %} + +{% block content %} +<h1>{% trans "Search results for" %} {% if pattern %}'{{ pattern }}'{% endif %}</h1> + +{% if error %} +<p class="error">{{ error }}</p> +{% endif %} + +{% if object_list %} +<p class="success"> + {% blocktrans count paginator.count as nodetype_count %}{{ nodetype_count }} nodetype found{% plural %}{{ nodetype_count }} nodetypes found{% endblocktrans %} +</p> +{% endif %} + +{% for object in object_list %} + {% with object.html_content|truncatewords_html:100|safe as object_content %} + {% include "gstudio/_nodetype_detail.html" %} + {% endwith %} +{% empty %} +<p class="notice">{% trans "Nothing found." %}</p> +{% endfor %} + +<div class="search"> + <form method="get" id="main_searchform" action="{% url gstudio_nodetype_search %}"> + <p> + <input type="text" value="{{ pattern }}" name="pattern" id="main_searchbox" /> + <input type="submit" id="button" value="OK" /> + <a title="{% trans 'You can use - to exclude words or phrases, "double quotes" for exact phrases and the AND/OR boolean operators combined with parenthesis for complex searchs.' %}"> + <img src="{{ STATIC_URL }}gstudio/img/help.png" alt="?" width="14" height="14" /> + </a> + </p> + </form> +</div> + +{% if is_paginated %} + {% gstudio_pagination page_obj %} +{% endif %} +{% endblock %} |