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
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,16 @@
}
}

// stylelint-disable selector-no-qualifying-type
a.DraftRegistrationCard__review {
margin-right: 10px;
.DraftRegistrationCard__review {
composes: Button from '../button/styles.scss';
composes: SecondaryButton from '../button/styles.scss';
composes: MediumButton from '../button/styles.scss';

&:hover {
text-decoration: none;
text-decoration: none !important; /* override OsfLink hover style */
}
}

// stylelint-enable selector-no-qualifying-type
.DraftRegistrationCard__edit {
vertical-align: bottom;
}

.DraftRegistrationCard__delete {
button {
padding: 6px 12px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,17 @@
@route='registries.drafts.draft.review'
@models={{array this.draftRegistration.id}}
>
<Button>
{{t 'osf-components.draft-registration-card.review'}}
</Button>
{{t 'osf-components.draft-registration-card.review'}}
</OsfLink>
{{#unless this.draftRegistration.currentUserIsReadOnly}}
<OsfLink
data-test-draft-card-edit
local-class='DraftRegistrationCard__review'
data-analytics-name='Edit'
@route='registries.drafts.draft'
@models={{array this.draftRegistration.id}}
>
<Button local-class='DraftRegistrationCard__edit'>
{{t 'general.edit'}}
</Button>
{{t 'general.edit'}}
</OsfLink>
{{/unless}}
</div>
Expand Down
10 changes: 10 additions & 0 deletions lib/osf-components/addon/components/node-card/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,13 @@
overflow: hidden;
white-space: nowrap;
}

.NodeCard__link {
composes: Button from '../button/styles.scss';
composes: SecondaryButton from '../button/styles.scss';
composes: MediumButton from '../button/styles.scss';

&:hover {
text-decoration: none !important; /* override OsfLink hover style */
}
}
14 changes: 4 additions & 10 deletions lib/osf-components/addon/components/node-card/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -172,30 +172,24 @@
</dl>
<div local-class='MyRegistrationsButtons'>
<OsfLink
local-class='NodeCard__link'
data-analytics-name='View registration'
data-test-view-button='{{@node.id}}'
@route='resolve-guid'
@models={{array @node.id}}
>
<Button
local-class='RegistrationCard_view'
>
{{t 'node_card.view_button'}}
</Button>
{{t 'node_card.view_button'}}
</OsfLink>
{{#if this.latestSchemaResponse}}
{{#if this.shouldShowViewChangesButton}}
<OsfLink
local-class='NodeCard__link'
data-analytics-name='View changes'
data-test-view-changes-button={{@node.id}}
@route='registries.edit-revision.review'
@models={{array this.latestSchemaResponse.id}}
>
<Button
{{!-- local-class='RegistrationCard_update' --}}
>
{{t 'node_card.view_changes_button'}}
</Button>
{{t 'node_card.view_changes_button'}}
</OsfLink>
{{/if}}
{{/if}}
Expand Down