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.

search.html 4.7KB

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