Internal: Add course settings permission and improve table layout - refs #5644

pull/5723/head
christianbeeznst 3 months ago
parent d70bd2968d
commit 70b8eef2bd
  1. 13
      assets/css/app.scss
  2. 2
      src/CoreBundle/DataFixtures/PermissionFixtures.php
  3. 2
      src/CoreBundle/Resources/views/Permission/index.html.twig

@ -698,6 +698,7 @@ form .field {
.permissions-table {
width: 100%;
border-collapse: collapse;
table-layout: auto;
th, td {
border: 1px solid #ccc;
padding: 8px;
@ -713,8 +714,12 @@ form .field {
background-color: #e9e9e9;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
padding: 5px;
font-size: 0.9em;
white-space: normal;
word-wrap: break-word;
min-width: 100px;
vertical-align: top;
}
th {
padding-top: 12px;
@ -741,6 +746,10 @@ form .field {
.save-button:hover {
background-color: #45a049;
}
input[type="checkbox"] {
transform: scale(1);
margin: 0 auto;
}
}
.files-info-page {

@ -146,6 +146,7 @@ class PermissionFixtures extends Fixture implements FixtureGroupInterface
['title' => 'Edit user', 'slug' => 'user:edit', 'description' => 'Edit users'],
['title' => 'Edit user Role', 'slug' => 'user:editrole', 'description' => 'Edit user roles'],
['title' => 'Login as user', 'slug' => 'user:loginas', 'description' => 'Login as another user'],
['title' => 'Edit Course Settings', 'slug' => 'course:editsettings', 'description' => 'Edit settings of a course'],
];
}
@ -256,6 +257,7 @@ class PermissionFixtures extends Fixture implements FixtureGroupInterface
'user:edit' => ['ADM', 'SUA', 'GLO'],
'user:editrole' => ['ADM', 'SUA', 'GLO'],
'user:loginas' => ['SUA', 'GLO'],
'course:editsettings' => ['TEA', 'ADM', 'SUA', 'GLO'],
];
}
}

@ -4,6 +4,7 @@
<h1>{{ 'Permissions Management'|trans }}</h1>
<form method="post">
<button type="submit" class="save-button btn btn--primary hover:bg-blue-700 text-white font-bold py-2 px-4 rounded cursor-pointer mt-4 mb-4">{{ 'Save permissions'|trans }}</button>
<div style="overflow-x: auto;">
<table class="permissions-table">
<thead>
<tr>
@ -30,6 +31,7 @@
{% endfor %}
</tbody>
</table>
</div>
<button type="submit" class="save-button btn btn--primary hover:bg-blue-700 text-white font-bold py-2 px-4 rounded cursor-pointer mt-4">{{ 'Save permissions'|trans }}</button>
</form>
<script>

Loading…
Cancel
Save