Don't use primary key for offers

This commit is contained in:
Jannis Portmann 2022-01-17 19:11:00 +01:00
parent 539b7edffe
commit d190971718
8 changed files with 65 additions and 15 deletions

View file

@ -47,7 +47,7 @@
</div>
{% if offer.byUser == user %}
<a href="{{ path('edit_offer', {'id': offer.id}) }}" class="btn btn-info mb-3"><i class="fas fa-pen"></i></a>
<a href="{{ path('edit_offer', {'urlId': offer.urlId}) }}" class="btn btn-info mb-3"><i class="fas fa-pen"></i></a>
<button type="button" class="btn btn-danger mb-3" data-toggle="modal" data-target="#exampleModal"><i class="fas fa-trash-alt"></i></button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
@ -64,7 +64,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<a type="button" class="btn btn-danger" href="{{ path('delete_offer', {'id': offer.id}) }}">Delete</a>
<a type="button" class="btn btn-danger" href="{{ path('delete_offer', {'urlId': offer.urlId}) }}">Delete</a>
</div>
</div>
</div>
@ -85,6 +85,6 @@
</ul>
{% endif %}
</div>
<a class="btn btn-primary mb-3" href="{{ path('trade', {'id': offer.id}) }}">Offer trade</a>
<a class="btn btn-primary mb-3" href="{{ path('trade', {'urlId': offer.urlId}) }}">Offer trade</a>
{% endif %}
{% endblock %}