revert hange in folder admin template
This commit is contained in:
@@ -5,332 +5,337 @@
|
||||
{block name="check-permissions"}admin.folders.view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="folders">
|
||||
<div class="folders">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{* include file="includes/folder-breadcrumb.html" *}
|
||||
{* include file="includes/folder-breadcrumb.html" *}
|
||||
|
||||
{module_include location='folders_top'}
|
||||
{module_include location='folders_top'}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed" id="folder_list">
|
||||
<caption>
|
||||
{* display parent folder name, and get current folder ID *}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
|
||||
{intl l="Folders in %fold" fold=$TITLE}
|
||||
{$fold_id = $ID}
|
||||
{/loop}
|
||||
{elseloop rel="folder_title"}
|
||||
{intl l="Top level folders"}
|
||||
{/elseloop}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed" id="folder_list">
|
||||
<caption>
|
||||
{* display parent folder name, and get current folder ID *}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$parent}
|
||||
{intl l="Folders in %fold" fold=$TITLE}
|
||||
{$fold_id = $ID}
|
||||
{/loop}
|
||||
{elseloop rel="folder_title"}
|
||||
{intl l="Top level folders"}
|
||||
{/elseloop}
|
||||
|
||||
{module_include location='folder_list_caption'}
|
||||
<td class="object-title">
|
||||
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}">
|
||||
{$TITLE}
|
||||
</a>
|
||||
</td>
|
||||
{module_include location='folder_list_caption'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
|
||||
{ifloop rel="folder_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
</th>
|
||||
{ifloop rel="folder_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="object-image"> </th>
|
||||
<th class="object-image"> </th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Folder title'}"
|
||||
}
|
||||
</th>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Folder title'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
{module_include location='folder_list_header'}
|
||||
{module_include location='folder_list_header'}
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='visible'
|
||||
reverse_order='visible_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Online'}"
|
||||
}
|
||||
</th>
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='visible'
|
||||
reverse_order='visible_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Online'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Position'}"
|
||||
}
|
||||
</th>
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Position'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="actions">{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<th class="actions">{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
<tbody>
|
||||
{loop name="folder_list" type="folder" visible="*" parent=$parent order=$folder_order backend_context="1" lang=$lang_id}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
|
||||
{/loop}
|
||||
</td>
|
||||
<td>
|
||||
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
|
||||
{/loop}
|
||||
</td>
|
||||
|
||||
<td class="object-title">
|
||||
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}">
|
||||
{$TITLE}
|
||||
</a>
|
||||
</td>
|
||||
<td class="object-title">
|
||||
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}">
|
||||
{$TITLE}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
{module_include location='folder_list_row'}
|
||||
{module_include location='folder_list_row'}
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
|
||||
<div class="make-switch switch-small folderVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/loop}
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
|
||||
<div class="make-switch switch-small folderVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="can_change"}
|
||||
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</td>
|
||||
{elseloop rel="can_change"}
|
||||
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{admin_position_block
|
||||
permission="admin.folders.edit"
|
||||
path={url path='admin/folders/update-position' folder_id=$ID}
|
||||
url_parameter="folder_id"
|
||||
in_place_edit_class="folderPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
{admin_position_block
|
||||
permission="admin.folders.edit"
|
||||
path={url path='admin/folders/update-position' folder_id=$ID}
|
||||
url_parameter="folder_id"
|
||||
in_place_edit_class="folderPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folder' folder_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folders' parent=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path='/admin/folders/update' folder_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path="/admin/folders/update/{$ID}"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
|
||||
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
{/ifloop}
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
|
||||
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="folder_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="message">
|
||||
<div class="alert alert-info">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
|
||||
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
|
||||
{/loop}
|
||||
{elseloop rel="folder_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="message">
|
||||
<div class="alert alert-info">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
|
||||
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="can_create"}
|
||||
{elseloop rel="can_create"}
|
||||
{intl l="This folder has no sub-folders."}
|
||||
{/elseloop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
{/elseloop}
|
||||
</table>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
{/elseloop}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* -- CONTENT MANAGEMENT ---------------------------------------------------- *}
|
||||
{* -- CONTENT MANAGEMENT ---------------------------------------------------- *}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>
|
||||
{* display parent folder name *}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
|
||||
{intl l="Contents in %fold" fold=$TITLE}
|
||||
{/loop}
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>
|
||||
{* display parent folder name *}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$parent}
|
||||
{intl l="Contents in %fold" fold=$TITLE}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="folder_title"}
|
||||
{intl l="Top level Contents"}
|
||||
{/elseloop}
|
||||
{elseloop rel="folder_title"}
|
||||
{intl l="Top level Contents"}
|
||||
{/elseloop}
|
||||
|
||||
{module_include location='content_list_caption'}
|
||||
{module_include location='content_list_caption'}
|
||||
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new content'}" href="#content_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</caption>
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new content'}" href="#content_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</caption>
|
||||
|
||||
{ifloop rel="content_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
{ifloop rel="content_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
}
|
||||
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
label="{intl l='Content title'}"
|
||||
}
|
||||
}
|
||||
|
||||
{module_include location='content_list_header'}
|
||||
{module_include location='content_list_header'}
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='visible'
|
||||
reverse_order='visible_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
label="{intl l='Online'}"
|
||||
}
|
||||
</th>
|
||||
}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
label="{intl l='Position'}"
|
||||
}
|
||||
</th>
|
||||
}
|
||||
</th>
|
||||
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="content_list" type="content" visible="*" folder_default=$folder_id order=$content_order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
<tbody>
|
||||
{loop name="content_list" type="content" visible="*" folder_default=$parent order=$content_order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{loop type="image" name="folder_image" source="content" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path='admin/content/edit' id=$ID}" title="{intl l='Edit this content'}">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
|
||||
</a>
|
||||
{/loop}
|
||||
<td>
|
||||
{loop type="image" name="folder_image" source="content" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path="admin/content/update/$ID"}" title="{intl l='Edit this content'}">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
<td class="object-title"><a href="{url path="/admin/content/update/$ID"}" title="{intl l='Edit this content'}">{$TITLE}</a></td>
|
||||
<td class="object-title"><a href="{url path="/admin/content/update/$ID"}" title="{intl l='Edit this content'}">{$TITLE}</a></td>
|
||||
|
||||
{module_include location='content_list_row'}
|
||||
{module_include location='content_list_row'}
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.contents.edit"}
|
||||
<div class="make-switch switch-small contentVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="contentVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.contents.edit"}
|
||||
<div class="make-switch switch-small contentVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="contentVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="can_change"}
|
||||
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{admin_position_block
|
||||
permission="admin.content.edit"
|
||||
path={url path='/admin/content/update-position' content_id=$ID}
|
||||
url_parameter="content_id"
|
||||
in_place_edit_class="contentPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.content.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this content'}" href="{url path="admin/content/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.content.delete"}
|
||||
<a class="btn btn-default btn-xs content-delete" title="{intl l='Delete this content'}" href="#content_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="can_change"}
|
||||
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{admin_position_block
|
||||
permission="admin.content.edit"
|
||||
path={url path='/admin/content/update-position' content_id=$ID}
|
||||
url_parameter="content_id"
|
||||
in_place_edit_class="contentPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.content.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this content'}" href="{url path="admin/content/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.content.delete"}
|
||||
<a class="btn btn-default btn-xs content-delete" title="{intl l='Delete this content'}" href="#content_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="content_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="message"><div class="alert alert-info">{intl l="This folder doesn't contains any contents. To add a new content, <strong>click the + button</strong> above."}</div></td>
|
||||
</tr>
|
||||
</thead>
|
||||
{/elseloop}
|
||||
</table>
|
||||
{elseloop rel="content_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="message"><div class="alert alert-info">{intl l="This folder doesn't contains any contents. To add a new content, <strong>click the + button</strong> above."}</div></td>
|
||||
</tr>
|
||||
</thead>
|
||||
{/elseloop}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='folders_bottom'}
|
||||
{module_include location='folders_bottom'}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* -- Adding a new folder ------------------------------------------------- *}
|
||||
|
||||
{form name="thelia.admin.folder.creation"}
|
||||
{form name="thelia.admin.folder.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "folder_creation_dialog"}
|
||||
@@ -338,12 +343,12 @@
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/folders/update' folder_id='_ID_'}" />
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/folders/update/_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='parent'}
|
||||
<input type="hidden" name="{$name}" value="{$folder_id}" />
|
||||
<input type="hidden" name="{$name}" value="{$parent}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
@@ -357,12 +362,12 @@
|
||||
|
||||
<div class="help-block">{intl l='Enter here the folder name in the default language (%title)' title="$TITLE"}</div>
|
||||
|
||||
{* Switch edition to the current locale *}
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
{/loop}
|
||||
</div>
|
||||
{/form_field}
|
||||
@@ -382,55 +387,55 @@
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "folder_creation_dialog"
|
||||
dialog_title = {intl l="Create a new folder"}
|
||||
dialog_body = {$smarty.capture.folder_creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this folder"}
|
||||
dialog_ok_label = {intl l="Create this folder"}
|
||||
|
||||
form_action = {url path='/admin/folders/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
form_action = {url path='/admin/folders/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
{/form}
|
||||
|
||||
{* -- Adding a new content -------------------------------------------------- *}
|
||||
|
||||
{form name="thelia.admin.content.creation"}
|
||||
{form name="thelia.admin.content.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "content_creation_dialog"}
|
||||
{capture "content_creation_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{* Be sure to get the folder_id, even if the form could not be validated *}
|
||||
<input type="hidden" name="folder_id" value="{$folder_id}" />
|
||||
{* Be sure to get the folder_id, even if the form could not be validated *}
|
||||
<input type="hidden" name="parent" value="{$parent}" />
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/contents/update' content_id='_ID_'}" />
|
||||
{/form_field}
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/content/update/_ID_' }" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='default_folder'}
|
||||
<input type="hidden" name="{$name}" value="{$folder_id}" />
|
||||
{/form_field}
|
||||
{form_field form=$form field='default_folder'}
|
||||
<input type="hidden" name="{$name}" value="{$parent}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Title'}">
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Title'}">
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="$TITLE" /></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l='Enter here the content name in the default language (%title)' title="$TITLE"}</div>
|
||||
<div class="help-block">{intl l='Enter here the content name in the default language (%title)' title="$TITLE"}</div>
|
||||
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
@@ -455,18 +460,18 @@
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "content_creation_dialog"
|
||||
dialog_title = {intl l="Create a new content"}
|
||||
dialog_body = {$smarty.capture.content_creation_dialog nofilter}
|
||||
dialog_id = "content_creation_dialog"
|
||||
dialog_title = {intl l="Create a new content"}
|
||||
dialog_body = {$smarty.capture.content_creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this content"}
|
||||
dialog_ok_label = {intl l="Create this content"}
|
||||
|
||||
form_action = {url path='/admin/contents/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
form_action = {url path='/admin/content/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
|
||||
{* -- Delete folder confirmation dialog ----------------------------------- *}
|
||||
@@ -479,36 +484,36 @@
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "folder_delete_dialog"
|
||||
dialog_title = {intl l="Delete folder"}
|
||||
dialog_message = {intl l="Do you really want to delete this folder and all its content ?"}
|
||||
dialog_id = "folder_delete_dialog"
|
||||
dialog_title = {intl l="Delete folder"}
|
||||
dialog_message = {intl l="Do you really want to delete this folder and all its content ?"}
|
||||
|
||||
form_action = {url path='/admin/folders/delete'}
|
||||
form_content = {$smarty.capture.folder_delete_dialog nofilter}
|
||||
}
|
||||
form_action = {url path='/admin/folders/delete'}
|
||||
form_content = {$smarty.capture.folder_delete_dialog nofilter}
|
||||
}
|
||||
|
||||
{* -- Delete content confirmation dialog ------------------------------------ *}
|
||||
|
||||
{capture "content_delete_dialog"}
|
||||
<input type="hidden" name="content_id" id="content_delete_id" value="" />
|
||||
<input type="hidden" name="folder_id" value="{$folder_id}" />
|
||||
<input type="hidden" name="folder_id" value="{$parent}" />
|
||||
|
||||
{module_include location='content_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "content_delete_dialog"
|
||||
dialog_title = {intl l="Delete content"}
|
||||
dialog_message = {intl l="Do you really want to delete this content ?"}
|
||||
dialog_id = "content_delete_dialog"
|
||||
dialog_title = {intl l="Delete content"}
|
||||
dialog_message = {intl l="Do you really want to delete this content ?"}
|
||||
|
||||
form_action = {url path='/admin/content/delete'}
|
||||
form_content = {$smarty.capture.content_delete_dialog nofilter}
|
||||
}
|
||||
form_action = {url path='/admin/content/delete'}
|
||||
form_content = {$smarty.capture.content_delete_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
@@ -536,23 +541,23 @@
|
||||
|
||||
// JS stuff for creation form
|
||||
{include
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "folder_creation_dialog"
|
||||
form_name = "thelia.admin.folder.creation"
|
||||
}
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "folder_creation_dialog"
|
||||
form_name = "thelia.admin.folder.creation"
|
||||
}
|
||||
|
||||
{include
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "content_creation_dialog"
|
||||
form_name = "thelia.admin.content.creation"
|
||||
}
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "content_creation_dialog"
|
||||
form_name = "thelia.admin.content.creation"
|
||||
}
|
||||
|
||||
{* Toggle object visibility *}
|
||||
|
||||
$(".folderVisibleToggle").on('switch-change', function(event, data) {
|
||||
$.ajax({
|
||||
url : "{url path='admin/folders/toggle-online'}",
|
||||
data : {
|
||||
data : {
|
||||
folder_id : $(this).data('id'),
|
||||
action : 'visibilityToggle'
|
||||
}
|
||||
@@ -570,9 +575,9 @@
|
||||
});
|
||||
});
|
||||
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
|
||||
$('.folderPositionChange').editable({
|
||||
$('.folderPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new folder position"}',
|
||||
mode : 'popup',
|
||||
@@ -580,18 +585,18 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url noamp='1' path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
|
||||
var url = "{url path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
.replace('__POS__', newValue);
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
.replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
$('.contentPositionChange').editable({
|
||||
$('.contentPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new content position"}',
|
||||
mode : 'popup',
|
||||
@@ -599,7 +604,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url noamp='1' path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
|
||||
var url = "{url path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
Reference in New Issue
Block a user