Skip to content

Commit

Permalink
feat: Add Sisu link for admins to the CUR page. refs: #1073
Browse files Browse the repository at this point in the history
  • Loading branch information
HRemonen committed Oct 10, 2023
1 parent aa9002d commit 4a96ede
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
"adminGraylog": "-",
"courseUnitPage": "-",
"courseUnitPageStudent": "-",
"courseRealisationPage": "-"
"courseRealisationPage": "-",
"courseSisuPage": "https://sisu.helsinki.fi/teacher/role/staff/teaching/course-unit-realisations/view/{{sisuId}}/information/basicinfo"
},
"userFeedbacks": {
"mainHeading": "My feedback",
Expand Down Expand Up @@ -465,6 +466,7 @@
"feedbackPeriod": "Feedback open",
"coursePage": "Course page",
"courseSummary": "Summary of course's instances",
"courseSisuPage": "Course Sisu page",
"teachers": "Teachers",
"responsibleTeachers": "Responsible teachers",
"administrativePersons": "Administrative persons",
Expand Down
4 changes: 3 additions & 1 deletion public/locales/fi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
"adminGraylog": "-",
"courseUnitPage": "-",
"courseUnitPageStudent": "-",
"courseRealisationPage": "-"
"courseRealisationPage": "-",
"courseSisuPage": "https://sisu.helsinki.fi/teacher/role/staff/teaching/course-unit-realisations/view/{{sisuId}}/information/basicinfo"
},
"userFeedbacks": {
"mainHeading": "Kurssipalautteeni",
Expand Down Expand Up @@ -464,6 +465,7 @@
"feedbackPeriod": "Palaute käynnissä",
"coursePage": "Kurssisivu",
"courseSummary": "Kurssin toteutusten yhteenveto",
"courseSisuPage": "Kurssin Sisu sivu",
"teachers": "Opettajat",
"responsibleTeachers": "Vastuuopettajat",
"administrativePersons": "Hallintohenkilöt",
Expand Down
4 changes: 3 additions & 1 deletion public/locales/sv/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
"markdownHelp": "https://commonmark.org/help/",
"adminGraylog": "",
"courseUnitPage": "",
"courseRealisationPage": ""
"courseRealisationPage": "",
"courseSisuPage": "https://sisu.helsinki.fi/teacher/role/staff/teaching/course-unit-realisations/view/{{sisuId}}/information/basicinfo"
},
"userFeedbacks": {
"mainHeading": "Mina responser",
Expand Down Expand Up @@ -463,6 +464,7 @@
"editFeedbackTab": "Redigera responsen",
"coursePage": "Kurssida",
"courseSummary": "Sammandrag av kursens genomföranden",
"courseSisuPage": "Course Sisu page",
"teachers": "Lärare",
"responsibleTeachers": "Ansvariga lärare",
"administrativePersons": "Administrativ person",
Expand Down
5 changes: 4 additions & 1 deletion src/client/pages/FeedbackTarget/FeedbackTargetInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { TagChip } from '../../components/common/TagChip'
import TeacherList from './TeacherList/TeacherList'

const FeedbackTargetInformation = () => {
const { feedbackTarget, organisation, isStudent, isTeacher } = useFeedbackTargetContext()
const { feedbackTarget, organisation, isStudent, isTeacher, isAdmin } = useFeedbackTargetContext()
const { i18n, t } = useTranslation()
const { enqueueSnackbar } = useSnackbar()

Expand Down Expand Up @@ -44,6 +44,7 @@ const FeedbackTargetInformation = () => {
const courseRealisationName = getLanguageValue(courseRealisation?.name, i18n.language)
const visibleCourseCode = courseRealisationName.indexOf(courseUnit?.courseCode) > -1 ? '' : courseUnit?.courseCode
const coursePageUrl = `${t('links:courseRealisationPage')}${courseRealisation.id}`
const sisuPageUrl = `${t('links:courseSisuPage', { sisuId: courseRealisation.id })}`
const courseSummaryPath = getCourseUnitSummaryPath(feedbackTarget)
const showTags = feedbackTarget?.tags?.length > 0
const courseUnitName = getLanguageValue(courseUnit?.name, i18n.language)
Expand Down Expand Up @@ -163,6 +164,8 @@ const FeedbackTargetInformation = () => {
<LinkButton to={coursePageUrl} title={t('feedbackTargetView:coursePage')} external />

{isTeacher && <LinkButton to={t('links:wikiTeacherHelp')} title={t('footer:wikiLink')} external />}

{isAdmin && <LinkButton to={sisuPageUrl} title={t('feedbackTargetView:courseSisuPage')} external />}
</Box>
</Box>
</Box>
Expand Down

0 comments on commit 4a96ede

Please sign in to comment.