Skip to content

Commit

Permalink
merge r11040 from branch 2.2 to trunk
Browse files Browse the repository at this point in the history
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/trunk@11041 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed May 25, 2011
1 parent c9b7beb commit ef19a77
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 1 deletion.
7 changes: 7 additions & 0 deletions admin/cat_list.php
Expand Up @@ -307,6 +307,13 @@ function save_categories_order($categories)
$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) )
{
Expand Down
9 changes: 9 additions & 0 deletions admin/cat_modify.php
Expand Up @@ -270,6 +270,15 @@
$category['cat_full_dir'] )
)
);

if ($conf['enable_synchronization'])
{
$template->assign(
'U_SYNC',
$base_url.'site_update&site=1&cat_id='.$category['id']
);
}

}

// representant management
Expand Down
10 changes: 9 additions & 1 deletion admin/site_update.php
Expand Up @@ -809,8 +809,16 @@
'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();
Expand Down
Binary file added admin/themes/clear/icon/synchronize.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/themes/default/icon/synchronize.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions admin/themes/default/template/cat_list.tpl
Expand Up @@ -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}
Expand Down
3 changes: 3 additions & 0 deletions admin/themes/default/template/cat_modify.tpl
Expand Up @@ -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}
Expand Down

0 comments on commit ef19a77

Please sign in to comment.