mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-11 23:54:43 +08:00
Add move action to asset thumbnail [SCI-9210]
This commit is contained in:
parent
2868c8d720
commit
7af03bd651
1 changed files with 9 additions and 4 deletions
|
@ -58,8 +58,7 @@
|
||||||
>
|
>
|
||||||
<i class="sn-icon sn-icon-edit"></i>
|
<i class="sn-icon sn-icon-edit"></i>
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-light icon-btn thumbnail-action-btn" :title="i18n.t('attachments.thumbnail.buttons.move')">
|
<a class="btn btn-light icon-btn thumbnail-action-btn" @click.prevent.stop="showMoveModal" :title="i18n.t('attachments.thumbnail.buttons.move')">
|
||||||
<!-- TODO -->
|
|
||||||
<i class="sn-icon sn-icon-move"></i>
|
<i class="sn-icon sn-icon-move"></i>
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-light icon-btn thumbnail-action-btn"
|
<a class="btn btn-light icon-btn thumbnail-action-btn"
|
||||||
|
@ -88,6 +87,10 @@
|
||||||
@confirm="deleteAttachment"
|
@confirm="deleteAttachment"
|
||||||
@cancel="deleteModal = false"
|
@cancel="deleteModal = false"
|
||||||
/>
|
/>
|
||||||
|
<moveAssetModal v-if="movingAttachment"
|
||||||
|
:parent_type="attachment.attributes.parent_type"
|
||||||
|
:targets_url="attachment.attributes.urls.move_targets"
|
||||||
|
@confirm="moveAttachment($event)" @cancel="closeMoveModal"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
@ -97,11 +100,13 @@
|
||||||
import ContextMenuMixin from './mixins/context_menu.js'
|
import ContextMenuMixin from './mixins/context_menu.js'
|
||||||
import ContextMenu from './context_menu.vue'
|
import ContextMenu from './context_menu.vue'
|
||||||
import deleteAttachmentModal from './delete_modal.vue'
|
import deleteAttachmentModal from './delete_modal.vue'
|
||||||
|
import MoveAssetModal from '../modal/move.vue'
|
||||||
|
import MoveMixin from './mixins/move.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'thumbnailAttachment',
|
name: 'thumbnailAttachment',
|
||||||
mixins: [ContextMenuMixin, AttachmentMovedMixin],
|
mixins: [ContextMenuMixin, AttachmentMovedMixin, MoveMixin],
|
||||||
components: { ContextMenu, deleteAttachmentModal },
|
components: { ContextMenu, deleteAttachmentModal, MoveAssetModal},
|
||||||
props: {
|
props: {
|
||||||
attachment: {
|
attachment: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
Loading…
Add table
Reference in a new issue