v1.0.0 - Version 1 [Open Beta] Open for launch!

Added tooltips for roles.create & roles.edit
#900Commits
This commit is contained in:
Anders
2020-09-08 14:12:22 +02:00
parent 66762efb8a
commit 720faac2ff
4 changed files with 142 additions and 58 deletions
@@ -26,6 +26,44 @@
.text-muted {
color: #6c757d !important;
}
.question-mark, .question-mark-div {
float: right;
width: 24px;
vertical-align: sub;
}
.question-mark-div {
position: relative;
display: inline-block;
}
.question-mark-div .question-mark-tooltip {
visibility: hidden;
width: 150px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 6px 6px;
/* Position the tooltip */
position: absolute;
z-index: 1;
top: -5px;
right: 105%;
}
.question-mark-div:hover .question-mark-tooltip {
visibility: visible;
}
th {
overflow: visible !important;
text-overflow: unset !important;
white-space: unset !important;
word-break: break-word !important;
}
</style>
<h1>Rediger Rolle:</h1>
<form method="post" action="{{ route("roles.update", ['role' => $role]) }}">
@@ -48,56 +86,48 @@
<table class="tbl mb-2">
<tr>
<th>App-side</th>
<th>Beskrivelse kan fjernes?</th>
<th>Opret/Tilmeld</th>
<th>Se</th>
<th>Slet/Afmeld</th>
<th>Opret/Tilmeld<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at oprette el. tilmelde Reservationer, Aktiviteter & Feedback</span></div></th>
<th>Se<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at se diverse sider</span></div></th>
<th>Slet/Afmeld<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at slette el. afmelde Reservationer & Aktiviteter</span></div></th>
</tr>
<tr>
<td>Nyheder</td>
<td><p>Empty</p></td>
<td></td>
<td><input id="NewsRAccount" onclick="if ($('#NewsR').prop('checked') == false) $('#NewsR').prop('checked', true); else $('#NewsR').prop('checked', false);" type="checkbox" name="value[]" value="news.show" @if ($role->hasPermissionTo("news.show")) checked @endif></td>
<td></td>
</tr>
<tr>
<td>Menuplan</td>
<td><p>Empty</p></td>
<td></td>
<td><input id="MenuRAccount" onclick="if ($('#MenuR').prop('checked') == false) $('#MenuR').prop('checked', true); else $('#MenuR').prop('checked', false);" type="checkbox" name="value[]" value="menuplan.show" @if ($role->hasPermissionTo("menuplan.show")) checked @endif></td>
<td></td>
</tr>
<tr>
<td>Aktiviteter</td>
<td><p>Empty</p></td>
<td><input id="EventParticipateAccount" type="checkbox" name="value[]" value="userevent.create" @if ($role->hasPermissionTo("userevent.create")) checked @endif></td>
<td><input id="EventRAccount" onclick="if ($('#EventR').prop('checked') == false) $('#EventR').prop('checked', true); else $('#EventR').prop('checked', false);" type="checkbox" name="value[]" value="event.show" @if ($role->hasPermissionTo("event.show")) checked @endif></td>
<td><input id="EventStopParticipatingAccount" type="checkbox" name="value[]" value="userevent.delete" @if ($role->hasPermissionTo("userevent.delete")) checked @endif></td>
</tr>
<tr>
<td>Reservationer</td>
<td>Empty</td>
<td><input id="ReservationCAccount" type="checkbox" name="value[]" value="washing.machine.reservation.create" @if ($role->hasPermissionTo("washing.machine.reservation.create")) checked @endif></td>
<td><input id="ReservationRAccount" onclick="if ($('#ReservationR').prop('checked') == false) $('#ReservationR').prop('checked', true); else $('#ReservationR').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show" @if ($role->hasPermissionTo("washing.machine.reservation.show")) checked @endif></td>
<td><input id="ReservationDAccount" onclick="if ($('#ReservationD').prop('checked') == false) $('#ReservationD').prop('checked', true); else $('#ReservationD').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.delete" @if ($role->hasPermissionTo("washing.machine.reservation.delete")) checked @endif></td>
</tr>
<tr>
<td>Kontakter</td>
<td><p>Empty</p></td>
<td></td>
<td><input id="ContactRAccount" onclick="if ($('#ContactR').prop('checked') == false) $('#ContactR').prop('checked', true); else $('#ContactR').prop('checked', false);" type="checkbox" name="value[]" value="contact.show" @if ($role->hasPermissionTo("contact.show")) checked @endif></td>
<td></td>
</tr>
<tr>
<td>Vejledning</td>
<td><p>Empty</p></td>
<td></td>
<td><input id="GuideRAccount" onclick="if ($('#GuideR').prop('checked') == false) $('#GuideR').prop('checked', true); else $('#GuideR').prop('checked', false);" type="checkbox" name="value[]" value="guides.show" @if ($role->hasPermissionTo("guides.show")) checked @endif></td>
<td></td>
</tr>
<tr>
<td>Feedback</td>
<td>Empty</td>
<td><input id="FeedbackCAccount" type="checkbox" name="value[]" value="feedback.create" @if ($role->hasPermissionTo("feedback.create")) checked @endif></td>
<td></td>
<td></td>
@@ -112,22 +142,19 @@
<table class="tbl mb-2" >
<tr>
<th>Admin-side</th>
<th>Beskrivelse kan fjernes?</th>
<th>Opret</th>
<th>Se</th>
<th>Rediger</th>
<th>Slet</th>
<th>Fuld Kontrol</th>
<th>Opret<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at oprette Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Se<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at se alle Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Rediger<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at kunne redigere Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Slet<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver tilladelse til at kunne slette Menuplaner, Aktiviteter, Brugere m.v.</span></div></th>
<th>Fuld Kontrol<div class="question-mark-div"><img class="question-mark" src="{{ asset('/images/icons/questionmark.svg') }}"><span class="question-mark-tooltip">Giver alle rettigheder som beskrevet i hhv. 'Opret', 'Se', 'Rediger' & 'Slet'</span></div></th>
</tr>
<tr>
<td>Admin Panel</td>
<td><p>Adgang til admin panelet</p></td>
<td></td>
<td colspan="4"><input type="checkbox" name="value[]" value="admin.panel.show" @if ($role->hasPermissionTo("admin.panel.show")) checked @endif></td>
</tr>
<tr>
<td>Brugere</td>
<td><p>Empty</p></td>
<td><input id="UserC" type="checkbox" name="value[]" value="user.create" @if ($role->hasPermissionTo("user.create")) checked @endif></td>
<td><input id="UserR" type="checkbox" name="value[]" value="user.show" @if ($role->hasPermissionTo("user.show")) checked @endif></td>
<td><input id="UserU" type="checkbox" name="value[]" value="user.edit" @if ($role->hasPermissionTo("user.edit")) checked @endif></td>
@@ -136,7 +163,6 @@
</tr>
<tr>
<td>Roller</td>
<td><p>Empty</p></td>
<td><input id="RoleC" type="checkbox" name="value[]" value="roles.create" @if ($role->hasPermissionTo("roles.create")) checked @endif></td>
<td><input id="RoleR" type="checkbox" name="value[]" value="roles.show" @if ($role->hasPermissionTo("roles.show")) checked @endif></td>
<td><input id="RoleU" type="checkbox" name="value[]" value="roles.edit" @if ($role->hasPermissionTo("roles.edit")) checked @endif></td>
@@ -145,7 +171,6 @@
</tr>
<tr>
<td>Nyheder</td>
<td><p>Empty</p></td>
<td><input id="NewsC" type="checkbox" name="value[]" value="news.create" @if ($role->hasPermissionTo("news.create")) checked @endif></td>
<td><input id="NewsR" onclick="if ($('#NewsRAccount').prop('checked') == false) $('#NewsRAccount').prop('checked', true); else $('#NewsRAccount').prop('checked', false);" type="checkbox" name="value[]" value="news.show" @if ($role->hasPermissionTo("news.show")) checked @endif></td>
<td><input id="NewsU" type="checkbox" name="value[]" value="news.edit" @if ($role->hasPermissionTo("news.edit")) checked @endif></td>
@@ -154,7 +179,6 @@
</tr>
<tr>
<td>Menuplan</td>
<td><p>Empty</p></td>
<td><input id="MenuC" type="checkbox" name="value[]" value="menuplan.create" @if ($role->hasPermissionTo("menuplan.create")) checked @endif></td>
<td><input id="MenuR" onclick="if ($('#MenuRAccount').prop('checked') == false) $('#MenuRAccount').prop('checked', true); else $('#MenuRAccount').prop('checked', false);" type="checkbox" name="value[]" value="menuplan.show" @if ($role->hasPermissionTo("menuplan.show")) checked @endif></td>
<td><input id="MenuU" type="checkbox" name="value[]" value="menuplan.edit" @if ($role->hasPermissionTo("menuplan.edit")) checked @endif></td>
@@ -163,7 +187,6 @@
</tr>
<tr>
<td>Aktiviteter</td>
<td><p>Empty</p></td>
<td><input id="EventC" type="checkbox" name="value[]" value="event.create" @if ($role->hasPermissionTo("event.create")) checked @endif></td>
<td><input id="EventR" onclick="if ($('#EventRAccount').prop('checked') == false) $('#EventRAccount').prop('checked', true); else $('#EventRAccount').prop('checked', false);" type="checkbox" name="value[]" value="event.show" @if ($role->hasPermissionTo("event.show")) checked @endif></td>
<td><input id="EventU" type="checkbox" name="value[]" value="event.edit" @if ($role->hasPermissionTo("event.edit")) checked @endif></td>
@@ -172,7 +195,6 @@
</tr>
<tr>
<td>Lokation</td>
<td><p>Empty</p></td>
<td><input id="LocationC" type="checkbox" name="value[]" value="locations.create" @if ($role->hasPermissionTo("locations.create")) checked @endif></td>
<td><input id="LocationR" type="checkbox" name="value[]" value="locations.show" @if ($role->hasPermissionTo("locations.show")) checked @endif></td>
<td><input id="LocationU" type="checkbox" name="value[]" value="locations.edit" @if ($role->hasPermissionTo("locations.edit")) checked @endif></td>
@@ -181,7 +203,6 @@
</tr>
<tr>
<td>Vaskemaskiner</td>
<td><p>Empty</p></td>
<td><input id="WashingMachineC" type="checkbox" name="value[]" value="washing.machine.create" @if ($role->hasPermissionTo("washing.machine.create")) checked @endif></td>
<td><input id="WashingMachineR" type="checkbox" name="value[]" value="washing.machine.show" @if ($role->hasPermissionTo("washing.machine.show")) checked @endif></td>
<td><input id="WashingMachineU" type="checkbox" name="value[]" value="washing.machine.edit" @if ($role->hasPermissionTo("washing.machine.edit")) checked @endif></td>
@@ -190,7 +211,6 @@
</tr>
<tr>
<td>Reservationer</td>
<td>Empty</td>
<td></td>
<td><input id="ReservationR" onclick="if ($('#ReservationRAccount').prop('checked') == false) $('#ReservationRAccount').prop('checked', true); else $('#ReservationRAccount').prop('checked', false);" type="checkbox" name="value[]" value="washing.machine.reservation.show" @if ($role->hasPermissionTo("washing.machine.reservation.show")) checked @endif></td>
<td></td>
@@ -199,7 +219,6 @@
</tr>
<tr>
<td>Kontakter</td>
<td><p>Empty</p></td>
<td><input id="ContactC" type="checkbox" name="value[]" value="contact.create" @if ($role->hasPermissionTo("contact.create")) checked @endif></td>
<td><input id="ContactR" onclick="if ($('#ContactRAccount').prop('checked') == false) $('#ContactRAccount').prop('checked', true); else $('#ContactRAccount').prop('checked', false);" type="checkbox" name="value[]" value="contact.show" @if ($role->hasPermissionTo("contact.show")) checked @endif></td>
<td><input id="ContactU" type="checkbox" name="value[]" value="contact.edit" @if ($role->hasPermissionTo("contact.edit")) checked @endif></td>
@@ -208,7 +227,6 @@
</tr>
<tr>
<td>Vejledning</td>
<td><p>Empty</p></td>
<td><input id="GuideC" type="checkbox" name="value[]" value="guides.create" @if ($role->hasPermissionTo("guides.create")) checked @endif></td>
<td><input id="GuideR" onclick="if ($('#GuideRRAccount').prop('checked') == false) $('#GuideRAccount').prop('checked', true); else $('#GuideRAccount').prop('checked', false);" type="checkbox" name="value[]" value="guides.show" @if ($role->hasPermissionTo("guides.show")) checked @endif></td>
<td><input id="GuideU" type="checkbox" name="value[]" value="guides.edit" @if ($role->hasPermissionTo("guides.edit")) checked @endif></td>
@@ -217,7 +235,6 @@
</tr>
<tr>
<td>Feedback</td>
<td><p>Empty</p></td>
<td></td>
<td><input id="FeedbackR" onclick="if ($('#FeedbackRAccount').prop('checked') == false) $('#FeedbackRAccount').prop('checked', true); else $('#FeedbackRAccount').prop('checked', false);" type="checkbox" name="value[]" value="feedback.show" @if ($role->hasPermissionTo("feedback.show")) checked @endif></td>
<td></td>