GeoNode/geonode — pull request #1639 by state-hiu (2014-08-08 03:33:02+00:00)
Title: document type (subtype) search

**Document Type Search**

This PR add a "Document Type" filter section to the search page. The section is placed when the regular "Type" filter section is on the layers_list and search pages. This PR doesn't fully replace the need for downstream GeoNode forks to customize the searching/browsing experience. However, it should benefit basic GeoNodes deployments that will host a large number of photos or static maps (pdfs).

Documents are assigned to 4 "doc_types" based on looking up their extensions in DOCUMENT_TYPE_MAP in the settings.py:
1. Text
2. Image
3. Presentation
4. Other

If the extension is not found in settings.DOCUMENT_TYPE_MAP then "doc_type" is set as "other". Let me know if I should add other doc_types or extensions to settings.py. Or reorganize them in some way.

==
Other Notes:
+This does not adjust the core type field. It is still set to 'document' for documents'.
+This required refractoring the facets function in geonode/base/templatetags/base_tags.py.
+This required abstracting the search/_search_content.html template to require a header and filter variable to be set.