-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
127 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
internal/templates/internal/include/content/order_details/_add_views.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{% load i18n %} | ||
|
||
{% if can_edit %} | ||
<div class="mt-1 mb-3"> | ||
<button type="button" class="btn btn-sm btn-primary" | ||
data-bs-toggle="modal" data-bs-target="#addViewsModal"> | ||
{% trans "Add views to order" %} | ||
</button> | ||
<div class="modal fade" id="addViewsModal" tabindex="-1" | ||
style="display: none;" aria-hidden="true"> | ||
<div class="modal-dialog modal-dialog-centered" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title" id="addViewsModalTitle"> | ||
{% trans "Add View to Order" %} | ||
</h5> | ||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="row"> | ||
<div class="col mb-3"> | ||
<label for="orderDetailAddViews" class="form-label"> | ||
{% trans "Number of Views" %} | ||
</label> | ||
<input type="number" id="orderDetailAddViews" class="form-control" | ||
placeholder="{% trans "Number of Views" %}" | ||
value="1000"> | ||
</div> | ||
</div> | ||
{% if perms.core.can_view_prices %} | ||
<div class="row g-2"> | ||
<div class="alert alert-secondary" role="alert"> | ||
<div class="d-flex w-100 flex-wrap align-items-center justify-content-between gap-2"> | ||
<div>{% trans "Cost" %}</div> | ||
<div> | ||
<h5 class="mb-1"> | ||
<i class="bx bx-{{ currency }}"></i> | ||
<span id="addViewsTmp" data-price="{{ order.tariff.details.price }}"> | ||
{% widthratio order.tariff.details.price 1 1000 %} | ||
</span> | ||
</h5> | ||
<h5 class="mb-0"> | ||
<small class="text-muted"> | ||
<i class="bx bx-{{ currency }}"></i> | ||
{{ order.tariff.details.price }} | ||
{% trans "per view" %} | ||
</small> | ||
</h5> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" id="closeAddViewsModal" | ||
class="btn btn-outline-secondary" | ||
data-bs-dismiss="modal"> | ||
{% trans "Cancel" %} | ||
</button> | ||
<button type="button" class="btn btn-primary"> | ||
{% trans "Add" %} | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.