-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathlibrary-project-details.component.html
More file actions
231 lines (231 loc) · 8.12 KB
/
Copy pathlibrary-project-details.component.html
File metadata and controls
231 lines (231 loc) · 8.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<ng-template #standard let-standards="standards" let-standardsName="standardsName">
@if (standards.length > 0) {
<div>
<span i18n>{{ standardsName }}: </span>
@for (standard of standards; track standard.id; let last = $last) {
<a
href="{{ standard.url }}"
target="_blank"
[matTooltip]="standard.name"
matTooltipPosition="above"
>{{ standard.id }}</a
>{{ last ? '' : ' • ' }}
}
</div>
}
</ng-template>
<div class="library-project-details" mat-dialog-content>
<div class="flex flex-row">
<div class="flex flex-row">
<div class="mat-mdc-card-avatar" [style.background-image]="project.thumbStyle"></div>
<div class="flex-1 flex flex-row flex-wrap">
<div class="flex flex-col">
<div class="mat-mdc-card-title mat-body-1">{{ project.metadata.title }}</div>
<div class="mat-mdc-card-subtitle mat-caption">
@if (project.metadata.grades.length || project.metadata.totalTime) {
<div>
@if (project.metadata.grades.length) {
<span i18n>Grade level:</span>
}
@for (
grade of project.metadata.grades;
track grade;
let first = $first;
let last = $last
) {
{{ first ? ' ' : '' }}{{ grade }}{{ last ? '' : ', ' }}
}
@if (project.metadata.grades.length && project.metadata.totalTime) {
|
}
@if (project.metadata.totalTime) {
<ng-container i18n>Duration: {{ project.metadata.totalTime }}</ng-container>
}
</div>
}
<div>
<ng-container i18n>Unit ID: {{ project.id }}</ng-container>
</div>
</div>
</div>
<span class="hidden sm:flex-auto"></span>
</div>
</div>
<span class="flex-auto"></span>
@if (isTeacher && project.wiseVersion !== 4) {
<app-library-project-menu [project]="project" [isRun]="isRunProject" />
}
</div>
<div class="info-block">
<div class="details">
@if (project.wiseVersion === 4) {
<p class="warn flex justify-start items-center">
<mat-icon color="warn">warning</mat-icon>
<strong
class="more-info"
tabindex="0"
i18n-matTooltip
matTooltip="This unit is from an old version of WISE that is no longer supported. Please find an alternate unit to use in the future or contact us for upgrade options."
[matTooltipPosition]="'after'"
i18n
>Legacy Unit</strong
>
</p>
}
@if (project.metadata.unitType !== 'Platform') {
<p class="notice max-w-none" i18n>
Note: This unit was created outside of the WISE platform. Teaching resources are linked
below.
</p>
}
@if (project.metadata.resources?.length > 0) {
<p>
<strong i18n>Resources:</strong>
{{ first ? ' ' : '' }}
@for (resource of project.metadata.resources; track resource.name; let last = $last) {
<a href="{{ resource.url }}" target="_blank">{{ resource.name }}</a
>{{ last ? '' : ' • ' }}
}
</p>
}
@if (project.metadata.summary) {
<div [innerHTML]="project.metadata.summary"></div>
}
@if (project.metadata.disciplines?.length) {
<p>
<strong i18n>Discipline:</strong>
@for (
discipline of project.metadata.disciplines;
track discipline.name;
let last = $last
) {
{{ discipline.name }}{{ last ? '' : ' • ' }}
}
</p>
}
@if (project.metadata.features?.length) {
<p>
<strong i18n>Features:</strong>
@for (feature of project.metadata.features; track feature.name; let last = $last) {
{{ feature.name }}{{ last ? '' : ' • ' }}
}
</p>
}
@if (
standards?.commonCore?.length +
standards?.ngss?.length +
standards?.learningForJustice?.length >
0
) {
<p>
<strong i18n>Standards Addressed:</strong>
@if (standards.commonCore) {
<ng-container
[ngTemplateOutlet]="standard"
[ngTemplateOutletContext]="{
standards: standards.commonCore,
standardsName: standardLabels.commonCore
}"
/>
}
@if (standards.ngss) {
<ng-container
[ngTemplateOutlet]="standard"
[ngTemplateOutletContext]="{
standards: standards.ngss,
standardsName: standardLabels.ngss
}"
/>
}
@if (standards.learningForJustice) {
<ng-container
[ngTemplateOutlet]="standard"
[ngTemplateOutletContext]="{
standards: standards.learningForJustice,
standardsName: standardLabels.learningForJustice
}"
/>
}
</p>
}
@if (project.tags) {
<unit-tags [tags]="project.tags" />
}
</div>
@if (project.metadata.discourseCategoryURL) {
<discourse-category-activity [categoryURL]="project.metadata.discourseCategoryURL" />
}
<div class="license notice-bg-bg mat-caption secondary-text">
<img src="../../../../assets/img/by-sa.png" alt="CC BY-SA" />
@if (isCopy) {
<span>
@if (parentAuthorsString.length == 0) {
<ng-container i18n
><a href="{{ project.uri }}" target="_blank">This unit</a> is a copy of
<a href="{{ parentProject.uri }}" target="_blank">{{ parentProject.title }}</a> (used
under <a href="{{ licenseUrl }}" target="_blank">CC BY-SA</a>).</ng-container
>
} @else {
<ng-container i18n
><a href="{{ project.uri }}" target="_blank">This unit</a> is a copy of
<a href="{{ parentProject.uri }}" target="_blank">{{ parentProject.title }}</a> by
{{ parentAuthorsString }} (used under
<a href="{{ licenseUrl }}" target="_blank">CC BY-SA</a>).</ng-container
>
}
</span>
} @else {
<span>
@if (authorsString.length == 0) {
<ng-container i18n
><a href="{{ project.uri }}" target="_blank">This unit</a> is licensed under
<a href="{{ licenseUrl }}" target="_blank">CC BY-SA</a>.
</ng-container>
} @else {
<ng-container i18n
><a href="{{ project.uri }}" target="_blank">This unit</a> is licensed under
<a href="{{ licenseUrl }}" target="_blank">CC BY-SA</a> by {{ authorsString }}.
</ng-container>
}
</span>
}
@if (project.license) {
<a href="{{ project.license }}" target="_blank" i18n>View License</a>
} @else {
<span
class="more-info"
[matTooltip]="licenseInfo"
matTooltipPosition="above"
tabindex="0"
i18n
>More</span
>
}
</div>
</div>
</div>
<div mat-dialog-actions class="flex flex-col sm:flex-row gap-2 sm:gap-4 !items-stretch" align="end">
<button mat-button cdkFocusInitial (click)="close()" i18n>Close</button>
@if (
isTeacher &&
!isRunProject &&
project.wiseVersion !== 4 &&
project.metadata.unitType === 'Platform'
) {
<button mat-flat-button color="accent" (click)="runProject()">
<mat-icon>supervised_user_circle</mat-icon> <ng-container i18n
>Use with Class</ng-container
>
</button>
}
@if (canPreview) {
<button mat-flat-button color="primary" (click)="previewProject()">
<mat-icon>preview</mat-icon>
@if (project.metadata.unitType === 'Platform') {
<ng-container i18n>Preview</ng-container>
} @else {
<ng-container i18n>Unit Resources</ng-container>
}
</button>
}
</div>