Skip to content

Commit

Permalink
pkp/pkp-lib#9253 Add site-level announcements (main) (#284)
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

* pkp/pkp-lib#9253 Fix AnnouncementsListPanel after rebase
  • Loading branch information
NateWr authored Nov 8, 2023
1 parent 127e23c commit d1d7930
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 @@ -21,7 +21,7 @@
{{ localize(item.title) }}
</template>
<template #item-actions="{item}">
<pkp-button element="a" :href="urlBase.replace('__id__', item.id)">
<pkp-button element="a" :href="item.url">
{{ t('common.view') }}
</pkp-button>
<pkp-button @click="openEditModal(item.id)">
Expand Down Expand Up @@ -121,10 +121,6 @@ export default {
type: String,
required: true,
},
urlBase: {
type: String,
required: true,
},
},
data() {
return {
Expand Down

0 comments on commit d1d7930

Please sign in to comment.