Skip to content

Commit

Permalink
Fix part of oppia#16535:Remove view all options from topic viewer page (
Browse files Browse the repository at this point in the history
oppia#18938)

Remove view all options from topic viewer page
  • Loading branch information
Kej-r03 authored Oct 3, 2023
1 parent e002d92 commit a81371a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@
</span>
</div>
<div (click)="showAllChapters()"
*ngIf="showButton && (chaptersDisplayed < nodeCount)"
*ngIf="showButton && (chaptersDisplayed < nodeCount) && !isSerialChapterFeatureFlagEnabled()"
class="view-button">
<span class="fas fa-caret-down down-caret-position"></span>
</div>
<div (click)="hideExtraChapters()"
*ngIf="showButton && (chaptersDisplayed === nodeCount)"
*ngIf="showButton && (chaptersDisplayed === nodeCount) && !isSerialChapterFeatureFlagEnabled()"
class="view-button">
<span class="fas fa-caret-up up-caret-position"></span>
</div>
Expand Down Expand Up @@ -132,7 +132,7 @@
</div>
<hr class="tablet-view heading-separator">
<div *ngFor="let node of nodes;let idx = index">
<div class="story-details-box chapter-specific-box" *ngIf="idx < chaptersDisplayed && node.getStatus() === 'Published'">
<div class="story-details-box chapter-specific-box" *ngIf="node.getStatus() === 'Published'">
<div class="chapter-icon">
<span class="chapter-icon-number">{{ idx + 1 }}</span>
</div>
Expand All @@ -156,7 +156,7 @@
</div>
<hr class="tablet-view heading-separator">
<div *ngFor="let node of nodes;let idx = index">
<div class="story-details-box chapter-specific-box coming-soon-chapters" *ngIf="idx < chaptersDisplayed && node.getStatus() === 'Ready To Publish'">
<div class="story-details-box chapter-specific-box coming-soon-chapters" *ngIf="node.getStatus() === 'Ready To Publish'">
<div class="chapter-icon">
<span class="chapter-icon-number">{{ idx + 1 }}</span>
</div>
Expand Down Expand Up @@ -214,8 +214,8 @@
*ngFor="let node of nodes;let idx = index">
<div *ngIf="node.getStatus() === 'Published' && storySummary.isNodeCompleted(node.getTitle())" class="fas fa-check completed-icon">
</div>
<div [ngClass]="{'border-bottom': idx < chaptersDisplayed, 'pending-chapter': !storySummary.isNodeCompleted(node.getTitle()) && isPreviousChapterCompleted(idx), 'incomplete-chapter': !storySummary.isNodeCompleted(node.getTitle()), 'complete-chapter': storySummary.isNodeCompleted(node.getTitle())}"
*ngIf="node.getStatus() === 'Published' && idx < chaptersDisplayed">
<div [ngClass]="{'pending-chapter': !storySummary.isNodeCompleted(node.getTitle()) && isPreviousChapterCompleted(idx), 'incomplete-chapter': !storySummary.isNodeCompleted(node.getTitle()), 'complete-chapter': storySummary.isNodeCompleted(node.getTitle())}"
*ngIf="node.getStatus() === 'Published'">
<a [href]="getChapterUrl(node.getTitle())" rel="noopener">
<span class="chapter-identifier" [innerHTML]="'I18N_TOPIC_VIEWER_CHAPTER' | translate">
</span>&nbsp;<span class="chapter-identifier">{{ idx + 1 }}:</span>&nbsp;<span dir="auto" *ngIf="!isHackyNodeTitleTranslationDisplayed(idx)">{{ node.getTitle() }}</span>
Expand All @@ -234,8 +234,8 @@
<hr class="heading-separator">
<div class="chapter-title coming-soon-chapters"
*ngFor="let node of nodes;let idx = index">
<div [ngClass]="{'border-bottom': idx < chaptersDisplayed, 'pending-chapter': !storySummary.isNodeCompleted(node.getTitle()) && isPreviousChapterCompleted(idx), 'incomplete-chapter': !storySummary.isNodeCompleted(node.getTitle()), 'complete-chapter': storySummary.isNodeCompleted(node.getTitle())}"
*ngIf="node.getStatus() === 'Ready To Publish' && idx < chaptersDisplayed">
<div [ngClass]="{'pending-chapter': !storySummary.isNodeCompleted(node.getTitle()) && isPreviousChapterCompleted(idx), 'incomplete-chapter': !storySummary.isNodeCompleted(node.getTitle()), 'complete-chapter': storySummary.isNodeCompleted(node.getTitle())}"
*ngIf="node.getStatus() === 'Ready To Publish'">
<a [href]="getChapterUrl(node.getTitle())" rel="noopener">
<span class="chapter-identifier" [innerHTML]="'I18N_TOPIC_VIEWER_CHAPTER' | translate">
</span>&nbsp;<span class="chapter-identifier">{{ idx + 1 }}:</span>&nbsp;<span dir="auto" *ngIf="!isHackyNodeTitleTranslationDisplayed(idx)">{{ node.getTitle() }}</span>
Expand All @@ -246,18 +246,6 @@
</div>
</div>
</div>
<div (click)="showAllChapters()"
*ngIf="showButton && (chaptersDisplayed < nodeCount)"
class="view-button">
<span [innerHTML]="'I18N_TOPIC_VIEWER_VIEW_ALL' | translate"></span>
<span class="fas fa-caret-down down-caret-position"></span>
</div>
<div (click)="hideExtraChapters()"
*ngIf="showButton && (chaptersDisplayed === nodeCount)"
class="view-button">
<span [innerHTML]="'I18N_TOPIC_VIEWER_VIEW_LESS' | translate"></span>
<span class="fas fa-caret-up up-caret-position"></span>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export class StoryEditorNavbarComponent implements OnInit {
this.story, nodes[i].getId(), null);
}
}
if (selectedChapterIndexInPublishUptoDropdown === -1) {
if (Number(selectedChapterIndexInPublishUptoDropdown) === -1) {
this.unpublishStory();
}
this.storyEditorStateService.saveStory(
Expand Down

0 comments on commit a81371a

Please sign in to comment.