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

Made description dynamic on related resources #4729

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 15 additions & 5 deletions src/components/NcRelatedResourcesPanel/NcRelatedResourcesPanel.vue
Expand Up @@ -28,7 +28,7 @@ Use this component to display the related resources of a given item.
```
<template>
<NcRelatedResourcesPanel provider-id="talk"
header="Related resources for talk"
header="Related resources for talk"
:item-id="conversationId" />
</template>

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

<NcResource v-for="resource in resources"
Expand Down Expand Up @@ -120,6 +120,17 @@ export default {
type: String,
default: t('Related resources'),
},
description: {
type: String,
default: t('Anything shared with the same group of people will show up here'),
},
/**
* If this element is used on a primary element set to true for primary styling.
*/
primary: {
type: Boolean,
default: false,
},
},
emits: [
Expand All @@ -143,12 +154,11 @@ export default {
}
return this.error ?? this.resources.length > 0
},
description() {
subline() {
if (this.error) {
return t('Error getting related resources. Please contact your system administrator if you have any questions.')
}
return t('Anything shared with the same group of people will show up here')
return this.description
},
hasResourceInfo() {
Expand Down