|
3 | 3 |
|
4 | 4 | {% set sortUrl = path('indices_read_search', {'index': index.name}|merge(app.request.query.all|filter((v, k) => k != 'sort'))) %} |
5 | 5 |
|
| 6 | + {% set modalReference = 0 %} |
| 7 | + |
6 | 8 | {% block thead %} |
7 | 9 | <tr> |
8 | 10 | <th> </th> |
|
29 | 31 | {% for row in documents.rows %} |
30 | 32 | <tr> |
31 | 33 | <td> |
32 | | - <button type="button" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#modal{{ row['_id'] }}"> |
| 34 | + <button type="button" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#modal{{ modalReference }}"> |
33 | 35 | {{ 'source'|trans }} |
34 | 36 | </button> |
35 | 37 |
|
36 | | - <div class="modal fade" id="modal{{ row['_id'] }}" tabindex="-1" role="dialog" aria-labelledby="modalLabel{{ row['_id'] }}" aria-hidden="true"> |
| 38 | + <div class="modal fade" id="modal{{ modalReference }}" tabindex="-1" role="dialog" aria-labelledby="modalLabel{{ modalReference }}" aria-hidden="true"> |
37 | 39 | <div class="modal-dialog modal-xl"> |
38 | 40 | <div class="modal-content bg-dark"> |
39 | 41 | <div class="modal-header"> |
40 | | - <h5 class="modal-title" id="modalLabel{{ row['_id'] }}">#{{ row['_id'] }} ({{ 'source'|trans }})</h5> |
| 42 | + <h5 class="modal-title" id="modalLabel{{ modalReference }}">#{{ row['_id'] }} ({{ 'source'|trans }})</h5> |
41 | 43 | <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="{{ 'close'|trans }}"></button> |
42 | 44 | </div> |
43 | 45 | <div class="modal-body"> |
|
49 | 51 | </div> |
50 | 52 | </div> |
51 | 53 | </div> |
| 54 | + {% set modalReference = modalReference + 1 %} |
52 | 55 | </td> |
53 | 56 | <td> |
54 | 57 | {{ row['_id'] }} |
|
75 | 78 | {% endfor %} |
76 | 79 | </ul> |
77 | 80 | {% else %} |
78 | | - <button type="button" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#modal{{ row['_id'] }}{{ field }}"> |
| 81 | + <button type="button" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#modal{{ modalReference }}"> |
79 | 82 | {{ 'array'|trans }} |
80 | 83 | </button> |
81 | 84 |
|
82 | | - <div class="modal fade" id="modal{{ row['_id'] }}{{ field }}" tabindex="-1" role="dialog" aria-labelledby="modalLabel{{ row['_id'] }}{{ field }}" aria-hidden="true"> |
| 85 | + <div class="modal fade" id="modal{{ modalReference }}" tabindex="-1" role="dialog" aria-labelledby="modalLabel{{ modalReference }}" aria-hidden="true"> |
83 | 86 | <div class="modal-dialog modal-xl"> |
84 | 87 | <div class="modal-content bg-dark"> |
85 | 88 | <div class="modal-header"> |
86 | | - <h5 class="modal-title" id="modalLabel{{ row['_id'] }}{{ field }}">#{{ row['_id'] }} ({{ field }})</h5> |
| 89 | + <h5 class="modal-title" id="modalLabel{{ modalReference }}">#{{ row['_id'] }} ({{ field }})</h5> |
87 | 90 | <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="{{ 'close'|trans }}"></button> |
88 | 91 | </div> |
89 | 92 | <div class="modal-body"> |
|
95 | 98 | </div> |
96 | 99 | </div> |
97 | 100 | </div> |
| 101 | + {% set modalReference = modalReference + 1 %} |
98 | 102 | {% endif %} |
99 | 103 | {% endif %} |
100 | 104 | {% else %} |
101 | 105 | {% if 500 < value|length %} |
102 | | - <button type="button" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#modal{{ row['_id'] }}{{ field }}"> |
| 106 | + <button type="button" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#modal{{ modalReference }}"> |
103 | 107 | {{ 'long_text'|trans }} |
104 | 108 | </button> |
105 | 109 |
|
106 | | - <div class="modal fade" id="modal{{ row['_id'] }}{{ field }}" tabindex="-1" role="dialog" aria-labelledby="modalLabel{{ row['_id'] }}{{ field }}" aria-hidden="true"> |
| 110 | + <div class="modal fade" id="modal{{ modalReference }}" tabindex="-1" role="dialog" aria-labelledby="modalLabel{{ modalReference }}" aria-hidden="true"> |
107 | 111 | <div class="modal-dialog modal-xl"> |
108 | 112 | <div class="modal-content bg-dark"> |
109 | 113 | <div class="modal-header"> |
110 | | - <h5 class="modal-title" id="modalLabel{{ row['_id'] }}{{ field }}">#{{ row['_id'] }} ({{ field }})</h5> |
| 114 | + <h5 class="modal-title" id="modalLabel{{ modalReference }}">#{{ row['_id'] }} ({{ field }})</h5> |
111 | 115 | <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="{{ 'close'|trans }}"></button> |
112 | 116 | </div> |
113 | 117 | <div class="modal-body"> |
|
119 | 123 | </div> |
120 | 124 | </div> |
121 | 125 | </div> |
| 126 | + {% set modalReference = modalReference + 1 %} |
122 | 127 | {% else %} |
123 | 128 | {{ value }} |
124 | 129 | {% endif %} |
|
0 commit comments