mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
feature #534, modernize admin home
* convert the big button "Quick Local Sync" into a simpler action link * simplify the "quick sync" as a specific action on site_update.php
This commit is contained in:
@@ -210,6 +210,7 @@ $template->assign(
|
||||
'NB_PLUGINS' => count($pwg_loaded_plugins),
|
||||
'STORAGE_USED' => l10n('%sGB', number_format($disk_usage/(1024*1024), 1)),
|
||||
'U_CHECK_UPGRADE' => PHPWG_ROOT_PATH.'admin.php?action=check_upgrade',
|
||||
'U_QUICK_SYNC' => PHPWG_ROOT_PATH.'admin.php?page=site_update&site=1&quick_sync=1&pwg_token='.get_pwg_token(),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -82,6 +82,24 @@ else
|
||||
$site_reader = new LocalSiteReader($site_url);
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Quick sync |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (isset($_GET['quick_sync']))
|
||||
{
|
||||
check_pwg_token();
|
||||
|
||||
$_POST['sync'] = 'files';
|
||||
$_POST['display_info'] = '1';
|
||||
$_POST['add_to_caddie'] = '1';
|
||||
$_POST['privacy_level'] = '0';
|
||||
$_POST['sync_meta'] = '1';
|
||||
$_POST['simulate'] = '0';
|
||||
$_POST['subcats-included'] = '1';
|
||||
$_POST['submit'] = 'Quick Local Synchronization';
|
||||
}
|
||||
|
||||
$general_failure = true;
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
|
||||
@@ -140,6 +140,12 @@ jQuery().ready(function(){
|
||||
|
||||
</div> {* .stat-boxes *}
|
||||
|
||||
<p class="showCreateAlbum">
|
||||
{if $ENABLE_SYNCHRONIZATION}
|
||||
<a href="{$U_QUICK_SYNC}" class="icon-exchange">{'Quick Local Synchronization'|translate}</a>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<dl style="padding-top: 30px;">
|
||||
<dt>{'Piwigo version'|@translate}</dt>
|
||||
<dd>
|
||||
@@ -152,21 +158,3 @@ jQuery().ready(function(){
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
{if $ENABLE_SYNCHRONIZATION}
|
||||
<form name="QuickSynchro" action="{$U_CAT_UPDATE}" method="post" id="QuickSynchro" style="display: block; text-align:right;">
|
||||
<div>
|
||||
<input type="hidden" name="sync" value="files" checked="checked">
|
||||
<input type="hidden" name="display_info" value="1" checked="checked">
|
||||
<input type="hidden" name="add_to_caddie" value="1" checked="checked">
|
||||
<input type="hidden" name="privacy_level" value="0" checked="checked">
|
||||
<input type="hidden" name="sync_meta" checked="checked">
|
||||
<input type="hidden" name="simulate" value="0">
|
||||
<input type="hidden" name="subcats-included" value="1" checked="checked">
|
||||
</div>
|
||||
<div class="bigbutton">
|
||||
<span class="bigtext">{'Quick Local Synchronization'|@translate}</span>
|
||||
<input type="submit" value="{'Quick Local Synchronization'|@translate}" name="submit">
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user