Browse Source

replacing static URLs with dynamic url_for lines

solr_update
Simon Bowie 2 years ago
parent
commit
e5774e3ded
5 changed files with 12 additions and 12 deletions
  1. +2
    -2
      web/app/templates/compare.html
  2. +6
    -6
      web/app/templates/index.html
  3. +1
    -1
      web/app/templates/record.html
  4. +2
    -2
      web/app/templates/search.html
  5. +1
    -1
      web/app/templates/titles.html

+ 2
- 2
web/app/templates/compare.html View File

@@ -8,7 +8,7 @@

Application ID:

<a href="/search/id?id={{ result['id'] }}&core=all">
<a href="{{ url_for('search.id_search', id=result['id'], core='all') }}">
{{ result['application_id'] }}
</a>

@@ -63,7 +63,7 @@
{% if result['image'] is defined %}
<img class="img-fluid" src="data:image/jpg;base64,{{ result['image'] }}" alt="Drawing of patent" />'
{% endif %}
</div>
{% endfor %}
</div>

+ 6
- 6
web/app/templates/index.html View File

@@ -11,7 +11,7 @@

<div class="row justify-content-center p-3">
<div class="col-sm-6 text-center">
<form action="/search" method="POST">
<form action="{{ url_for('search.basic_search') }}" method="POST">
<input type="text" name="search" placeholder="search for a patent record">
<input type="submit" id="submit" value="search">
</form>
@@ -21,25 +21,25 @@

<div class="row p-3">
<div class="col text-center">
<a href="/random">show a random record</a>
<a href="{{ url_for('random.random_record') }}">show a random record</a>
</div>

<div class="col text-center">
<a href="/random/two">compare two random records</a>
<a href="{{ url_for('random.two_random_records') }}">compare two random records</a>
</div>
</div>

<div class="row p-3">
<div class="col text-center">
<a href="/random/titles">ten random titles</a>
<a href="{{ url_for('random.ten_random_titles') }}">ten random titles</a>
</div>

<div class="col text-center">
<a href="/random/abstracts">ten random abstracts</a>
<a href="{{ url_for('random.ten_random_abstracts') }}">ten random abstracts</a>
</div>

<div class="col text-center">
<a href="/random/images">ten random images (takes a long time to load)</a>
<a href="{{ url_for('random.ten_random_images') }}">ten random images (takes a long time to load)</a>
</div>
</div>


+ 1
- 1
web/app/templates/record.html View File

@@ -7,7 +7,7 @@

Application ID:

<a href="/search/id?id={{ result['id'] }}&core=all">
<a href="{{ url_for('search.id_search', id=result['id'], core='all') }}">
{{ result['application_id'] }}
</a>


+ 2
- 2
web/app/templates/search.html View File

@@ -3,7 +3,7 @@
{% block content %}

<div class="row p-3">
<form action="/search" method="POST">
<form action="{{ url_for('search.basic_search') }}" method="POST">
<input type="hidden" name="search" value="{{ search }}">
<input type="hidden" name="searchopt" value="{{ core }}">
sort by:
@@ -28,7 +28,7 @@

Application ID:

<a href="/search/id?id={{ result['id'] }}&core=all">
<a href="{{ url_for('search.id_search', id=result['id'], core='all') }}">
<span class="result-entry">
{{ result['application_id'] }}
</span>

+ 1
- 1
web/app/templates/titles.html View File

@@ -8,7 +8,7 @@
{% for title in titles %}

<span class="title">
<a href="/search/id?id={{ title['id'] }}&core=all">
<a href="{{ url_for('search.id_search', id=title['id'], core='all') }}">
{{ title['title'] }}
</a>
</span>

Loading…
Cancel
Save