2016-05-14 15:02:00 -04:00
|
|
|
|
|
|
|
<div toolbox class="floating-toolbox">
|
2016-05-15 15:12:53 -04:00
|
|
|
|
2016-05-13 16:20:21 -04:00
|
|
|
<div class="tabs primary-background-light">
|
2016-05-14 15:02:00 -04:00
|
|
|
<span toolbox-toggle><i class="zmdi zmdi-caret-left-circle"></i></span>
|
2016-12-03 13:35:40 -05:00
|
|
|
<span toolbox-tab-button="tags" title="{{ trans('entities.page_tags') }}" class="active"><i class="zmdi zmdi-tag"></i></span>
|
2016-11-12 09:12:26 -05:00
|
|
|
@if(userCan('attachment-create-all'))
|
2016-12-03 13:35:40 -05:00
|
|
|
<span toolbox-tab-button="files" title="{{ trans('entities.attachments') }}"><i class="zmdi zmdi-attachment"></i></span>
|
2016-10-11 15:39:11 -04:00
|
|
|
@endif
|
2016-05-13 16:20:21 -04:00
|
|
|
</div>
|
2016-05-15 15:12:53 -04:00
|
|
|
|
2017-08-10 15:11:25 -04:00
|
|
|
<div toolbox-tab-content="tags" id="tag-manager" page-id="{{ $page->id or 0 }}">
|
2016-12-03 13:35:40 -05:00
|
|
|
<h4>{{ trans('entities.page_tags') }}</h4>
|
2016-05-15 05:39:17 -04:00
|
|
|
<div class="padded tags">
|
2016-12-03 13:35:40 -05:00
|
|
|
<p class="muted small">{!! nl2br(e(trans('entities.tags_explain'))) !!}</p>
|
2017-08-10 15:11:25 -04:00
|
|
|
|
|
|
|
<draggable class="fake-table no-style tag-table" :options="{handle: '.handle'}" :list="tags" element="div" style="width: 100%;">
|
|
|
|
<transition-group name="test" tag="div">
|
|
|
|
<div v-for="(tag, i) in tags" :key="tag.key">
|
|
|
|
<div width="20" class="handle" ><i class="zmdi zmdi-menu"></i></div>
|
|
|
|
<div><input autosuggest="{{ baseUrl('/ajax/tags/suggest/names') }}" autosuggest-type="name" class="outline" :name="tags[i].name"
|
|
|
|
v-model="tag.name" @change="tagChange(tag)" @blur="tagBlur(tag)" placeholder="{{ trans('entities.tag') }}"></div>
|
|
|
|
<div><input autosuggest="{{ baseUrl('/ajax/tags/suggest/values') }}" autosuggest-type="value" class="outline" :name="tags[i].value"
|
|
|
|
v-model="tag.value" @change="tagChange(tag)" @blur="tagBlur(tag)" placeholder="{{ trans('entities.tag_value') }}"></div>
|
|
|
|
<div width="10" v-show="tags.length !== 1" class="text-center text-neg" style="padding: 0;" @click="removeTag(tag)"><i class="zmdi zmdi-close"></i></div>
|
|
|
|
</div>
|
|
|
|
</transition-group>
|
|
|
|
</draggable>
|
|
|
|
|
2016-05-15 05:39:17 -04:00
|
|
|
<table class="no-style" style="width: 100%;">
|
|
|
|
<tbody>
|
|
|
|
<tr class="unsortable">
|
2017-08-10 15:11:25 -04:00
|
|
|
<td width="34"></td>
|
|
|
|
<td @click="addEmptyTag">
|
2016-12-03 13:35:40 -05:00
|
|
|
<button type="button" class="text-button">{{ trans('entities.tags_add') }}</button>
|
2016-05-15 05:39:17 -04:00
|
|
|
</td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-08-10 15:11:25 -04:00
|
|
|
|
2016-05-15 05:39:17 -04:00
|
|
|
</div>
|
2016-05-13 16:20:21 -04:00
|
|
|
</div>
|
2016-05-15 15:12:53 -04:00
|
|
|
|
2016-11-12 09:12:26 -05:00
|
|
|
@if(userCan('attachment-create-all'))
|
2016-10-23 12:55:48 -04:00
|
|
|
<div toolbox-tab-content="files" ng-controller="PageAttachmentController" page-id="{{ $page->id or 0 }}">
|
2016-12-03 13:35:40 -05:00
|
|
|
<h4>{{ trans('entities.attachments') }}</h4>
|
2016-10-11 15:39:11 -04:00
|
|
|
<div class="padded files">
|
2016-10-09 13:58:22 -04:00
|
|
|
|
2016-10-11 15:39:11 -04:00
|
|
|
<div id="file-list" ng-show="!editFile">
|
2016-12-03 13:35:40 -05:00
|
|
|
<p class="muted small">{{ trans('entities.attachments_explain') }} <span class="secondary">{{ trans('entities.attachments_explain_instant_save') }}</span></p>
|
2016-10-10 16:13:18 -04:00
|
|
|
|
2016-10-23 12:55:48 -04:00
|
|
|
<div tab-container>
|
|
|
|
<div class="nav-tabs">
|
2016-12-03 13:35:40 -05:00
|
|
|
<div tab-button="list" class="tab-item">{{ trans('entities.attachments_items') }}</div>
|
|
|
|
<div tab-button="file" class="tab-item">{{ trans('entities.attachments_upload') }}</div>
|
|
|
|
<div tab-button="link" class="tab-item">{{ trans('entities.attachments_link') }}</div>
|
2016-10-23 12:55:48 -04:00
|
|
|
</div>
|
|
|
|
<div tab-content="list">
|
|
|
|
<table class="file-table" style="width: 100%;">
|
|
|
|
<tbody ui-sortable="sortOptions" ng-model="files" >
|
|
|
|
<tr ng-repeat="file in files track by $index">
|
|
|
|
<td width="20" ><i class="handle zmdi zmdi-menu"></i></td>
|
|
|
|
<td>
|
|
|
|
<a ng-href="@{{getFileUrl(file)}}" target="_blank" ng-bind="file.name"></a>
|
|
|
|
<div ng-if="file.deleting">
|
2016-12-03 13:35:40 -05:00
|
|
|
<span class="neg small">{{ trans('entities.attachments_delete_confirm') }}</span>
|
2016-10-23 12:55:48 -04:00
|
|
|
<br>
|
2016-12-03 13:35:40 -05:00
|
|
|
<span class="text-primary small" ng-click="file.deleting=false;">{{ trans('common.cancel') }}</span>
|
2016-10-23 12:55:48 -04:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td width="10" ng-click="startEdit(file)" class="text-center text-primary" style="padding: 0;"><i class="zmdi zmdi-edit"></i></td>
|
|
|
|
<td width="5"></td>
|
|
|
|
<td width="10" ng-click="deleteFile(file)" class="text-center text-neg" style="padding: 0;"><i class="zmdi zmdi-close"></i></td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<p class="small muted" ng-if="files.length == 0">
|
2016-12-03 13:35:40 -05:00
|
|
|
{{ trans('entities.attachments_no_files') }}
|
2016-10-23 12:55:48 -04:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div tab-content="file">
|
2016-12-24 10:21:19 -05:00
|
|
|
<drop-zone message="{{ trans('entities.attachments_dropzone') }}" upload-url="@{{getUploadUrl()}}" uploaded-to="@{{uploadedTo}}" event-success="uploadSuccess"></drop-zone>
|
2016-10-23 12:55:48 -04:00
|
|
|
</div>
|
|
|
|
<div tab-content="link" sub-form="attachLinkSubmit(file)">
|
2016-12-03 13:35:40 -05:00
|
|
|
<p class="muted small">{{ trans('entities.attachments_explain_link') }}</p>
|
2016-10-23 12:55:48 -04:00
|
|
|
<div class="form-group">
|
2016-12-03 13:35:40 -05:00
|
|
|
<label for="attachment-via-link">{{ trans('entities.attachments_link_name') }}</label>
|
|
|
|
<input type="text" placeholder="{{ trans('entities.attachments_link_name') }}" ng-model="file.name">
|
2016-10-23 12:55:48 -04:00
|
|
|
<p class="small neg" ng-repeat="error in errors.link.name" ng-bind="error"></p>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2016-12-03 13:35:40 -05:00
|
|
|
<label for="attachment-via-link">{{ trans('entities.attachments_link_url') }}</label>
|
|
|
|
<input type="text" placeholder="{{ trans('entities.attachments_link_url_hint') }}" ng-model="file.link">
|
2016-10-23 12:55:48 -04:00
|
|
|
<p class="small neg" ng-repeat="error in errors.link.link" ng-bind="error"></p>
|
|
|
|
</div>
|
2016-12-03 13:35:40 -05:00
|
|
|
<button type="submit" class="button pos">{{ trans('entities.attach') }}</button>
|
2016-10-10 16:13:18 -04:00
|
|
|
|
2016-10-23 12:55:48 -04:00
|
|
|
</div>
|
2016-10-11 15:39:11 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2016-10-23 12:55:48 -04:00
|
|
|
<div id="file-edit" ng-if="editFile" sub-form="updateFile(editFile)">
|
2016-12-03 13:35:40 -05:00
|
|
|
<h5>{{ trans('entities.attachments_edit_file') }}</h5>
|
2016-10-23 12:55:48 -04:00
|
|
|
|
2016-10-11 15:39:11 -04:00
|
|
|
<div class="form-group">
|
2016-12-03 13:35:40 -05:00
|
|
|
<label for="attachment-name-edit">{{ trans('entities.attachments_edit_file_name') }}</label>
|
|
|
|
<input type="text" id="attachment-name-edit" placeholder="{{ trans('entities.attachments_edit_file_name') }}" ng-model="editFile.name">
|
2016-10-23 12:55:48 -04:00
|
|
|
<p class="small neg" ng-repeat="error in errors.edit.name" ng-bind="error"></p>
|
2016-10-11 15:39:11 -04:00
|
|
|
</div>
|
2016-10-23 12:55:48 -04:00
|
|
|
|
|
|
|
<div tab-container="@{{ editFile.external ? 'link' : 'file' }}">
|
|
|
|
<div class="nav-tabs">
|
2016-12-03 13:35:40 -05:00
|
|
|
<div tab-button="file" class="tab-item">{{ trans('entities.attachments_upload') }}</div>
|
|
|
|
<div tab-button="link" class="tab-item">{{ trans('entities.attachments_set_link') }}</div>
|
2016-10-23 12:55:48 -04:00
|
|
|
</div>
|
|
|
|
<div tab-content="file">
|
2016-12-03 13:35:40 -05:00
|
|
|
<drop-zone upload-url="@{{getUploadUrl(editFile)}}" uploaded-to="@{{uploadedTo}}" placeholder="{{ trans('entities.attachments_edit_drop_upload') }}" event-success="uploadSuccessUpdate"></drop-zone>
|
2016-10-23 12:55:48 -04:00
|
|
|
<br>
|
|
|
|
</div>
|
|
|
|
<div tab-content="link">
|
|
|
|
<div class="form-group">
|
2016-12-03 13:35:40 -05:00
|
|
|
<label for="attachment-link-edit">{{ trans('entities.attachments_link_url') }}</label>
|
|
|
|
<input type="text" id="attachment-link-edit" placeholder="{{ trans('entities.attachment_link') }}" ng-model="editFile.link">
|
2016-10-23 12:55:48 -04:00
|
|
|
<p class="small neg" ng-repeat="error in errors.edit.link" ng-bind="error"></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-10-11 15:39:11 -04:00
|
|
|
</div>
|
|
|
|
|
2016-12-24 10:21:19 -05:00
|
|
|
<button type="button" class="button" ng-click="cancelEdit()">{{ trans('common.back') }}</button>
|
|
|
|
<button type="submit" class="button pos">{{ trans('common.save') }}</button>
|
2016-10-11 15:39:11 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2016-10-09 13:58:22 -04:00
|
|
|
</div>
|
2016-10-11 15:39:11 -04:00
|
|
|
@endif
|
2016-10-09 13:58:22 -04:00
|
|
|
|
2016-05-13 16:20:21 -04:00
|
|
|
</div>
|