Changeset 11040


Ignore:
Timestamp:
May 25, 2011, 11:01:55 AM (14 years ago)
Author:
plg
Message:

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.

Location:
branches/2.2/admin
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/admin/cat_list.php

    r8728 r11040  
    308308    $tpl_cat['U_DELETE'].= '&pwg_token='.get_pwg_token();
    309309  }
     310  else
     311  {
     312    if ($conf['enable_synchronization'])
     313    {
     314      $tpl_cat['U_SYNC'] = $base_url.'site_update&site=1&cat_id='.$category['id'];
     315    }
     316  }
    310317
    311318  if ( array_key_exists($category['id'], $categories_with_images) )
  • branches/2.2/admin/cat_modify.php

    r9051 r11040  
    271271      )
    272272    );
     273
     274  if ($conf['enable_synchronization'])
     275  {
     276    $template->assign(
     277      'U_SYNC',
     278      $base_url.'site_update&site=1&cat_id='.$category['id']
     279      );
     280  }
     281
    273282}
    274283
  • branches/2.2/admin/site_update.php

    r8728 r11040  
    810810      'meta_empty_overrides'  => false,
    811811    );
    812 
     812 
    813813  $cat_selected = array();
     814
     815  if (isset($_GET['cat_id']))
     816  {
     817    check_input_parameter('cat_id', $_GET, false, PATTERN_ID);
     818
     819    $cat_selected = array($_GET['cat_id']);
     820    $tpl_introduction['sync'] = 'files';
     821  }
    814822}
    815823
  • branches/2.2/admin/themes/default/template/cat_list.tpl

    r9586 r11040  
    7575        <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>
    7676        {/if}
     77        {if isset($category.U_SYNC) }
     78        <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>
     79        {/if}
    7780        {if isset($category.U_DELETE) }
    7881        <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>
  • branches/2.2/admin/themes/default/template/cat_modify.tpl

    r9051 r11040  
    2020  {if isset($U_MANAGE_PERMISSIONS) }
    2121  <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>
     22  {/if}
     23  {if isset($U_SYNC) }
     24  <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>
    2225  {/if}
    2326  {if isset($U_DELETE) }
Note: See TracChangeset for help on using the changeset viewer.