Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add header prop to NcRelatedResourcesPanel #4703

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/components/NcRelatedResourcesPanel/NcRelatedResourcesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Use this component to display the related resources of a given item.
```
<template>
<NcRelatedResourcesPanel provider-id="talk"
:header="t('Related resources')"
:item-id="conversationId" />
</template>

Expand All @@ -46,7 +47,7 @@ export default {
<template>
<div v-if="appEnabled && isVisible" class="related-resources">
<div class="related-resources__header">
<h5>{{ headerTranslated }}</h5>
<h5>{{ header }}</h5>
<p>{{ description }}</p>
</div>

Expand Down Expand Up @@ -112,6 +113,14 @@ export default {
type: Object,
default: null,
},
/**
* Make the header name dynamic
*/
header: {
type: String,
default: t('Related resources'),

},
},

emits: [
Expand All @@ -122,7 +131,6 @@ export default {
data() {
return {
appEnabled: OC?.appswebroots?.related_resources !== undefined,
headerTranslated: t('Related resources'),
loading: false,
error: null,
resources: [],
Expand Down
Loading