diff --git a/app/adapters/node-request.ts b/app/adapters/node-request.ts new file mode 100644 index 0000000000..1c0c73e088 --- /dev/null +++ b/app/adapters/node-request.ts @@ -0,0 +1,13 @@ +import { inject as service } from '@ember/service'; +import config from 'ember-osf-web/config/environment'; +const { OSF: { apiUrl } } = config; +import OsfAdapter from './osf-adapter'; + +export default class NodeRequestAdapter extends OsfAdapter { + @service session; + + urlForCreateRecord(modelName, snapshot) { + const nodeId = snapshot.record.target; + return `${apiUrl}/v2/nodes/${nodeId}/requests/`; + } +} diff --git a/app/adapters/user-message.ts b/app/adapters/user-message.ts index a92b865c71..dad3feb9ef 100644 --- a/app/adapters/user-message.ts +++ b/app/adapters/user-message.ts @@ -1,4 +1,3 @@ -// app/adapters/user-message.js import { inject as service } from '@ember/service'; import config from 'ember-osf-web/config/environment'; const { OSF: { apiUrl } } = config; @@ -7,7 +6,7 @@ import OsfAdapter from './osf-adapter'; export default class UserMessageAdapter extends OsfAdapter { @service session; urlForCreateRecord(modelName, snapshot) { - const userId = snapshot.record.user; + const userId = snapshot.record.messageRecipient; return `${apiUrl}/v2/users/${userId}/messages/`; } } diff --git a/app/institutions/dashboard/-components/institutional-users-list/component.ts b/app/institutions/dashboard/-components/institutional-users-list/component.ts index 2268909b0c..c009306998 100644 --- a/app/institutions/dashboard/-components/institutional-users-list/component.ts +++ b/app/institutions/dashboard/-components/institutional-users-list/component.ts @@ -43,7 +43,7 @@ export default class InstitutionalUsersList extends Component
+ {{else}}
{{t 'institutions.dashboard.object-list.table-items.no-contributors'}} diff --git a/app/institutions/dashboard/-components/object-list/styles.scss b/app/institutions/dashboard/-components/object-list/styles.scss index 0677767f4f..2885a44dca 100644 --- a/app/institutions/dashboard/-components/object-list/styles.scss +++ b/app/institutions/dashboard/-components/object-list/styles.scss @@ -129,6 +129,74 @@ padding-left: 10px; } +.message-textarea { + min-width: 450px; + min-height: 280px; +} + +.message-label { + display: block; +} + +.checkbox-container { + display: flex; + flex-direction: column; + gap: 10px; + padding: 10px; +} + +.checkbox-item { + display: flex; + align-items: center; + gap: 8px; + font-size: 14px; +} + +.radiobox-container { + gap: 20px; +} + +.radiobox-item { + display: flex; + align-items: center; + gap: 8px; + font-size: 14px; +} + +.tab-container { + display: flex; + border-bottom: 1px solid $color-border-gray; + margin-bottom: 1rem; +} + +.tab-button { + flex: 1; + padding: 10px; + text-align: center; + cursor: pointer; + background: $color-bg-gray; + border: 0; + border-bottom: 2px solid transparent; + + &.active { + border-bottom: 2px solid $color-border-gray; + font-weight: bold; + } + + &:hover { + background: $color-bg-gray; + } +} + +.tab-pane { + padding: 1rem; + background: $color-border-white; +} + +.request-modal { + max-width: min-content; +} + .download-dropdown-content { display: flex; flex-direction: column; diff --git a/app/institutions/dashboard/-components/object-list/template.hbs b/app/institutions/dashboard/-components/object-list/template.hbs index c4e2ba2c6b..ed912e45ff 100644 --- a/app/institutions/dashboard/-components/object-list/template.hbs +++ b/app/institutions/dashboard/-components/object-list/template.hbs @@ -184,6 +184,8 @@ as |list|> {{else}} {{call (fn column.getValue result)}} @@ -277,3 +279,134 @@ as |list|> {{/if}} + + + {{t 'institutions.dashboard.object-list.request-project-message-modal.title'}} + + +
+ + +
+ + {{#if (eq this.activeTab 'request-access')}} +
+

+ {{t 'institutions.dashboard.object-list.request-project-message-modal.request_label' institution=@institution.name}} +

+
+ + +