This commit is contained in:
2020-04-25 18:38:06 +00:00
parent baec93c439
commit 5bbc885448
2 changed files with 128 additions and 115 deletions

View File

@@ -14,134 +14,144 @@
</div> </div>
<template v-if="reveal"> <template v-if="reveal">
<!-- <span class="v-label v-label--active theme--light"> <div>
{{ $ay.t("Attachments") }} <template v-if="readonly">
</span> --> <!-- Note: this is just a copy of the inner part of read/write version below
<template v-if="readonly">
<!-- Note: this is just a copy of the inner part of read/write version below
with the action taken out --> with the action taken out -->
<div class="mt-4" :style="cardTextStyle()"> <div class="mt-4" :style="cardTextStyle()">
<v-list color="grey lighten-5" three-line> <v-list color="grey lighten-5" three-line>
<v-list-item <v-list-item
v-for="item in displayList" v-for="item in displayList"
:key="item.id" :key="item.id"
:href="item.url" :href="item.url"
target="_blank" target="_blank"
> >
<v-list-item-avatar> <v-list-item-avatar>
<v-icon v-text="item.icon"></v-icon> <v-icon v-text="item.icon"></v-icon>
</v-list-item-avatar> </v-list-item-avatar>
<v-list-item-content> <v-list-item-content>
<v-list-item-title v-text="item.name"></v-list-item-title> <v-list-item-title v-text="item.name"></v-list-item-title>
<v-list-item-subtitle v-text="item.date"></v-list-item-subtitle> <v-list-item-subtitle
v-text="item.date"
></v-list-item-subtitle>
<v-list-item-subtitle <v-list-item-subtitle
v-text="item.notes" v-text="item.notes"
></v-list-item-subtitle> ></v-list-item-subtitle>
</v-list-item-content> </v-list-item-content>
</v-list-item> </v-list-item>
</v-list> </v-list>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<v-tabs v-model="tab" color="primary"> <v-tabs v-model="tab" color="primary">
<v-tabs-slider></v-tabs-slider> <v-tabs-slider></v-tabs-slider>
<v-tab key="list"><v-icon>fa-folder</v-icon></v-tab> <v-tab key="list"><v-icon>fa-folder</v-icon></v-tab>
<v-tab key="attach"><v-icon>fa-paperclip</v-icon></v-tab> <v-tab key="attach"><v-icon>fa-paperclip</v-icon></v-tab>
<v-tabs-items v-model="tab"> <v-tabs-items v-model="tab">
<v-tab-item key="list"> <v-tab-item key="list">
<div class="mt-4" :style="cardTextStyle()"> <div class="mt-4" :style="cardTextStyle()">
<v-list color="grey lighten-5" three-line> <v-list color="grey lighten-5" three-line>
<v-list-item <v-list-item
v-for="item in displayList" v-for="item in displayList"
:key="item.id" :key="item.id"
:href="item.url" :href="item.url"
target="_blank" target="_blank"
> >
<v-list-item-avatar> <v-list-item-avatar>
<v-icon v-text="item.icon"></v-icon> <v-icon v-text="item.icon"></v-icon>
</v-list-item-avatar> </v-list-item-avatar>
<v-list-item-content> <v-list-item-content>
<v-list-item-title v-text="item.name"></v-list-item-title> <v-list-item-title
v-text="item.name"
></v-list-item-title>
<v-list-item-subtitle <v-list-item-subtitle
v-text="item.date" v-text="item.date"
></v-list-item-subtitle> ></v-list-item-subtitle>
<v-list-item-subtitle <v-list-item-subtitle
v-text="item.notes" v-text="item.notes"
></v-list-item-subtitle> ></v-list-item-subtitle>
</v-list-item-content> </v-list-item-content>
<v-list-item-action> <v-list-item-action>
<v-btn large @click="openEditMenu(item, $event)" icon> <v-btn large @click="openEditMenu(item, $event)" icon>
<v-icon>fa-edit</v-icon> <v-icon>fa-edit</v-icon>
</v-btn> </v-btn>
</v-list-item-action> </v-list-item-action>
</v-list-item> </v-list-item>
</v-list> </v-list>
</div> </div>
</v-tab-item> <v-btn depressed tile @click="revealedClicked" class="mt-8">
<v-tab-item key="attach"> {{ $ay.t("Attachments")
<div class="mt-8"> }}<v-icon
<v-file-input v-text="reveal ? 'fa-eye-slash' : 'fa-eye'"
v-model="uploadFiles" right
:label="$ay.t('AttachFile')" ></v-icon
prepend-icon="fa-paperclip" ></v-btn>
multiple </v-tab-item>
chips <v-tab-item key="attach">
></v-file-input> <div class="mt-8">
<v-file-input
v-model="uploadFiles"
:label="$ay.t('AttachFile')"
prepend-icon="fa-paperclip"
multiple
chips
></v-file-input>
<v-text-field
v-model="notes"
:label="$ay.t('AttachmentNotes')"
></v-text-field>
<v-btn color="primary" text @click="upload">{{
$ay.t("Upload")
}}</v-btn>
</div>
</v-tab-item>
</v-tabs-items>
</v-tabs>
<v-menu
min-width="360"
v-model="editMenu"
:close-on-content-click="false"
offset-y
:position-x="menuX"
:position-y="menuY"
absolute
>
<v-card>
<v-card-title>{{ $ay.t("FileAttachment") }}</v-card-title>
<div class="ma-6">
<v-text-field <v-text-field
v-model="notes" v-model="editName"
:label="$ay.t('AttachmentFileName')"
></v-text-field>
<v-text-field
v-model="editNotes"
:label="$ay.t('AttachmentNotes')" :label="$ay.t('AttachmentNotes')"
></v-text-field> ></v-text-field>
<v-btn color="primary" text @click="upload">{{
$ay.t("Upload")
}}</v-btn>
</div> </div>
</v-tab-item> <v-card-actions>
</v-tabs-items> <v-btn @click="remove()" text>
</v-tabs> {{ $ay.t("Delete") }}
<v-menu </v-btn>
min-width="360" <v-spacer></v-spacer>
v-model="editMenu" <v-btn text @click="editMenu = false">{{
:close-on-content-click="false" $ay.t("Cancel")
offset-y }}</v-btn>
:position-x="menuX" <v-btn color="primary" text @click="saveEdit">{{
:position-y="menuY" $ay.t("OK")
absolute }}</v-btn>
> </v-card-actions>
<v-card> </v-card>
<v-card-title>{{ $ay.t("FileAttachment") }}</v-card-title> </v-menu>
<div class="ma-6"> </template>
<v-text-field </div>
v-model="editName"
:label="$ay.t('AttachmentFileName')"
></v-text-field>
<v-text-field
v-model="editNotes"
:label="$ay.t('AttachmentNotes')"
></v-text-field>
</div>
<v-card-actions>
<v-btn @click="remove()" text>
{{ $ay.t("Delete") }}
</v-btn>
<v-spacer></v-spacer>
<v-btn text @click="editMenu = false">{{
$ay.t("Cancel")
}}</v-btn>
<v-btn color="primary" text @click="saveEdit">{{
$ay.t("OK")
}}</v-btn>
</v-card-actions>
</v-card>
</v-menu>
</template>
</template> </template>
</div> </div>
</template> </template>

View File

@@ -310,6 +310,9 @@
></div> ></div>
</v-col> </v-col>
</v-row> </v-row>
<v-btn depressed tile @click="toggleReveal">
Wiki<v-icon v-text="reveal ? 'fa-eye-slash' : 'fa-eye'" right></v-icon
></v-btn>
</v-sheet> </v-sheet>
</template> </template>
</div> </div>