new_contents: from django import template
  from metashare.settings import MEDIA_URL
  from metashare.repository.model_utils import get_resource_license_types
  from replace import pretty_camel
  
  register = template.Library()
  
  @register.filter("licence_icon")
  def licence_icon(licence):
      if licence == "non-standard/Other_Licence/Terms":
          img_location = "{}images/licence_icons/licences/other.png".format(MEDIA_URL)
      else:
          img_location = "{}images/licence_icons/licences/{}.png".format(MEDIA_URL,licence)
      return u"".join(u"<img src=\"{}\" title=\"{}\" alt=\"{}\" width=\"80\" height=\"15\"/>" \
                      .format(img_location, pretty_camel(licence), pretty_camel(licence)))
  
  
  register.tag('licence_icon', licence_icon)
  
  @register.filter("condition_icon")
  def condition_icon(condition):
      img_location = "{}images/licence_icons/conditions/{}.png".format(MEDIA_URL,condition)
      return u"".join(u"<img src=\"{}\" title=\"{}\" alt=\"{}\" width=\"15\" height=\"15\"/>" \
                      .format(img_location, pretty_camel(condition), pretty_camel(condition)))
  
  
  register.tag('condition_icon', condition_icon)
  
subject: add template tag for displaying licence info in the search results