Back button now redirects correctly
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
8199cea469
commit
b6e82256c0
|
@ -291,6 +291,12 @@ def get_transaction_documents(transaction_id):
|
|||
|
||||
@app.route('/transaction/<int:id>')
|
||||
def view_transaction(id):
|
||||
"""
|
||||
Get Source (Either homepage or pending page)
|
||||
"""
|
||||
|
||||
source = request.args.get("src")
|
||||
|
||||
"""
|
||||
View a transaction
|
||||
"""
|
||||
|
@ -331,7 +337,7 @@ def view_transaction(id):
|
|||
if transaction is None:
|
||||
abort(404)
|
||||
|
||||
return render_template('view_transaction.html', transaction=transaction, documents=documents, prev_id=prev_id, next_id=next_id, version=VERSION)
|
||||
return render_template('view_transaction.html', transaction=transaction, documents=documents, prev_id=prev_id, next_id=next_id, version=VERSION, source = source)
|
||||
|
||||
@app.route('/document/<int:document_id>')
|
||||
def view_document(document_id):
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{{ url_for('view_transaction', id=transaction['id']) }}" class="btn btn-sm btn-info" aria-label="View transaction {{ transaction['id'] }}" title="View ({{ loop.index if loop.index < 10 else '' }})">
|
||||
<a href="{{ url_for('view_transaction', id=transaction['id'], src='pending') }}" class="btn btn-sm btn-info" aria-label="View transaction {{ transaction['id'] }}" title="View ({{ loop.index if loop.index < 10 else '' }})">
|
||||
<i class="bi bi-eye"></i>{% if loop.index < 10 %} <span class="badge bg-light text-dark">{{ loop.index }}</span>{% endif %}
|
||||
</a>
|
||||
<a href="{{ url_for('update_transaction', id=transaction['id']) }}" class="btn btn-sm btn-warning" aria-label="Edit transaction {{ transaction['id'] }}">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<a href="{{ url_for('update_transaction', id=transaction['id']) }}" class="btn btn-warning" title="Edit Transaction (E)">
|
||||
<i class="bi bi-pencil"></i> Edit <span class="d-none d-md-inline">(E)</span>
|
||||
</a>
|
||||
<a href="{{ url_for('index') }}" class="btn btn-secondary" title="Back to List (B)">
|
||||
<a href="{{ url_for('pending_approval') if (source == 'pending') else url_for('index') }}" class="btn btn-secondary" title="Back to List (B)">
|
||||
<i class="bi bi-arrow-left"></i> Back to List <span class="d-none d-md-inline">(B)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue