-
Notifications
You must be signed in to change notification settings - Fork 25
[ENG-9198] redirect to info page if preprint is undermoderation and is accessed by not contributor #835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mkovalua
wants to merge
11
commits into
CenterForOpenScience:feature/pbs-25-24
Choose a base branch
from
mkovalua:fix/ENG-9198
base: feature/pbs-25-24
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[ENG-9198] redirect to info page if preprint is undermoderation and is accessed by not contributor #835
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
87a776b
redirect to info page if preprint is undermoderation and is accessed…
mkovalua d8d6f84
update render to info page
mkovalua af31a73
add preprint-pending-moderation info component
mkovalua 30dfcd1
update preprint-pending-moderation info component styles
mkovalua 065ccbc
resolve linter issues
mkovalua b83cf04
resolve linter issues
mkovalua 7c864e8
handle 'This preprint is pending moderation and is not yet publicly …
mkovalua 9f9a842
resolve CR comments
mkovalua 39cb47e
update code
mkovalua 0113067
resolve CR
mkovalua e6a378f
resolve CR
mkovalua File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...es/preprints/pages/preprint-pending-moderation/preprint-pending-moderation.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <section class="container text-center flex flex-column flex-1 my-7 mx-3 p-3 md:p-4"> | ||
| <h2>{{ 'preprints.details.moderationStatusBanner.pendingDetails.title' | translate }}</h2> | ||
| <p class="mt-4">{{ 'preprints.details.moderationStatusBanner.pendingDetails.body' | translate }}</p> | ||
| </section> |
11 changes: 11 additions & 0 deletions
11
...es/preprints/pages/preprint-pending-moderation/preprint-pending-moderation.component.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| @use "styles/mixins" as mix; | ||
|
|
||
| :host { | ||
| @include mix.flex-center; | ||
| flex: 1; | ||
| background: var(--gradient-3); | ||
| } | ||
|
|
||
| .container { | ||
| max-width: mix.rem(448px); | ||
| } | ||
24 changes: 24 additions & 0 deletions
24
...preprints/pages/preprint-pending-moderation/preprint-pending-moderation.component.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
|
||
| import { PreprintPendingModerationComponent } from './preprint-pending-moderation.component'; | ||
|
|
||
| import { OSFTestingModule } from '@testing/osf.testing.module'; | ||
|
|
||
| describe('PreprintPendingModerationComponent', () => { | ||
| let component: PreprintPendingModerationComponent; | ||
| let fixture: ComponentFixture<PreprintPendingModerationComponent>; | ||
|
|
||
| beforeEach(async () => { | ||
| await TestBed.configureTestingModule({ | ||
| imports: [PreprintPendingModerationComponent, OSFTestingModule], | ||
| }).compileComponents(); | ||
|
|
||
| fixture = TestBed.createComponent(PreprintPendingModerationComponent); | ||
| component = fixture.componentInstance; | ||
| fixture.detectChanges(); | ||
| }); | ||
|
|
||
| it('should create', () => { | ||
| expect(component).toBeTruthy(); | ||
| }); | ||
| }); |
12 changes: 12 additions & 0 deletions
12
...ures/preprints/pages/preprint-pending-moderation/preprint-pending-moderation.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { TranslatePipe } from '@ngx-translate/core'; | ||
|
|
||
| import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
|
|
||
| @Component({ | ||
| selector: 'osf-preprint-pending-moderation', | ||
| templateUrl: './preprint-pending-moderation.component.html', | ||
| styleUrl: './preprint-pending-moderation.component.scss', | ||
| changeDetection: ChangeDetectionStrategy.OnPush, | ||
| imports: [TranslatePipe], | ||
| }) | ||
| export class PreprintPendingModerationComponent {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.