Jacek Kowalski
4 hours ago 6b9278a5d57091fce636dbb640b380cfb990db6c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{% extends 'base.html.twig' %}
 
{% block title %}{% trans %}lookup_page_title{% endtrans %}{% endblock %}
 
{% block content %}
    <div class="page_content">
        <h2>{% trans %}lookup_page_title{% endtrans %}</h2>
 
        {% if candidates is empty %}
            <p>{% trans %}lookup_no_results{% endtrans %}</p>
            <a class="btn btn-primary"
               href="{{ path('book_new', {id: book_id}) }}">{% trans %}add_action_add_manual{% endtrans %}</a>
        {% else %}
            <p>{% trans %}lookup_pick{% endtrans %}</p>
            <table class="table">
                <thead>
                <tr>
                    <th>{% trans %}book_title_header{% endtrans %}</th>
                    <th>{% trans %}book_author_header{% endtrans %}</th>
                    <th>{% trans %}book_publisher_header{% endtrans %}</th>
                    <th>{% trans %}book_publication_year_header{% endtrans %}</th>
                    <th></th>
                </tr>
                </thead>
                <tbody>
                {% for candidate in candidates %}
                    <tr>
                        <td>{{ candidate.title }}</td>
                        <td>{{ candidate.author }}</td>
                        <td>{{ candidate.publisher }}</td>
                        <td>{{ candidate.publicationYear }}</td>
                        <td><a class="btn btn-sm" href="{{ path('book_new', {
                                id: book_id,
                                title: candidate.title,
                                author: candidate.author,
                                language: candidate.language,
                                publisher: candidate.publisher,
                                publicationLoc: candidate.publicationLoc,
                                publicationYear: candidate.publicationYear,
                                isbn: candidate.isbn,
                                issn: candidate.issn,
                            }) }}">{% trans %}lookup_use{% endtrans %}</a></td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        {% endif %}
    </div>
{% endblock %}