Skip to content
Snippets Groups Projects
Commit dae03207 authored by Camille Blanchon's avatar Camille Blanchon
Browse files

Merge branch 'redmine-issues/19725' into 'develop'

REDMINE_ISSUE-19725 | Redirection vers la page de connexion du portail MRN si l'utilisateur n'est pas connecté

See merge request !839
parents d87f6cb6 ca8c5445
No related branches found
No related tags found
1 merge request!839REDMINE_ISSUE-19725 | Redirection vers la page de connexion du portail MRN si l'utilisateur n'est pas connecté
......@@ -203,6 +203,12 @@ const routes = [
component: () => import('../views/Catalog.vue')
},
{
path: '/attachment-preview/',
name: 'attachment-preview',
component: () => import('../views/AttachmentPreview.vue')
},
{ path: '/:pathMatch(.*)*', name: 'NotFound', component: () => import('../views/NotFound.vue') },
];
......
<template>
<div :class="['attachment-preview', { is_pdf }]">
<embed
v-if="is_pdf"
:src="src"
type="application/pdf"
>
<img
v-else
:src="src"
>
</div>
</template>
<script>
export default {
name: 'AttachmentPreview',
computed: {
src() {
return this.$route.query.file;
},
is_pdf() {
return this.src && this.src.includes('pdf');
}
},
};
</script>
<style lang="less">
.attachment-preview {
width: 100vw;
&.is_pdf {
padding: 0;
@media screen and (min-width: 726px) {
height: calc(100vh - 70px - 1em);
margin: .5em auto;
box-shadow: 1px 2px 10px grey;
}
@media screen and (max-width: 725px) {
height: calc(100vh - 110px);
margin: 0 auto;
}
}
> * {
height: 100%;
width: 100%;
}
}
</style>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment