richie-education 2.25.0-b2.dev42 → 2.25.0-b2.dev43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,7 +28,6 @@ export interface CourseGlimpseCourse {
|
|
|
28
28
|
srcset?: string;
|
|
29
29
|
}>;
|
|
30
30
|
};
|
|
31
|
-
nb_seller_organizations: number;
|
|
32
31
|
icon?: Nullable<{
|
|
33
32
|
title: string;
|
|
34
33
|
src: string;
|
|
@@ -68,11 +67,6 @@ const messages = defineMessages({
|
|
|
68
67
|
description: 'Category label text for screen reader users',
|
|
69
68
|
id: 'components.CourseGlimpse.categoryLabel',
|
|
70
69
|
},
|
|
71
|
-
organizationsTitle: {
|
|
72
|
-
defaultMessage: 'Produced by {nbOrganizations} partners',
|
|
73
|
-
description: 'Organizations title for multiple organizations',
|
|
74
|
-
id: 'components.CourseGlimpse.organizationsTitle',
|
|
75
|
-
},
|
|
76
70
|
});
|
|
77
71
|
|
|
78
72
|
const CourseGlimpseBase = ({ context, course }: CourseGlimpseProps & CommonDataProps) => {
|
|
@@ -114,7 +108,7 @@ const CourseGlimpseBase = ({ context, course }: CourseGlimpseProps & CommonDataP
|
|
|
114
108
|
<span className="course-glimpse__title-text">{course.title}</span>
|
|
115
109
|
</CourseLink>
|
|
116
110
|
</h3>
|
|
117
|
-
{course.
|
|
111
|
+
{course.organization.image ? (
|
|
118
112
|
<div className="course-glimpse__organization-logo">
|
|
119
113
|
{/* alt forced to empty string because the organization name is rendered after */}
|
|
120
114
|
<img
|
|
@@ -131,16 +125,7 @@ const CourseGlimpseBase = ({ context, course }: CourseGlimpseProps & CommonDataP
|
|
|
131
125
|
title={intl.formatMessage(messages.organizationIconAlt)}
|
|
132
126
|
size="small"
|
|
133
127
|
/>
|
|
134
|
-
<span className="title">
|
|
135
|
-
{course.nb_seller_organizations === 1 ? (
|
|
136
|
-
course.organization.title
|
|
137
|
-
) : (
|
|
138
|
-
<FormattedMessage
|
|
139
|
-
{...messages.organizationsTitle}
|
|
140
|
-
values={{ nbOrganizations: course.nb_seller_organizations }}
|
|
141
|
-
/>
|
|
142
|
-
)}
|
|
143
|
-
</span>
|
|
128
|
+
<span className="title">{course.organization.title}</span>
|
|
144
129
|
</div>
|
|
145
130
|
<div className="course-glimpse__metadata course-glimpse__metadata--code">
|
|
146
131
|
<Icon
|
|
@@ -38,7 +38,6 @@ const getCourseGlimpsePropsFromCourseProductRelation = (
|
|
|
38
38
|
title: courseProductRelation.organizations[0].title,
|
|
39
39
|
image: courseProductRelation.organizations[0].logo || null,
|
|
40
40
|
},
|
|
41
|
-
nb_seller_organizations: courseProductRelation.organizations.length,
|
|
42
41
|
product_id: courseProductRelation.product.id,
|
|
43
42
|
course_route: courseRoute,
|
|
44
43
|
state: courseProductRelation.product.state,
|
|
@@ -55,7 +54,6 @@ const getCourseGlimpsePropsFromRichieCourse = (course: RichieCourse): CourseGlim
|
|
|
55
54
|
title: course.organization_highlighted,
|
|
56
55
|
image: course.organization_highlighted_cover_image,
|
|
57
56
|
},
|
|
58
|
-
nb_seller_organizations: course.organizations.length,
|
|
59
57
|
icon: course.icon,
|
|
60
58
|
state: course.state,
|
|
61
59
|
duration: course.duration,
|
|
@@ -93,7 +91,6 @@ const getCourseGlimpsePropsFromJoanieCourse = (
|
|
|
93
91
|
title: course.organizations[0].title,
|
|
94
92
|
image: course.organizations[0].logo || null,
|
|
95
93
|
},
|
|
96
|
-
nb_seller_organizations: course.organizations.length,
|
|
97
94
|
state: course.state,
|
|
98
95
|
nb_course_runs: course.course_run_ids.length,
|
|
99
96
|
};
|