-
Notifications
You must be signed in to change notification settings - Fork 53
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
elias-boulharts
committed
Sep 18, 2023
1 parent
88e96ec
commit 0fb5068
Showing
19 changed files
with
141 additions
and
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{% with perm=django_content_type.app_label|add:".add_"|add:django_content_type.model %} | ||
{% has_perm request.user perm as can_add %} | ||
<span {% if not can_change %} title="Permission {{ perm }} needed" {% endif %}> | ||
<a class="btn btn-success {% if not can_add %} disabled{% endif %}" href="{{ add_url }}"> | ||
{% if can_add %} | ||
<a class="btn btn-success" href="{{ add_url }}"> | ||
<i class="fas fa-plus"></i> Add | ||
</a> | ||
</span> | ||
{% endif %} | ||
{% endwith %} |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{% has_perm request.user django_content_type.app_label|add:".delete_"|add:django_content_type.model as can_delete %} | ||
<button class="btn btn-danger{% if not can_delete %} disabled{% endif %}" type="submit"{% if not can_delete %} disabled{% endif %}> | ||
<i class="fas fa-trash"></i> Delete | ||
</button> | ||
{% if can_delete %} | ||
<a class="btn btn-danger" type="submit"> | ||
<i class="fas fa-trash"></i> Delete | ||
</a> | ||
{% 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
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{# can_delete_user come from {organization,team,globalpermission}_detail.html#} | ||
{% with class_name=object|to_class_name|lower %} | ||
<span {% if not can_delete_user %} title="Permission 'profiles.delete_role' needed" {% endif %}> | ||
{% if can_delete_user %} | ||
<a href="{% url "profiles:"|add:class_name|add:"_rbac_delete" object.id record.id %}" | ||
class="btn btn-danger bg-sm{% if not can_delete_user %} disabled{% endif %}" | ||
class="btn btn-danger bg-sm" | ||
title="Delete"> | ||
<i class="fas fa-trash"></i> | ||
</a> | ||
</span> | ||
{% endif %} | ||
{% endwith %} |
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
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
12 changes: 6 additions & 6 deletions
12
templates/service_catalog/buttons/delete_operation_button.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{% with perm="service_catalog.delete_operation" %} | ||
{% has_perm request.user perm object as can_delete %} | ||
<span {% if not can_change %} title="Permission {{ perm }} needed" {% endif %}> | ||
<a href="{% url 'service_catalog:operation_delete' object.service.id object.id %}" | ||
class="btn btn-danger{% if not can_delete %} disabled{% endif %}"> | ||
<i class="fas fa-trash"></i> | ||
</a> | ||
</span> | ||
{% if can_delete %} | ||
<a href="{% url 'service_catalog:operation_delete' object.service.id object.id %}" | ||
class="btn btn-danger"> | ||
<i class="fas fa-trash"></i> | ||
</a> | ||
{% endif %} | ||
{% endwith %} |
12 changes: 6 additions & 6 deletions
12
templates/service_catalog/buttons/edit_operation_button.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{% with perm="service_catalog.change_operation" %} | ||
{% has_perm request.user perm object as can_change %} | ||
<span {% if not can_change %} title="Permission {{ perm }} needed" {% endif %}> | ||
<a href="{% url 'service_catalog:operation_edit' object.service.id object.id %}" | ||
class="btn btn-primary{% if not can_change %} disabled{% endif %}"> | ||
<i class="fas fa-pencil-alt"></i> | ||
</a> | ||
</span> | ||
{% if can_change %} | ||
<a href="{% url 'service_catalog:operation_edit' object.service.id object.id %}" | ||
class="btn btn-primary"> | ||
<i class="fas fa-pencil-alt"></i> | ||
</a> | ||
{% endif %} | ||
{% endwith %} |
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
12 changes: 6 additions & 6 deletions
12
templates/service_catalog/buttons/operation_survey_button.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{% has_perm request.user "service_catalog.change_operation" as can_change %} | ||
<span {% if not can_change %} title="Permission service_catalog.change_operation needed" {% endif %}> | ||
<a href="{% url 'service_catalog:operation_edit_survey' service_id=object.service.id pk=object.id %}" | ||
class="btn btn-default bg-sm {% if not can_change %} disabled {% endif %}"> | ||
<i class="fas fa-clipboard-list"></i> Survey | ||
</a> | ||
</span> | ||
{% if can_change %} | ||
<a href="{% url 'service_catalog:operation_edit_survey' service_id=object.service.id pk=object.id %}" | ||
class="btn btn-default bg-sm"> | ||
<i class="fas fa-clipboard-list"></i> Survey | ||
</a> | ||
{% 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
12 changes: 6 additions & 6 deletions
12
templates/service_catalog/custom_columns/operation_actions.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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{% has_perm request.user "service_catalog.change_operation" as can_change %} | ||
<span {% if not can_change %} title="Permission service_catalog.change_operation needed" {% endif %}> | ||
<a href="{% url 'service_catalog:operation_edit_survey' service_id=record.service.id pk=record.id %}" | ||
class="btn btn-primary bg-sm {% if not can_change %} disabled {% endif %}"> | ||
<i class="fas fa-clipboard-list"></i> | ||
</a> | ||
</span> | ||
{% if can_change %} | ||
<a href="{% url 'service_catalog:operation_edit_survey' service_id=record.service.id pk=record.id %}" | ||
class="btn btn-primary bg-sm"> | ||
<i class="fas fa-clipboard-list"></i> | ||
</a> | ||
{% endif %} | ||
{% with parent_id=record.service.id %} | ||
{% include 'generics/custom_columns/generic_actions.html' %} | ||
{% endwith %} |
Oops, something went wrong.