Skip to content

Commit

Permalink
Merge pull request learningequality#7817 from sairina/change-all-krou…
Browse files Browse the repository at this point in the history
…terlinks
  • Loading branch information
jonboiser authored Feb 27, 2021
2 parents fc57aeb + 3e982df commit 72a858a
Show file tree
Hide file tree
Showing 26 changed files with 160 additions and 211 deletions.
2 changes: 1 addition & 1 deletion kolibri/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"hammerjs": "^2.0.8",
"intl": "^1.2.4",
"knuth-shuffle-seeded": "^1.0.6",
"kolibri-design-system": "github:learningequality/kolibri-design-system#v0.2.1",
"kolibri-design-system": "github:learningequality/kolibri-design-system#v0.2.x",
"lockr": "0.8.4",
"lodash": "^4.17.4",
"loglevel": "^1.4.1",
Expand Down
11 changes: 5 additions & 6 deletions kolibri/plugins/coach/assets/src/views/AllFacilitiesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
<tbody>
<tr v-for="facility in facilities" :key="facility.id">
<td>
<KLabeledIcon icon="facility">
<KRouterLink
:text="facility.name"
:to="coachClassListPageLink(facility)"
/>
</KLabeledIcon>
<KRouterLink
:text="facility.name"
:to="coachClassListPageLink(facility)"
icon="facility"
/>
</td>
<td>
{{ $formatNumber(facility.num_classrooms) }}
Expand Down
11 changes: 5 additions & 6 deletions kolibri/plugins/coach/assets/src/views/CoachClassListPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@
<transition-group tag="tbody" name="list">
<tr v-for="classObj in classList" :key="classObj.id">
<td>
<KLabeledIcon icon="classes">
<KRouterLink
:text="classObj.name"
:to="$router.getRoute('HomePage', { classId: classObj.id })"
/>
</KLabeledIcon>
<KRouterLink
:text="classObj.name"
:to="$router.getRoute('HomePage', { classId: classObj.id })"
icon="classes"
/>
</td>
<td>
<TruncatedItemList :items="classObj.coaches.map(c => c.full_name)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@
:key="exam.id"
>
<td>
<KLabeledIcon icon="quiz">
<KRouterLink
:to="$router.getRoute('QuizSummaryPage', { quizId: exam.id })"
appearance="basic-link"
:text="exam.title"
/>
</KLabeledIcon>
<KRouterLink
:to="$router.getRoute('QuizSummaryPage', { quizId: exam.id })"
appearance="basic-link"
:text="exam.title"
icon="quiz"
/>
</td>

<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

<tr>
<td>
<KLabeledIcon icon="group">
<KRouterLink
:text="group.name"
:to="$router.getRoute('GroupMembersPage', { groupId: group.id })"
/>
</KLabeledIcon>
<KRouterLink
:text="group.name"
:to="$router.getRoute('GroupMembersPage', { groupId: group.id })"
icon="group"
/>
</td>
<td>
{{ group.users.length }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@
:key="lesson.id"
>
<td>
<KLabeledIcon icon="lesson">
<KRouterLink
:to="lessonSummaryLink({ lessonId: lesson.id, classId })"
:text="lesson.title"
/>
</KLabeledIcon>
<KRouterLink
:to="lessonSummaryLink({ lessonId: lesson.id, classId })"
:text="lesson.title"
icon="lesson"
/>
</td>
<td>{{ coachString('numberOfResources', { value: lesson.resources.length }) }}</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@
<transition-group tag="tbody" name="list">
<tr v-for="entry in entries" :key="entry.id" data-test="entry">
<td>
<KLabeledIcon icon="person">
<KRouterLink
v-if="showLink(entry)"
:text="entry.name"
:to="entry.exerciseLearnerLink"
data-test="exercise-learner-link"
/>
<template v-else>
{{ entry.name }}
</template>
</KLabeledIcon>
<KRouterLink
v-if="showLink(entry)"
:text="entry.name"
:to="entry.exerciseLearnerLink"
data-test="exercise-learner-link"
icon="person"
/>
<template v-else>
{{ entry.name }}
</template>
</td>
<td>
<StatusSimple :status="entry.statusObj.status" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in table" :key="tableRow.id">
<td>
<KLabeledIcon icon="person">
<KRouterLink
:text="tableRow.name"
:to="classRoute('ReportsLearnerReportPage', { learnerId: tableRow.id })"
/>
</KLabeledIcon>
<KRouterLink
:text="tableRow.name"
:to="classRoute('ReportsLearnerReportPage', { learnerId: tableRow.id })"
icon="person"
/>
</td>
<td><Score :value="tableRow.avgScore" /></td>
<td>{{ coachString('integer', { value: tableRow.exercises }) }}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in table" :key="tableRow.id">
<td>
<KLabeledIcon icon="group">
<KRouterLink
:text="tableRow.name"
:to="classRoute('ReportsGroupReportPage', { groupId: tableRow.id })"
/>
</KLabeledIcon>
<KRouterLink
:text="tableRow.name"
:to="classRoute('ReportsGroupReportPage', { groupId: tableRow.id })"
icon="group"
/>
</td>
<td>
{{ coachString('integer', { value: tableRow.numLessons }) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in table" :key="tableRow.question_id">
<td>
<KLabeledIcon icon="person">
<KRouterLink
:text="tableRow.title"
:to="questionLink(tableRow.question_id)"
/>
</KLabeledIcon>
<KRouterLink
:text="tableRow.title"
:to="questionLink(tableRow.question_id)"
icon="person"
/>
</td>
<td>
<LearnerProgressRatio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,24 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in table" :key="tableRow.node_id">
<td>
<KLabeledIcon :icon="tableRow.kind">
<KRouterLink
v-if="tableRow.kind === 'exercise'"
:text="tableRow.title"
:to="classRoute(
'ReportsGroupReportLessonExerciseLearnerListPage',
{ exerciseId: tableRow.content_id }
)"
/>
<KRouterLink
v-else
:text="tableRow.title"
:to="classRoute(
'ReportsGroupReportLessonResourceLearnerListPage',
{ resourceId: tableRow.content_id }
)"
/>
</KLabeledIcon>
<KRouterLink
v-if="tableRow.kind === 'exercise'"
:text="tableRow.title"
:to="classRoute(
'ReportsGroupReportLessonExerciseLearnerListPage',
{ exerciseId: tableRow.content_id }
)"
:icon="tableRow.kind"
/>
<KRouterLink
v-else
:text="tableRow.title"
:to="classRoute(
'ReportsGroupReportLessonResourceLearnerListPage',
{ resourceId: tableRow.content_id }
)"
:icon="tableRow.kind"
/>
</td>
<td>
<StatusSummary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
<h2>{{ coachString('lessonsAssignedLabel') }}</h2>
<ul class="list">
<li v-for="lesson in lessonsList" :key="lesson.id">
<KLabeledIcon icon="lesson">
<KRouterLink
:to="classRoute('ReportsGroupReportLessonPage', { lessonId: lesson.id })"
:text="lesson.title"
/>
</KLabeledIcon>
<KRouterLink
:to="classRoute('ReportsGroupReportLessonPage', { lessonId: lesson.id })"
:text="lesson.title"
icon="lesson"
/>
</li>
</ul>
<p v-if="lessonsList.length === 0">
Expand All @@ -36,12 +35,11 @@
<h2>{{ coachString('quizzesAssignedLabel') }}</h2>
<ul class="list">
<li v-for="exam in examsList" :key="exam.id">
<KLabeledIcon icon="quiz">
<KRouterLink
:to="classRoute('ReportsGroupReportQuizLearnerListPage', { quizId: exam.id })"
:text="exam.title"
/>
</KLabeledIcon>
<KRouterLink
:to="classRoute('ReportsGroupReportQuizLearnerListPage', { quizId: exam.id })"
:text="exam.title"
icon="quiz"
/>
</li>
</ul>
<p v-if="examsList.length === 0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,15 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in table" :key="tableRow.id">
<td>
<KLabeledIcon icon="person">
<KRouterLink
v-if="tableRow.statusObj.status !== STATUSES.notStarted"
:text="tableRow.name"
:to="detailLink(tableRow.id)"
/>
<template v-else>
{{ tableRow.name }}
</template>
</KLabeledIcon>
<KRouterLink
v-if="tableRow.statusObj.status !== STATUSES.notStarted"
:text="tableRow.name"
:to="detailLink(tableRow.id)"
icon="person"
/>
<template v-else>
{{ tableRow.name }}
</template>
</td>
<td>
<StatusSimple :status="tableRow.statusObj.status" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in table" :key="tableRow.question_id">
<td>
<KLabeledIcon icon="question">
<KRouterLink
:text="tableRow.title"
:to="questionLink(tableRow.question_id)"
/>
</KLabeledIcon>
<KRouterLink
:text="tableRow.title"
:to="questionLink(tableRow.question_id)"
icon="question"
/>
</td>
<td>
<LearnerProgressRatio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in table" :key="tableRow.id">
<td>
<KLabeledIcon icon="person">
<KRouterLink
:text="tableRow.name"
:to="classRoute('ReportsLearnerReportPage', { learnerId: tableRow.id })"
/>
</KLabeledIcon>
<KRouterLink
:text="tableRow.name"
:to="classRoute('ReportsLearnerReportPage', { learnerId: tableRow.id })"
icon="person"
/>
</td>
<td><TruncatedItemList :items="tableRow.groups" /></td>
<td><Score :value="tableRow.avgScore" /></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in lessonsTable" :key="tableRow.id">
<td>
<KLabeledIcon icon="lesson">
<KRouterLink
:to="classRoute('ReportsLearnerReportLessonPage', {
lessonId: tableRow.id
})"
:text="tableRow.title"
/>
</KLabeledIcon>
<KRouterLink
:to="classRoute('ReportsLearnerReportLessonPage', {
lessonId: tableRow.id
})"
:text="tableRow.title"
icon="lesson"
/>
</td>
<td>
<StatusSimple :status="tableRow.status" />
Expand All @@ -58,12 +57,11 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in examsTable" :key="tableRow.id">
<td>
<KLabeledIcon icon="quiz">
<KRouterLink
:to="quizLink(tableRow.id)"
:text="tableRow.title"
/>
</KLabeledIcon>
<KRouterLink
:to="quizLink(tableRow.id)"
:text="tableRow.title"
icon="quiz"
/>
</td>
<td>
<StatusSimple :status="tableRow.statusObj.status" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in table" :key="tableRow.id">
<td>
<KLabeledIcon icon="person">
<KRouterLink
:text="tableRow.name"
:to="classRoute('ReportsLessonLearnerPage', { learnerId: tableRow.id })"
/>
</KLabeledIcon>
<KRouterLink
:text="tableRow.name"
:to="classRoute('ReportsLessonLearnerPage', { learnerId: tableRow.id })"
icon="person"
/>
</td>
<td>
<StatusSimple :status="tableRow.status" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@
<transition-group tag="tbody" name="list">
<tr v-for="tableRow in table" :key="tableRow.id">
<td>
<KLabeledIcon icon="lesson">
<KRouterLink
:text="tableRow.title"
:to="classRoute('ReportsLessonReportPage', { lessonId: tableRow.id })"
/>
</KLabeledIcon>
<KRouterLink
:text="tableRow.title"
:to="classRoute('ReportsLessonReportPage', { lessonId: tableRow.id })"
icon="lesson"
/>
</td>
<td>
<StatusSummary
Expand Down
Loading

0 comments on commit 72a858a

Please sign in to comment.