bug 1786 fixed: ability to prefilter the synchronize screen with a specific

album by clicking on the new "Synchronize" icon on album admin page or album
admin list.

This is not the solution proposed by Gotcha (ie a treeview to select the album
on the synchronize screen) but it solves the same problem.


git-svn-id: http://piwigo.org/svn/branches/2.2@11040 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2011-05-25 09:01:55 +00:00
parent dec961c95f
commit 663d72e063
7 changed files with 31 additions and 1 deletions

View file

@ -307,6 +307,13 @@ foreach ($categories as $category)
$tpl_cat['U_DELETE'] = $self_url.'&delete='.$category['id'];
$tpl_cat['U_DELETE'].= '&pwg_token='.get_pwg_token();
}
else
{
if ($conf['enable_synchronization'])
{
$tpl_cat['U_SYNC'] = $base_url.'site_update&site=1&cat_id='.$category['id'];
}
}
if ( array_key_exists($category['id'], $categories_with_images) )
{

View file

@ -270,6 +270,15 @@ else
$category['cat_full_dir'] )
)
);
if ($conf['enable_synchronization'])
{
$template->assign(
'U_SYNC',
$base_url.'site_update&site=1&cat_id='.$category['id']
);
}
}
// representant management

View file

@ -809,8 +809,16 @@ else
'meta_all' => false,
'meta_empty_overrides' => false,
);
$cat_selected = array();
if (isset($_GET['cat_id']))
{
check_input_parameter('cat_id', $_GET, false, PATTERN_ID);
$cat_selected = array($_GET['cat_id']);
$tpl_introduction['sync'] = 'files';
}
}
$tpl_introduction['privacy_level_options'] = get_privacy_level_options();

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

View file

@ -74,6 +74,9 @@ jQuery(document).ready(function(){ldelim}
{if isset($category.U_MANAGE_PERMISSIONS) }
<li><a href="{$category.U_MANAGE_PERMISSIONS}" title="{'edit album permissions'|@translate}" ><img src="{$themeconf.admin_icon_dir}/category_permissions.png" class="button" alt="{'Permissions'|@translate}"></a></li>
{/if}
{if isset($category.U_SYNC) }
<li><a href="{$category.U_SYNC}" title="{'Synchronize'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/synchronize.png" class="button" alt="{'Synchronize'|@translate}"></a></li>
{/if}
{if isset($category.U_DELETE) }
<li><a href="{$category.U_DELETE}" title="{'delete album'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.admin_icon_dir}/category_delete.png" class="button" alt="{'delete album'|@translate}"></a></li>
{/if}

View file

@ -20,6 +20,9 @@
{if isset($U_MANAGE_PERMISSIONS) }
<li><a href="{$U_MANAGE_PERMISSIONS}" title="{'edit album permissions'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_permissions.png" class="button" alt="{'Permissions'|@translate}"></a></li>
{/if}
{if isset($U_SYNC) }
<li><a href="{$U_SYNC}" title="{'Synchronize'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/synchronize.png" class="button" alt="{'Synchronize'|@translate}"></a></li>
{/if}
{if isset($U_DELETE) }
<li><a href="{$U_DELETE}" title="{'delete album'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_delete.png" class="button" alt="{'delete album'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"></a></li>
{/if}