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



Application ID: 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'] }} {{ result['application_id'] }}
</a> </a>


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

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



<div class="row justify-content-center p-3"> <div class="row justify-content-center p-3">
<div class="col-sm-6 text-center"> <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="text" name="search" placeholder="search for a patent record">
<input type="submit" id="submit" value="search"> <input type="submit" id="submit" value="search">
</form> </form>


<div class="row p-3"> <div class="row p-3">
<div class="col text-center"> <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>


<div class="col text-center"> <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> </div>


<div class="row p-3"> <div class="row p-3">
<div class="col text-center"> <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>


<div class="col text-center"> <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>


<div class="col text-center"> <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>
</div> </div>



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



Application ID: 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'] }} {{ result['application_id'] }}
</a> </a>



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

{% block content %} {% block content %}


<div class="row p-3"> <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="search" value="{{ search }}">
<input type="hidden" name="searchopt" value="{{ core }}"> <input type="hidden" name="searchopt" value="{{ core }}">
sort by: sort by:


Application ID: 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"> <span class="result-entry">
{{ result['application_id'] }} {{ result['application_id'] }}
</span> </span>

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

{% for title in titles %} {% for title in titles %}


<span class="title"> <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'] }} {{ title['title'] }}
</a> </a>
</span> </span>

Loading…
Cancel
Save