A search interface for the Performing Patents Otherwise publication as part of the Politics of Patents case study (part of Copim WP6): this parses data from the archive of RTF files and provides additional data from the European Patent Office OPS API. https://patents.copim.ac.uk
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
5.1KB

  1. {% extends "base.html" %}
  2. {% block content %}
  3. <div class="row">
  4. <div class="col m-5">
  5. <a href="{{ url_for('main.index') }}" class="h1 text-left"> ⇽ </a>
  6. <p class="h1 text-center">a timeline of inventions</p>
  7. <p class="mt-2 text-center">{{ num_found }} patents found out of {{ total_number }}</p>
  8. </div>
  9. </div>
  10. <div class="text-center">
  11. <p>showing {{ page_range }} results of {{ num_found }} found{% if query is not none %} for query '{{ query }}'{% endif %}</p>
  12. {% for page_number in pagination %}
  13. <a {% if page_number|int == page|int %}class="fs-4"{% endif %} href="{{ url_for('search.basic_search', query=query, sort=sort, country=country, year=year, page=page_number) }}">{{ page_number }}</a>
  14. {% endfor %}
  15. </div>
  16. <div class="row p-3">
  17. <form action="{{ url_for('search.basic_search') }}" method="POST">
  18. <input type="hidden" name="query" value="{{ query }}">
  19. <input type="hidden" name="searchopt" value="{{ core }}">
  20. <input type="hidden" name="country" value="{{ country }}">
  21. <input type="hidden" name="year" value="{{ year }}">
  22. sort by:
  23. <select name="sort" id="sort" onchange="this.form.submit()">
  24. <option value="relevance" {% if sort == 'relevance' %} selected {% endif %}>relevance</option>
  25. <option value="year desc" {% if sort == 'year desc' %} selected {% endif %}>year descending</option>
  26. <option value="year asc" {% if sort == 'year asc' %} selected {% endif %}>year ascending</option>
  27. </select>
  28. <noscript>
  29. <input type="submit" class="btn btn-default" value="Set" />
  30. </noscript>
  31. </form>
  32. </div>
  33. <div class="row p-3">
  34. <form action="{{ url_for('search.basic_search') }}" method="POST">
  35. <input type="hidden" name="query" value="{{ query }}">
  36. <input type="hidden" name="searchopt" value="{{ core }}">
  37. <input type="hidden" name="sort" value="{{ sort }}">
  38. <input type="hidden" name="year" value="{{ year }}">
  39. filter by country:
  40. <select name="country" id="sort" onchange="this.form.submit()">
  41. {% if country is defined %}
  42. <option value="None" selected>none</option>
  43. {% else %}
  44. <option>country</option>
  45. {% endif %}
  46. {% for i in range(0, country_facet|length) %}
  47. {% if i % 2 == 0 %}
  48. {% if country_facet[i].name is defined %}
  49. <option value="{{ country_facet[i].alpha_2 }}" {% if country == country_facet[i].alpha_2 %} selected {% endif %}">{{ country_facet[i].name }} ({{ country_facet[i+1] }})</option>
  50. {% else %}
  51. <option value="{{ country_facet[i] }}" {% if country == country_facet[i] %} selected {% endif %}">{{ country_facet[i] }} ({{ country_facet[i+1] }})</option>
  52. {% endif %}
  53. {% endif %}
  54. {% endfor %}
  55. </select>
  56. <noscript>
  57. <input type="submit" class="btn btn-default" value="Set" />
  58. </noscript>
  59. </form>
  60. </div>
  61. <div class="row p-3">
  62. <form action="{{ url_for('search.basic_search') }}" method="POST">
  63. <input type="hidden" name="query" value="{{ query }}">
  64. <input type="hidden" name="searchopt" value="{{ core }}">
  65. <input type="hidden" name="sort" value="{{ sort }}">
  66. <input type="hidden" name="country" value="{{ country }}">
  67. filter by year:
  68. <select name="year" id="sort" onchange="this.form.submit()">
  69. {% if year is defined %}
  70. <option value="None" selected>none</option>
  71. {% else %}
  72. <option>year</option>
  73. {% endif %}
  74. {% for i in range(0, year_facet|length) %}
  75. {% if i % 2 == 0 %}
  76. <option value="{{ year_facet[i] }}" {% if year == year_facet[i] %} selected {% endif %}">{{ year_facet[i] }} ({{ year_facet[i+1] }})</option>
  77. {% endif %}
  78. {% endfor %}
  79. </select>
  80. <noscript>
  81. <input type="submit" class="btn btn-default" value="Set" />
  82. </noscript>
  83. </form>
  84. </div>
  85. {% if results == 'no results found' %}
  86. {{ results }}
  87. {% else %}
  88. {% for result in results %}
  89. <p class="h1">
  90. Year:
  91. {{ result['year'] }}
  92. </p>
  93. {% if result['title'] is defined %}
  94. <p class="mb-2 mt-5">
  95. <span class="emphasis">Title:</span>
  96. <span class="result-entry">
  97. {{ result['title'] }}
  98. </span>
  99. </p>
  100. {% endif %}
  101. {% if result['country'] is defined %}
  102. <p class="mb-2">
  103. <span class="emphasis">Country:</span>
  104. {% if result['country'].name is defined %}
  105. {{ result['country'].name }} {{ result['country'].flag }}
  106. {% else %}
  107. {{ result['country'] }}
  108. {% endif %}
  109. </p>
  110. {% endif %}
  111. {% if result['abstract'] is defined %}
  112. <p class="mb-2">
  113. <span class="emphasis">Abstract:</span>
  114. <span class="result-entry">
  115. {{ result['abstract'] }}
  116. </span>
  117. </p>
  118. {% endif %}
  119. <div class="mt-2 mb-5 search-links">
  120. <p>
  121. <span class="emphasis">European Patent Office PDF:</span>
  122. <a href="{{ url_for('search.id_search', id=result['id'], core='all') }}">
  123. <span class="result-entry">
  124. {{ result['application_id'] }}
  125. </span>
  126. </a>
  127. </p>
  128. </div>
  129. {% endfor %}
  130. {% endif %}
  131. {% if search is defined %}
  132. <script type="text/javascript">
  133. highlightSearchTerms({{ search|tojson}})
  134. </script>
  135. {% endif %}
  136. {% endblock %}