Inital commit
This commit is contained in:
@@ -15,8 +15,10 @@
|
||||
|
||||
{include file="includes/folder-breadcrumb.html" }
|
||||
|
||||
{hook name="folder-edit.top" folder_id=$folder_id}
|
||||
|
||||
<div class="row">
|
||||
{loop name="folder_edit" type="folder" visible="*" id="{$folder_id}" backend_context="1" lang="$edit_language_id"}
|
||||
{loop name="folder_edit" type="folder" visible="*" id="{$folder_id}" backend_context="1" lang="$edit_language_id" with_prev_next_info="true"}
|
||||
|
||||
{* Define close url *}
|
||||
{assign var='close_url' value="{url path='/admin/folders' folder_id=$ID}"}
|
||||
@@ -28,20 +30,49 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 actions">
|
||||
<a {if $HAS_PREVIOUS != 0}href="{url path="/admin/folders/update/$PREVIOUS"}"{else}disabled="disabled"{/if} class="btn btn-default" title="{intl l='Edit previous folder'}"><span class="glyphicon glyphicon-arrow-left"></span></a>
|
||||
<a href="{$URL}" target="_blank" class="btn btn-default" title="{intl l='Preview folder page'}"><span class="glyphicon glyphicon-eye-open"></span></a>
|
||||
<a {if $HAS_NEXT != 0}href="{url path="/admin/folders/update/$NEXT"}"{else}disabled="disabled"{/if} class="btn btn-default" title="{intl l='Edit next folder'}"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
<a {if $HAS_PREVIOUS != 0}href="{url path="/admin/folders/update/%previous" previous=$PREVIOUS}"{else}disabled="disabled"{/if} class="btn btn-default" title="{intl l='Edit previous folder'}"><span class="glyphicon glyphicon-arrow-left"></span></a>
|
||||
<a href="{$URL nofilter}" target="_blank" class="btn btn-default" title="{intl l='Preview folder page'}"><span class="glyphicon glyphicon-eye-open"></span></a>
|
||||
<a {if $HAS_NEXT != 0}href="{url path="/admin/folders/update/%next" next=$NEXT}"{else}disabled="disabled"{/if} class="btn btn-default" title="{intl l='Edit next folder'}"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
{hookblock name="folder.tab" id="{$folder_id}" fields="id,title,href,content"}
|
||||
|
||||
{capture "folder_tab_tab"}
|
||||
{forhook rel="folder.tab"}
|
||||
<li>
|
||||
<a href="#{$id}"
|
||||
{if $href}data-href="{$href}"{/if}
|
||||
data-toggle="tab">{$title}
|
||||
</a>
|
||||
</li>
|
||||
{/forhook}
|
||||
{/capture}
|
||||
|
||||
{capture "folder_tab_content"}
|
||||
{forhook rel="folder.tab"}
|
||||
<div class="tab-pane fade" id="{$id}">
|
||||
{if $href}
|
||||
{* ajax *}
|
||||
<div class="text-center"><span class="loading">{intl l="Please wait, loading"}</span></div>
|
||||
{else}
|
||||
{$content nofilter}
|
||||
{/if}
|
||||
</div>
|
||||
{/forhook}
|
||||
{/capture}
|
||||
|
||||
{/hookblock}
|
||||
|
||||
<ul class="nav nav-tabs" id="tabbed-menu">
|
||||
<li class="active"><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
|
||||
<li><a href="#seo" data-toggle="tab">{intl l="SEO"}</a></li>
|
||||
<li><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
|
||||
<li><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
|
||||
{$smarty.capture.folder_tab_tab nofilter}
|
||||
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -52,7 +83,7 @@
|
||||
<div class="form-container">
|
||||
|
||||
{form name="thelia.admin.folder.modification"}
|
||||
<form method="POST" action="{url path='/admin/folders/save'}" {form_enctype form=$form} class="clearfix">
|
||||
<form method="POST" action="{url path='/admin/folders/save'}" {form_enctype} class="clearfix">
|
||||
|
||||
{include file="includes/inner-form-toolbar.html" close_url=$close_url}
|
||||
|
||||
@@ -60,13 +91,13 @@
|
||||
<input type="hidden" name="folder_id" value="{$folder_id}" />
|
||||
<input type="hidden" name="current_tab" value="general" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
{form_hidden_fields}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/admin/folders/update/{$ID}"}" />
|
||||
{form_field field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/admin/folders/update/%id" id=$ID}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
{form_field field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$value}" />
|
||||
{/form_field}
|
||||
|
||||
@@ -79,8 +110,9 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{hook name="folder.modification.form-right.top" folder_id=$folder_id}
|
||||
|
||||
{form_field form=$form field='parent'}
|
||||
{form_field field='parent'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
|
||||
<label for="{$label_attr.for}" class="control-label">
|
||||
@@ -89,17 +121,19 @@
|
||||
|
||||
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">
|
||||
<option value="0">{intl l="Top level"}</option>
|
||||
|
||||
{$excludeFolders = []}
|
||||
{loop name="exclude-folders" type="folder" parent=$folder_id}
|
||||
{$excludeFolders[] = $ID}
|
||||
{/loop}
|
||||
{$myparent=$PARENT}
|
||||
{loop name="fold-parent" type="folder-tree" visible="*" folder="0"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $myparent == $ID}selected="selected"{/if} {if $folder_id == $ID}disabled="disabled"{/if}>{$TITLE}</option>
|
||||
{loop name="fold-parent" type="folder-tree" visible="*" folder="0" exclude={','|implode:$excludeFolders}}
|
||||
<option value="{$ID}" {if $myparent == $ID}selected="selected"{/if} {if $folder_id == $ID}disabled="disabled"{/if}>{option_offset l=$LEVEL+1 label={$TITLE}}</option>
|
||||
{/loop}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='visible'}
|
||||
{form_field field='visible'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l='Visibility'}</label>
|
||||
<div class="checkbox">
|
||||
@@ -110,6 +144,8 @@
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{hook name="folder.modification.form-right.bottom" folder_id=$folder_id}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -127,24 +163,26 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="seo">
|
||||
{form name="thelia.admin.seo"}
|
||||
{include file="includes/seo-tab.html"
|
||||
form = $form
|
||||
formAction = "{url path='/admin/folders/seo/save'}"
|
||||
closeUrl = $close_url
|
||||
current_id = $folder_id
|
||||
}
|
||||
{/form}
|
||||
{include file="includes/seo-tab.html"
|
||||
formAction = "{url path='/admin/folders/seo/save'}"
|
||||
pageUrl = "{url path='/admin/folders/update'}/$folder_id"
|
||||
closeUrl = $close_url
|
||||
success_url = $close_url
|
||||
current_id = $folder_id
|
||||
seoType = 'folder'
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="images">
|
||||
{include file='includes/image-upload-form.html' imageType='folder' parentId=$ID}
|
||||
{include file='includes/image-upload-form.html' imageType='folder' parentId=$ID resource="admin.folder"}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="documents">
|
||||
{include file='includes/document-upload-form.html' documentType='folder' parentId=$ID}
|
||||
{include file='includes/document-upload-form.html' documentType='folder' parentId=$ID resource="admin.folder"}
|
||||
</div>
|
||||
|
||||
{$smarty.capture.folder_tab_content nofilter}
|
||||
|
||||
<div class="tab-pane fade" id="modules">
|
||||
<div class="form-container">
|
||||
{include
|
||||
@@ -155,8 +193,8 @@
|
||||
current_tab = "modules"
|
||||
}
|
||||
</div>
|
||||
|
||||
{include file="includes/module-tab-content.html" location="folder-edit"}
|
||||
{* ugly fix : {hook name="folder.tab-content" id="{$folder_id}" view="folder"} *}
|
||||
{include file="includes/module-tab-content.html" hook="folder.tab-content" location="folder-edit" id="{$folder_id}" view="folder"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,6 +202,9 @@
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
{hook name="folder-edit.bottom" folder_id=$folder_id}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -183,6 +224,17 @@
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
// Atomatic ajax tab load, if data-href is defined.
|
||||
$('.nav-tabs a[data-href]').on('shown.bs.tab', function(ev) {
|
||||
var $this = $(this);
|
||||
$($this.attr('href')).load($this.data('href'), function(ev) {
|
||||
if($this.data('callback')) {
|
||||
eval($this.data('callback') + '();');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$.imageUploadManager.initImageDropZone();
|
||||
$.documentUploadManager.initDocumentDropZone();
|
||||
|
||||
@@ -240,5 +292,7 @@
|
||||
{/block}
|
||||
|
||||
{block name="javascript-last-call"}
|
||||
{module_include location='folder-edit-js'}
|
||||
{hook name="folder.edit-js" location="folder-edit-js" folder_id={$folder_id} }
|
||||
|
||||
{hook name="wysiwyg.js" location="wysiwyg-folder-edit-js" }
|
||||
{/block}
|
||||
|
||||
Reference in New Issue
Block a user