-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Adding new async publish feature for single and bulk. (#700)"
This reverts commit 2a80955.
- Loading branch information
Showing
14 changed files
with
114 additions
and
818 deletions.
There are no files selected for viewing
17 changes: 0 additions & 17 deletions
17
src/app/components/multiple-draft-generator/multiple-draft-generator.component.css
This file was deleted.
Oops, something went wrong.
101 changes: 22 additions & 79 deletions
101
src/app/components/multiple-draft-generator/multiple-draft-generator.component.html
This file contains 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 |
---|---|---|
@@ -1,92 +1,35 @@ | ||
<div class="modal-body"> | ||
<div class="btn-group btn-group-toggle toggle-drafts" data-toggle="buttons"> | ||
<label | ||
class="btn btn-success {{ | ||
actionType === 'publish' ? 'btn-success' : 'btn-outline-success' | ||
}}" | ||
(click)="switchActionType('publish')" | ||
> | ||
Publish Languages | ||
</label> | ||
<label | ||
class="btn {{ | ||
actionType === 'createDrafts' | ||
? 'btn-secondary' | ||
: 'btn-outline-secondary' | ||
}}" | ||
(click)="switchActionType('createDrafts')" | ||
> | ||
Generate Drafts | ||
</label> | ||
</div> | ||
|
||
<h5>Languages without a Draft</h5> | ||
<div *ngFor="let translation of resource['latest-drafts-translations']"> | ||
<label | ||
class="btn-outline-secondary btn-block translation-btn" | ||
class="btn-secondary btn-block" | ||
ngbButtonLabel | ||
*ngIf=" | ||
actionType === 'publish' || | ||
(actionType === 'createDrafts' && translation['is-published']) | ||
" | ||
*ngIf="translation.is_published" | ||
> | ||
<div class="translation-btn-text"> | ||
<input | ||
type="checkbox" | ||
ngbButton | ||
[(ngModel)]="translation.selectedForAction" | ||
/> | ||
{{ translation.language.name }} | ||
</div> | ||
<admin-translation-version-badge [translation]="translation"> | ||
</admin-translation-version-badge> | ||
<input | ||
type="checkbox" | ||
ngbButton | ||
[(ngModel)]="translation.generateDraft" | ||
/> | ||
{{ translation.language.name }} | ||
</label> | ||
</div> | ||
<br /> | ||
|
||
<ngb-alert | ||
type="success" | ||
[dismissible]="true" | ||
*ngFor="let successMessage of sucessfulMessages" | ||
> | ||
{{ successMessage }} | ||
<ngb-alert type="info" [dismissible]="false" *ngIf="saving"> | ||
Saving... | ||
</ngb-alert> | ||
<ngb-alert type="info" [dismissible]="false" *ngIf="alertMessage"> | ||
{{ alertMessage }} | ||
<ngb-alert type="danger" [dismissible]="false" *ngIf="errorMessage"> | ||
{{ errorMessage }} | ||
</ngb-alert> | ||
<ngb-alert | ||
type="danger" | ||
[dismissible]="false" | ||
*ngFor="let error of errorMessage" | ||
> | ||
{{ error }} | ||
</ngb-alert> | ||
|
||
<ngb-alert type="info" [dismissible]="false" *ngIf="confirmMessage"> | ||
<p>{{ confirmMessage }}</p> | ||
<div class="btn-toolbar justify-content-between"> | ||
<button (click)="confirmMessage = null" class="btn btn-danger"> | ||
Cancel | ||
</button> | ||
<button (click)="publishOrCreateDrafts()" class="btn btn-success"> | ||
Confirm | ||
</button> | ||
</div> | ||
</ngb-alert> | ||
|
||
<div class="modal-footer justify-content-between"> | ||
<button | ||
class="btn btn-secondary" | ||
(click)="cancel()" | ||
[disabled]="disableButtons" | ||
> | ||
<button class="btn btn-danger" (click)="cancel()">Cancel</button> | ||
<button class="btn btn-success" (click)="showConfirmAlert()"> | ||
Generate drafts | ||
</button> | ||
<ngb-alert type="danger" [dismissible]="false" *ngIf="confirmMessage"> | ||
{{ confirmMessage }} | ||
<button (click)="generateDrafts()" class="btn btn-dark">Confirm</button> | ||
<button (click)="confirmMessage = null" class="btn btn-secondary"> | ||
Cancel | ||
</button> | ||
<button | ||
class="btn btn-success" | ||
(click)="showConfirmAlert()" | ||
[disabled]="disableButtons" | ||
> | ||
{{ actionType === 'publish' ? 'Publish' : 'Generate drafts' }} | ||
</button> | ||
</div> | ||
</ngb-alert> | ||
</div> |
This file contains 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
Oops, something went wrong.