Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -945,12 +945,6 @@ tr:nth-child(odd) td.db-filled {
margin-right: 10px;
}

.remove-collaborator-button {
background: none;
border: none;
cursor: pointer;
}

.sub-entity-dataset-modal, .experiment-observations-download-button, .experiment-observation-add-collaborator-button, .experiment-observation-remove-collaborator-button {
.modal {
.modal-card {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
v-on:show-error-notification="$emit('show-error-notification', $event)"
>
<template #form>
<p>An experimental collaborator will be granted read, download, and BrAPI pull access to this experiment {{experiment.trialName}}. If the collaborator is not available from the dropdown menu, they will need to be added. <router-link v-bind:to="{name: 'program-users', params:{programId: activeProgram.id}}">Program Administration > Users</router-link></p>
<p>An experimental collaborator will be granted read, download, and BrAPI pull access to this experiment {{experiment.trialName}}. If the collaborator is not available from the dropdown menu, they will need to be added. <router-link class="customize-for-accessibility" v-bind:to="{name: 'program-users', params:{programId: activeProgram.id}}">Program Administration > Users</router-link></p>
<div class="columns mb-4">
<!-- Collaborator Select -->
<div class="column control">
Expand Down
4 changes: 2 additions & 2 deletions src/config/ability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const rolePermissions: Record<string, DefinePermissions> = {
can('access', 'ProgramAdministration');
can('access', 'BrAPI');
can('access', 'JobManagement');
can('create', 'Collaborator');
can('manage', 'Collaborator');

},
systemadministrator(user, { can }) {
Expand All @@ -78,7 +78,7 @@ const rolePermissions: Record<string, DefinePermissions> = {
can('access', 'ProgramAdministration');
can('access', 'BrAPI');
can('access', 'JobManagement');
can('create', 'Collaborator');
can('manage', 'Collaborator');

}
};
Expand Down
13 changes: 8 additions & 5 deletions src/views/experiments-and-observations/ExperimentDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,13 @@
<b class="collaborators-label">Collaborators:</b>
<ul class="collaborators-list">
<li v-for="collaborator in collaborators" :key="collaborator.collaboratorId" class="collaborator-item">
<span class="collaborator-info">{{ collaborator.name }}</span>
<span class="collaborator-info">{{ collaborator.email }}</span>
<button v-on:click="removeCollaborator(collaborator)" class="remove-collaborator-button">
<i class="fas fa-minus-circle"></i>
<span class="collaborator-info has-text-right">{{ collaborator.name }}</span>
<span class="collaborator-info">{{"(" + collaborator.email + ")"}}</span>
<button
v-show="$ability.can('manage', 'Collaborator')"
v-on:click="removeCollaborator(collaborator)"
type="button"
class="delete">
</button>
</li>
</ul>
Expand Down Expand Up @@ -201,7 +204,7 @@ export default class ExperimentDetails extends ProgramsBase {
private actions: ActionMenuItem[] = [
new ActionMenuItem('experiment-import-file', 'import-file', 'Import file', this.$ability.can('create', 'Import')),
new ActionMenuItem('experiment-download-file', 'download-file', 'Download file'),
new ActionMenuItem('experiment-add-collaborator', 'add-collaborator', 'Add Collaborator', this.$ability.can('create', 'Collaborator')),
new ActionMenuItem('experiment-add-collaborator', 'add-collaborator', 'Add Collaborator', this.$ability.can('manage', 'Collaborator')),
// new ActionMenuItem('experiment-create-sub-entity-dataset', 'create-sub-entity-dataset', 'Create Sub-Entity Dataset')
];

Expand Down