-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8278 from stopfstedt/cleanup
rm unnecessary loading of sessions from component.
- Loading branch information
Showing
2 changed files
with
34 additions
and
54 deletions.
There are no files selected for viewing
66 changes: 32 additions & 34 deletions
66
packages/ilios-common/addon/components/course/objective-list.hbs
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,39 +1,37 @@ | ||
<div class="course-objective-list" data-test-course-objective-list> | ||
{{#if this.courseSessionsLoaded}} | ||
{{#if this.isSorting}} | ||
<ObjectiveSortManager @subject={{@course}} @close={{set this "isSorting" false}} /> | ||
{{/if}} | ||
{{#if this.isSorting}} | ||
<ObjectiveSortManager @subject={{@course}} @close={{set this "isSorting" false}} /> | ||
{{/if}} | ||
|
||
{{#if (and this.courseObjectiveCount (not this.isSorting))}} | ||
{{#if (and @editable (gt this.courseObjectiveCount 1))}} | ||
<button | ||
class="sort-button" | ||
type="button" | ||
{{on "click" (set this "isSorting" true)}} | ||
data-test-sort | ||
> | ||
{{t "general.sortObjectives"}} | ||
</button> | ||
{{/if}} | ||
<div class="grid-row headers" data-test-headers> | ||
<span class="grid-item" data-test-header>{{t "general.description"}}</span> | ||
<span class="grid-item" data-test-header>{{t "general.parentObjectives"}}</span> | ||
<span class="grid-item" data-test-header>{{t "general.vocabularyTerms"}}</span> | ||
<span class="grid-item" data-test-header>{{t "general.meshTerms"}}</span> | ||
<span class="actions grid-item" data-test-header>{{t "general.actions"}}</span> | ||
</div> | ||
{{#if (and (is-array this.courseObjectives) this.cohortObjectivesLoaded)}} | ||
{{#each this.courseObjectives as |courseObjective|}} | ||
<Course::ObjectiveListItem | ||
@courseObjective={{courseObjective}} | ||
@editable={{@editable}} | ||
@cohortObjectives={{this.cohortObjectives}} | ||
@course={{@course}} | ||
/> | ||
{{/each}} | ||
{{else}} | ||
<Course::ObjectiveListLoading @count={{this.courseObjectiveCount}} /> | ||
{{/if}} | ||
{{#if (and this.courseObjectiveCount (not this.isSorting))}} | ||
{{#if (and @editable (gt this.courseObjectiveCount 1))}} | ||
<button | ||
class="sort-button" | ||
type="button" | ||
{{on "click" (set this "isSorting" true)}} | ||
data-test-sort | ||
> | ||
{{t "general.sortObjectives"}} | ||
</button> | ||
{{/if}} | ||
<div class="grid-row headers" data-test-headers> | ||
<span class="grid-item" data-test-header>{{t "general.description"}}</span> | ||
<span class="grid-item" data-test-header>{{t "general.parentObjectives"}}</span> | ||
<span class="grid-item" data-test-header>{{t "general.vocabularyTerms"}}</span> | ||
<span class="grid-item" data-test-header>{{t "general.meshTerms"}}</span> | ||
<span class="actions grid-item" data-test-header>{{t "general.actions"}}</span> | ||
</div> | ||
{{#if (and (is-array this.courseObjectives) this.cohortObjectivesLoaded)}} | ||
{{#each this.courseObjectives as |courseObjective|}} | ||
<Course::ObjectiveListItem | ||
@courseObjective={{courseObjective}} | ||
@editable={{@editable}} | ||
@cohortObjectives={{this.cohortObjectives}} | ||
@course={{@course}} | ||
/> | ||
{{/each}} | ||
{{else}} | ||
<Course::ObjectiveListLoading @count={{this.courseObjectiveCount}} /> | ||
{{/if}} | ||
{{/if}} | ||
</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