|
4 | 4 |
|
5 | 5 | {% block pager-toolbar %} |
6 | 6 | {% if is_user_dataspace %} |
7 | | - {% if has_edit_productcomponent or has_edit_productpackage or has_change_codebaseresource_permission or has_add_productcomponent %} |
| 7 | + {% if product.is_locked %} |
| 8 | + <span class="d-inline-block" data-bs-toggle="tooltip" title="Inventory is locked"> |
| 9 | + <button type="button" class="btn btn-outline-dark dropdown-toggle" disabled> |
| 10 | + <i class="fas fa-tasks"></i> Manage |
| 11 | + </button> |
| 12 | + </span> |
| 13 | + {% elif has_edit_productcomponent or has_edit_productpackage or has_change_codebaseresource_permission or has_add_productcomponent %} |
8 | 14 | <div class="dropdown btn-group"> |
9 | 15 | <a class="btn btn-outline-dark dropdown-toggle" data-bs-toggle="dropdown" role="button" href="#"><i class="fas fa-tasks"></i> {% trans 'Manage' %}</a> |
10 | 16 | <div class="dropdown-menu dropdown-menu-end"> |
|
31 | 37 | </div> |
32 | 38 | {% endif %} |
33 | 39 |
|
34 | | - {% if has_scan_all_packages or has_change_permission %} |
| 40 | + {% if product.is_locked %} |
| 41 | + <span class="d-inline-block" data-bs-toggle="tooltip" title="Inventory is locked"> |
| 42 | + <button type="button" class="btn btn-outline-dark dropdown-toggle" disabled> |
| 43 | + <i class="fas fa-toolbox"></i> Actions |
| 44 | + </button> |
| 45 | + </span> |
| 46 | + {% elif has_scan_all_packages or has_change_permission %} |
35 | 47 | <div class="dropdown btn-group"> |
36 | | - <a class="btn btn-outline-dark dropdown-toggle" data-bs-toggle="dropdown" role="button" href="#"><i class="fas fa-toolbox"></i> Actions</a> |
| 48 | + <a class="btn btn-outline-dark dropdown-toggle" data-bs-toggle="dropdown" role="button" href="#"> |
| 49 | + <i class="fas fa-toolbox"></i> Actions |
| 50 | + </a> |
37 | 51 | <div class="dropdown-menu dropdown-menu-end"> |
38 | 52 | <div class="dropdown-header">Import</div> |
39 | 53 | {% if has_change_permission %} |
|
111 | 125 | {% endblock %} |
112 | 126 |
|
113 | 127 | {% block content %} |
114 | | - {% if product.is_locked %} |
115 | | - <small class="d-inline-flex mb-3 px-2 py-1 fw-semibold text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2"> |
116 | | - This product version is marked as read-only, preventing any modifications to its inventory. |
117 | | - </small> |
118 | | - {% endif %} |
119 | 128 | {{ block.super }} |
120 | 129 | {% if has_scan_all_packages %} |
121 | 130 | {% include 'product_portfolio/modals/scan_all_packages_modal.html' %} |
|
138 | 147 | {% endif %} |
139 | 148 | {% endblock %} |
140 | 149 |
|
| 150 | +{% block messages-alert %} |
| 151 | + {% if product.is_locked %} |
| 152 | + <div class="container pe-0"> |
| 153 | + <div class="alert alert-warning alert-dismissible mb-2 py-2" role="alert"> |
| 154 | + <strong> |
| 155 | + This product version is marked as read-only, preventing any modifications to its inventory. |
| 156 | + </strong> |
| 157 | + </div> |
| 158 | + </div> |
| 159 | + {% endif %} |
| 160 | + {{ block.super }} |
| 161 | +{% endblock %} |
| 162 | + |
141 | 163 | {% block extrastyle %} |
142 | 164 | {{ block.super }} |
143 | 165 | {% if has_edit_productpackage or has_edit_productcomponent %} |
|
0 commit comments