@DisableEdit

This commit is contained in:
Francesco
2023-10-06 15:14:41 +02:00
parent a05ce27d24
commit b84a139d12
4 changed files with 12 additions and 4 deletions

View File

@@ -9,7 +9,9 @@
th:classAppend="|${!schema.isDeleteEnabled() ? 'disable' : ''}|">
</td>
<td class="text-center row-icons">
<a class="ps-1" th:href="|/${baseUrl}/model/${schema.getJavaClass().getName()}/edit/${row.getPrimaryKeyValue()}|">
<a class="ps-1"
th:classAppend="|${!schema.isEditEnabled() ? 'disable' : ''}|"
th:href="|/${baseUrl}/model/${schema.getJavaClass().getName()}/edit/${row.getPrimaryKeyValue()}|">
<i class="bi bi-pencil-square"></i></a>
<form class="delete-form" method="POST"
th:action="|/${baseUrl}/model/${schema.getJavaClass().getName()}/delete/${row.getPrimaryKeyValue()}|">

View File

@@ -61,7 +61,7 @@
</span>
</h3>
<h3>
<h3 class="create-button">
<a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|"
th:class="|${!schema.isCreateEnabled() ? 'disable' : ''}|"
th:href="|/${baseUrl}/model/${schema.getClassName()}/create|"><i class="bi bi-plus-square"></i></a>

View File

@@ -39,7 +39,7 @@
[[ ${schema.getTableName()} ]]
</span>
</h3>
<h3><a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|"
<h3 class="create-button"><a th:title="|${!schema.isCreateEnabled() ? 'CREATE disabled for this type' : 'Create new item'}|"
th:href="|/${baseUrl}/model/${schema.getClassName()}/create|"
th:class="|${!schema.isCreateEnabled() ? 'disable' : ''}|"><i class="bi bi-plus-square"></i></a></h3>
</div>