Skip to content

Commit

Permalink
pkp/pkp-lib#9253 Add site-level announcements (#283)
Browse files Browse the repository at this point in the history
* pkp/pkp-lib#9253 Add site-level announcements

* pkp/pkp-lib#9253 Use URL in announcement properties
  • Loading branch information
NateWr authored Nov 8, 2023
1 parent 5b30b6e commit 6f2b5cf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
14 changes: 14 additions & 0 deletions src/components/Container/AdminPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,29 @@ import Page from '@/components/Container/Page.vue';
import HighlightsListPanel from '../ListPanel/highlights/HighlightsListPanel.vue';
import ThemeForm from '@/components/Form/context/ThemeForm.vue';
import ActionPanel from '../ActionPanel/ActionPanel.vue';
import AnnouncementsListPanel from '../ListPanel/announcements/AnnouncementsListPanel.vue';
export default {
extends: Page,
name: 'AdminPage',
components: {
ActionPanel,
HighlightsListPanel,
AnnouncementsListPanel,
ThemeForm,
},
data() {
return {
announcementsEnabled: false,
};
},
mounted() {
pkp.eventBus.$on('form-success', (formId, site) => {
if (formId === pkp.const.FORM_ANNOUNCEMENT_SETTINGS) {
this.announcementsEnabled = !!site.enableAnnouncements;
}
});
},
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{{ localize(item.title) }}
</template>
<template v-slot:item-actions="{item}">
<pkp-button element="a" :href="urlBase.replace('__id__', item.id)">
<pkp-button element="a" :href="item.url">
{{ __('common.view') }}
</pkp-button>
<pkp-button @click="openEditModal(item.id)">
Expand Down Expand Up @@ -117,10 +117,6 @@ export default {
type: String,
required: true,
},
urlBase: {
type: String,
required: true,
},
},
data() {
return {
Expand Down

0 comments on commit 6f2b5cf

Please sign in to comment.