Documents: Fix URL, minor UI changes

pull/3890/head
Julio Montoya 4 years ago
parent 0d5862cf31
commit aee3db7d2a
  1. 10
      assets/vue/components/documents/FormNewDocument.vue
  2. 2
      assets/vue/components/layout/DashboardLayout.vue
  3. 8
      assets/vue/views/documents/List.vue

@ -67,7 +67,7 @@ import useVuelidate from '@vuelidate/core';
import { required } from '@vuelidate/validators';
//import UploadAdapter from './UploadAdapter';
import Editor from '../Editor'
import {useRouter} from "vue-router";
import { useRouter, useRoute } from 'vue-router'
export default {
name: 'DocumentsForm',
@ -133,7 +133,13 @@ export default {
},
methods: {
browser (callback, value, meta) {
let url = '/resources/document/4/manager?cid=1&sid=0&gid=0';
//const route = useRoute();
let nodeId = this.$route.params['node'];
let folderParams = this.$route.query;
let url = this.$router.resolve({ name: 'DocumentManager', params: { id: nodeId }, query: folderParams })
url = url.fullPath;
console.log(url);
if (meta.filetype === 'image') {
url = url + "&type=images";
} else {

@ -113,7 +113,7 @@
bordered
content-class="bg-white"
:width="280"
:breakpoint="500"
:breakpoint="850"
>
<q-scroll-area class="fit">
<q-list v-if="isAuthenticated" padding class="text-grey-8">

@ -89,7 +89,7 @@
<!-- </q-table>-->
<!-- </div>-->
<Toolbar class="p-mb-4">
<Toolbar class="pb-4">
<template #left>
<div v-if="isAuthenticated && isCurrentTeacher" class="flex flex-row gap-2" >
<!-- <Button label="New" icon="pi pi-plus" class="p-button-primary p-button-sm p-mr-2" @click="openNew" />-->
@ -189,9 +189,9 @@
<Column :exportable="false">
<template #body="slotProps">
<div class="flex flex-row gap-2">
<Button label="Show" class="p-button-sm p-button p-mr-2" @click="showHandler(slotProps.data)" />
<Button v-if="isAuthenticated && isCurrentTeacher" label="Edit" icon="pi pi-pencil" class="p-button-sm p-button p-mr-2" @click="editHandler(slotProps.data)" />
<Button v-if="isAuthenticated && isCurrentTeacher" label="Delete" icon="pi pi-trash" class="p-button-sm p-button p-button-danger" @click="confirmDeleteItem(slotProps.data)" />
<Button label="Show" class="btn btn-primary p-mr-2" @click="showHandler(slotProps.data)" />
<Button v-if="isAuthenticated && isCurrentTeacher" label="Edit" icon="pi pi-pencil" class="btn btn-primary p-mr-2" @click="editHandler(slotProps.data)" />
<Button v-if="isAuthenticated && isCurrentTeacher" label="Delete" icon="pi pi-trash" class="btn btn-danger" @click="confirmDeleteItem(slotProps.data)" />
</div>
</template>
</Column>

Loading…
Cancel
Save