2017-08-09 16:33:00 -04:00
|
|
|
<div id="image-manager" image-type="{{ $imageType }}" uploaded-to="{{ $uploaded_to or 0 }}">
|
|
|
|
<div overlay v-cloak>
|
|
|
|
<div class="popup-body" @click.stop="">
|
2016-08-30 15:05:59 -04:00
|
|
|
|
|
|
|
<div class="popup-header primary-background">
|
2016-12-31 09:27:40 -05:00
|
|
|
<div class="popup-title">{{ trans('components.image_select') }}</div>
|
2017-08-06 16:08:03 -04:00
|
|
|
<button class="overlay-close neg corner-button button">x</button>
|
2016-08-30 15:05:59 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex-fill image-manager-body">
|
|
|
|
|
|
|
|
<div class="image-manager-content">
|
2017-08-09 16:33:00 -04:00
|
|
|
<div v-if="imageType === 'gallery'" class="container">
|
2016-08-30 15:05:59 -04:00
|
|
|
<div class="image-manager-header row faded-small nav-tabs">
|
2018-02-17 14:49:00 -05:00
|
|
|
<div class="col-xs-4 tab-item" title="{{ trans('components.image_all_title') }}" :class="{selected: (view=='all')}" @click="setView('all')">@icon('images') {{ trans('components.image_all') }}</div>
|
|
|
|
<div class="col-xs-4 tab-item" title="{{ trans('components.image_book_title') }}" :class="{selected: (view=='book')}" @click="setView('book')">@icon('book', ['class' => 'text-book svg-icon']) {{ trans('entities.book') }}</div>
|
|
|
|
<div class="col-xs-4 tab-item" title="{{ trans('components.image_page_title') }}" :class="{selected: (view=='page')}" @click="setView('page')">@icon('page', ['class' => 'text-page svg-icon']) {{ trans('entities.page') }}</div>
|
2016-08-30 15:05:59 -04:00
|
|
|
</div>
|
2016-04-03 09:59:54 -04:00
|
|
|
</div>
|
2017-08-09 16:33:00 -04:00
|
|
|
<div v-show="view === 'all'" >
|
2018-02-04 12:18:55 -05:00
|
|
|
<form @submit.prevent="searchImages" class="contained-search-box">
|
2017-08-09 16:33:00 -04:00
|
|
|
<input placeholder="{{ trans('components.image_search_hint') }}" v-model="searchTerm">
|
2018-02-17 14:49:00 -05:00
|
|
|
<button :class="{active: searching}" title="{{ trans('common.search_clear') }}" type="button" @click="cancelSearch()" class="text-button cancel">@icon('close')</button>
|
2018-02-17 08:30:52 -05:00
|
|
|
<button title="{{ trans('common.search') }}" class="text-button">@icon('search')</button>
|
2016-08-30 15:05:59 -04:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="image-manager-list">
|
2017-08-09 16:33:00 -04:00
|
|
|
<div v-if="images.length > 0" v-for="(image, idx) in images">
|
|
|
|
<div class="image anim fadeIn" :style="{animationDelay: (idx > 26) ? '160ms' : ((idx * 25) + 'ms')}"
|
|
|
|
:class="{selected: (image==selectedImage)}" @click="imageSelect(image)">
|
|
|
|
<img :src="image.thumbs.gallery" :alt="image.title" :title="image.name">
|
2016-08-30 15:05:59 -04:00
|
|
|
<div class="image-meta">
|
2017-08-09 16:33:00 -04:00
|
|
|
<span class="name" v-text="image.name"></span>
|
2016-12-31 09:27:40 -05:00
|
|
|
<span class="date">{{ trans('components.image_uploaded', ['uploadedDate' => "{{ getDate(image.created_at) }" . "}"]) }}</span>
|
2016-08-30 15:05:59 -04:00
|
|
|
</div>
|
2016-02-07 05:14:11 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-09 16:33:00 -04:00
|
|
|
<div class="load-more" v-show="hasMore" @click="fetchData">{{ trans('components.image_load_more') }}</div>
|
2015-12-30 13:38:18 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-08-30 15:05:59 -04:00
|
|
|
<div class="image-manager-sidebar">
|
|
|
|
<div class="inner">
|
2015-12-30 13:38:18 -05:00
|
|
|
|
2017-08-09 16:33:00 -04:00
|
|
|
<div class="image-manager-details anim fadeIn" v-if="selectedImage">
|
2015-12-30 13:38:18 -05:00
|
|
|
|
2017-08-09 16:33:00 -04:00
|
|
|
<form @submit.prevent="saveImageDetails">
|
2016-08-30 15:05:59 -04:00
|
|
|
<div>
|
2017-08-09 16:33:00 -04:00
|
|
|
<a :href="selectedImage.url" target="_blank" style="display: block;">
|
|
|
|
<img :src="selectedImage.thumbs.gallery" :alt="selectedImage.title"
|
|
|
|
:title="selectedImage.name">
|
2016-08-30 15:05:59 -04:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2016-12-31 09:27:40 -05:00
|
|
|
<label for="name">{{ trans('components.image_image_name') }}</label>
|
2017-08-09 16:33:00 -04:00
|
|
|
<input id="name" name="name" v-model="selectedImage.name">
|
2016-08-30 15:05:59 -04:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
2017-08-09 16:33:00 -04:00
|
|
|
<div v-show="dependantPages">
|
2016-08-30 15:05:59 -04:00
|
|
|
<p class="text-neg text-small">
|
2016-12-31 09:27:40 -05:00
|
|
|
{{ trans('components.image_delete_confirm') }}
|
2016-08-30 15:05:59 -04:00
|
|
|
</p>
|
|
|
|
<ul class="text-neg">
|
2017-08-09 16:33:00 -04:00
|
|
|
<li v-for="page in dependantPages">
|
|
|
|
<a :href="page.url" target="_blank" class="text-neg" v-text="page.name"></a>
|
2016-08-30 15:05:59 -04:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearfix">
|
2017-08-09 16:33:00 -04:00
|
|
|
<form class="float left" @submit.prevent="deleteImage">
|
2018-02-17 08:30:52 -05:00
|
|
|
<button class="button icon neg">@icon('delete')</button>
|
2016-08-30 15:05:59 -04:00
|
|
|
</form>
|
2017-08-09 16:33:00 -04:00
|
|
|
<button class="button pos anim fadeIn float right" v-show="selectedImage" @click="callbackAndHide(selectedImage)">
|
2018-02-17 14:49:00 -05:00
|
|
|
{{ trans('components.image_select_image') }}
|
2016-08-30 15:05:59 -04:00
|
|
|
</button>
|
|
|
|
</div>
|
2015-12-30 13:38:18 -05:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2017-08-09 16:33:00 -04:00
|
|
|
<dropzone placeholder="{{ trans('components.image_dropzone') }}" :upload-url="uploadUrl" :uploaded-to="uploadedTo" @success="uploadSuccess"></dropzone>
|
2016-08-30 15:05:59 -04:00
|
|
|
|
|
|
|
</div>
|
2015-12-30 13:38:18 -05:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2016-08-30 15:05:59 -04:00
|
|
|
|
2015-12-30 13:38:18 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|