Skip to content

Commit

Permalink
use FE feature flipping
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Jan 13, 2025
1 parent 6c972a2 commit 239f9e1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,15 @@
<OsfLink @href={{concat '/' institutionalUser.userGuid '/'}}>
{{institutionalUser.userName}}
</OsfLink>
<Button
local-class='icon-message'
aria-label={{t 'institutions.dashboard.send_message_modal.open_aira_label'}}

{{on 'click' (fn this.openMessageModal institutionalUser.userGuid)}}
>
<FaIcon @icon='comment' />
</Button>
{{#if @institution.institutionalRequestAccessEnabled}}
<Button
local-class='icon-message'
aria-label={{t 'institutions.dashboard.send_message_modal.open_aira_label'}}
{{on 'click' (fn this.openMessageModal institutionalUser.userGuid)}}
>
<FaIcon @icon='comment' />
</Button>
{{/if}}
{{else if (eq column.type 'osf_link')}}
<OsfLink @href={{concat '/' institutionalUser.userGuid '/'}}>
{{institutionalUser.userGuid}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
</OsfLink>
{{t 'institutions.dashboard.object-list.table-items.permission-level' permissionLevel=contributor.permissionLevel}}
</div>
<Button
local-class='icon-message'
aria-label={{t 'institutions.dashboard.request_project_message_modal.open_aria_label'}}
{{on 'click' (fn this.handleOpenModal contributor)}}
>
<FaIcon @icon='comment' />
</Button>
{{#if @institution.institutionalRequestAccessEnabled}}
<Button
local-class='icon-message'
aria-label={{t 'institutions.dashboard.request_project_message_modal.open_aria_label'}}
{{on 'click' (fn this.handleOpenModal contributor)}}
>
<FaIcon @icon='comment' />
</Button>
{{/if}}
{{else}}
<div>
{{t 'institutions.dashboard.object-list.table-items.no-contributors'}}
Expand Down
1 change: 1 addition & 0 deletions app/models/institution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default class InstitutionModel extends OsfModel {
// identifier_domain in the admin app
@attr('fixstring') iri!: string;
@attr('fixstringarray') iris!: string[];
@attr('boolean', { defaultValue: false }) institutionalAccessRequestEnabled!: boolean;

// TODO Might want to replace calls to `users` with `institutionUsers.user`?
@hasMany('user', { inverse: 'institutions' })
Expand Down

0 comments on commit 239f9e1

Please sign in to comment.