mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
synchronize in tabsheet
added tab to be like other pages so added a tabsheet in the backend, also only show files + directories options when it is selected
This commit is contained in:
@@ -149,6 +149,10 @@ function add_core_tabs($sheets, $tab_id)
|
||||
$sheets['pwg'] = array('caption' => l10n('Piwigo Update'), 'url' => $my_base_url);
|
||||
$sheets['ext'] = array('caption' => l10n('Extensions Update'), 'url' => $my_base_url.'&tab=ext');
|
||||
break;
|
||||
case 'site_update':
|
||||
global $my_base_url;
|
||||
$sheets['synchronization'] = array('caption' => l10n('Database synchronization with files'), 'url' => $my_base_url.'site_update&site=1');
|
||||
break;
|
||||
}
|
||||
|
||||
return $sheets;
|
||||
|
||||
@@ -72,6 +72,18 @@ if (isset($page['no_md5sum_number']))
|
||||
$page['messages'][] = '<a href="admin.php?page=batch_manager&filter=prefilter-no_sync_md5sum">'.l10n('Some checksums are missing.').'<i class="icon-right"></i></a>';
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | tabs |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
|
||||
$my_base_url = get_root_url().'admin.php?page=';
|
||||
|
||||
$tabsheet = new tabsheet();
|
||||
$tabsheet->set_id('site_update');
|
||||
$tabsheet->select('synchronization');
|
||||
$tabsheet->assign();
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Quick sync |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
|
||||
{include file='include/resize.inc.tpl'}
|
||||
|
||||
{footer_script}
|
||||
$('#syncFiles label').click(function () {
|
||||
if ($("input[value='files']:checked").val()) {
|
||||
$("input[value='files']").closest("li").find("ul").show();
|
||||
} else {
|
||||
$("input[value='files']").closest("li").find("ul").hide();
|
||||
}
|
||||
})
|
||||
|
||||
{/footer_script}
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'Database synchronization with files'|@translate}: <a href="{$SITE_URL}">{$SITE_URL}</a></h2>
|
||||
<h2>{'Synchronize'|@translate}<a href="{$SITE_URL}"><span class="badge-number">{$SITE_URL}</span></a></h2>
|
||||
</div>
|
||||
|
||||
{if isset($update_result)}
|
||||
@@ -66,7 +77,7 @@
|
||||
<li><label><input type="radio" name="sync" value="dirs" {if 'dirs'==$introduction.sync}checked="checked"{/if}> {'only directories'|@translate}</label></li>
|
||||
|
||||
<li><label><input type="radio" name="sync" value="files" {if 'files'==$introduction.sync}checked="checked"{/if}> {'directories + files'|@translate}</label>
|
||||
<ul style="padding-left:3em">
|
||||
<ul style="display:none;padding-left:3em">
|
||||
<li><label><input type="checkbox" name="display_info" value="1" {if $introduction.display_info}checked="checked"{/if}> {'display maximum informations (added albums and photos, deleted albums and photos)'|@translate}</label></li>
|
||||
<li><label><input type="checkbox" name="add_to_caddie" value="1" {if $introduction.add_to_caddie}checked="checked"{/if}> {'add new photos to caddie'|@translate}</label></li>
|
||||
<li><label>{'Who can see these photos?'|@translate} <select name="privacy_level">{html_options options=$introduction.privacy_level_options selected=$introduction.privacy_level_selected}</select></label></li>
|
||||
|
||||
Reference in New Issue
Block a user