Skip to content

Commit

Permalink
add permission for transcription manager & style table
Browse files Browse the repository at this point in the history
  • Loading branch information
kkuepper committed Sep 25, 2024
1 parent a46f5e1 commit ce983a7
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 7 deletions.
2 changes: 2 additions & 0 deletions admin/app/scripts/controllers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ angular.module('bmmApp')
ROLE_PODCAST_MANAGER: false,
ROLE_PLAYLIST_MANAGER: false,
ROLE_DOWNLOADER: false,
ROLE_TRANSCRIPTION_MANAGER: false,
ROLE_NOTIFICATION_MANAGER: false,
ROLE_CONTRIBUTOR_MANAGER: false,
ROLE_FEATURE_PREVIEW: false,
Expand Down Expand Up @@ -82,6 +83,7 @@ angular.module('bmmApp')
'ROLE_PODCAST_MANAGER',
'ROLE_PLAYLIST_MANAGER',
'ROLE_DOWNLOADER',
'ROLE_TRANSCRIPTION_MANAGER',
'ROLE_NOTIFICATION_MANAGER',
'ROLE_CONTRIBUTOR_MANAGER',
'ROLE_FEATURE_PREVIEW',
Expand Down
20 changes: 14 additions & 6 deletions admin/app/views/pages/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ <h4>{{init.translation.page.contributors.search}}</h4>
<input type="text" ng-model="userSearch">
</ul>

<table style="width: 100%">
<tr>
<th>{{init.translation.page.contributors.name}}</th>
<table class="sideways-header" style="width: 100%">
<tr class="sideways-header">
<th style="min-width: 200px">{{init.translation.page.contributors.name}}</th>
<th>{{init.translation.page.users.albumManager}}</th>
<th>{{init.translation.page.users.trackManager}}</th>
<th>{{init.translation.page.users.contributorManager}}</th>
<th>{{init.translation.page.users.podcastManager}}</th>
<th>Playlists</th>
<th>Downloader</th>
<th>Transcriptions</th>
<th>{{init.translation.page.users.notificationManager}}</th>
<th>{{init.translation.page.users.featurePreview}}</th>
<th>{{init.translation.page.users.liveManager}}</th>
Expand Down Expand Up @@ -46,6 +47,9 @@ <h4>{{init.translation.page.contributors.search}}</h4>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_DOWNLOADER" ng-change="updateUser(user, true)">
</td>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_TRANSCRIPTION_MANAGER" ng-change="updateUser(user, true)">
</td>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_NOTIFICATION_MANAGER" ng-change="updateUser(user, true)">
</td>
Expand Down Expand Up @@ -80,15 +84,16 @@ <h3>{{init.translation.page.users.adminUsers}}</h3>
{{init.translation.page.users.refreshList}}
</button>

<table style="width: 100%">
<tr>
<th>{{init.translation.page.contributors.name}}</th>
<table class="sideways-header" style="width: 100%">
<tr class="sideways-header">
<th style="min-width: 200px">{{init.translation.page.contributors.name}}</th>
<th>{{init.translation.page.users.albumManager}}</th>
<th>{{init.translation.page.users.trackManager}}</th>
<th>{{init.translation.page.users.contributorManager}}</th>
<th>{{init.translation.page.users.podcastManager}}</th>
<th>Playlists</th>
<th>Downloader</th>
<th>Transcriptions</th>
<th>{{init.translation.page.users.notificationManager}}</th>
<th>{{init.translation.page.users.featurePreview}}</th>
<th>{{init.translation.page.users.liveManager}}</th>
Expand Down Expand Up @@ -116,6 +121,9 @@ <h3>{{init.translation.page.users.adminUsers}}</h3>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_DOWNLOADER" ng-change="updateUser(user)">
</td>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_TRANSCRIPTION_MANAGER" ng-change="updateUser(user)">
</td>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_NOTIFICATION_MANAGER" ng-change="updateUser(user)">
</td>
Expand Down
39 changes: 38 additions & 1 deletion common/app/styles/partials/_viewer-admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,43 @@
}
}

table.sideways-header {
width: 100%;
padding-right: 30px;

tbody tr {
background-color: #f0f0f0;
}

tbody tr:nth-child(odd) {
background-color: inherit;
}
th {
writing-mode: vertical-rl;
text-orientation: mixed;
transform: rotate(200deg);
min-width: 30px;
position: relative;
left: 16px;
}
th:first-child {
writing-mode: unset;
transform: unset;
left: unset;
vertical-align: bottom;
text-align: center;
}
th:last-child {
min-width: 60px;
}
td {
text-align: center;
}
td:first-child {
text-align: left;
}
}

.foldbox {
$blueHover: #44B4FF;
$greenHover: #71BB50;
Expand Down Expand Up @@ -226,4 +263,4 @@
.foldbox.fail { background-color: #e42629; }
.foldbox.done { background-color: #72e439; }

}
}

0 comments on commit ce983a7

Please sign in to comment.