Skip to content

Commit f6a39cb

Browse files
akhanfirexo-swf
authored andcommitted
Fix: Remove the access to go back in program detail page - MEED-9582 - Meeds-io/meeds#3419 (#1958) (#1959)
Before this change, from a program detail page, it was possible to go back to the list using a button (arrow-left + program name are clickable), Program detail page can be accessed using the drawer and it is no more use to go back to the programs list, URL changes but it doesn't work. To fix this problem, remove the arrow-left button and change replaceState to pushState for browser history. After this change, the arrow-left and the click to the program name are deleted and the user can close the drawer or go back using the browser options. Resolves Meeds-io/meeds#3419
1 parent 717f53f commit f6a39cb

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

portlets/src/main/webapp/vue-app/commons/components/program/Programs.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ export default {
6666
watch: {
6767
displayProgramDetail() {
6868
if (this.displayProgramDetail && this.program?.id) {
69-
window.history.replaceState('programs', this.$t('engagementCenter.label.programs'), `${this.programsLinkBasePath}/${this.program.id}`);
69+
window.history.pushState('programs', this.$t('engagementCenter.label.programs'), `${this.programsLinkBasePath}/${this.program.id}`);
7070
} else {
71-
window.history.replaceState('programs', this.$t('engagementCenter.label.programs'), `${this.programsLinkBasePath}`);
71+
window.history.pushState('programs', this.$t('engagementCenter.label.programs'), `${this.programsLinkBasePath}`);
7272
}
7373
},
7474
},

portlets/src/main/webapp/vue-app/commons/components/program/detail/ProgramDetail.vue

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,11 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1818
<div id="engagementCenterProgramDetail" class="px-4">
1919
<div v-if="!isDeleted">
2020
<div class="py-2 py-sm-5 d-flex align-center">
21-
<v-tooltip :disabled="$root.isMobile" bottom>
22-
<template #activator="{ on }">
23-
<v-card
24-
class="d-flex align-center"
25-
flat
26-
v-on="on"
27-
@click="backToProgramList">
28-
<v-btn
29-
class="width-auto ms-n3"
30-
icon>
31-
<v-icon size="18" class="icon-default-color mx-2">fa-arrow-left</v-icon>
32-
</v-btn>
33-
<div class="text-header-title"> {{ programTitle }}</div>
34-
</v-card>
35-
</template>
36-
<span>{{ $t('programs.details.label.BackToList') }}</span>
37-
</v-tooltip>
21+
<v-card
22+
class="d-flex align-center"
23+
flat>
24+
<div class="text-header-title"> {{ programTitle }}</div>
25+
</v-card>
3826
<v-spacer />
3927
<span class="text-header-title d-none d-sm-block" v-sanitized-html="$t('programs.budget', $t(programBudgetLabel))"></span>
4028
</div>

0 commit comments

Comments
 (0)