Changeset 11041


Ignore:
Timestamp:
May 25, 2011, 11:18:32 AM (13 years ago)
Author:
plg
Message:

merge r11040 from branch 2.2 to trunk

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:
trunk/admin
Files:
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_list.php

    r8728 r11041  
    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) )
  • trunk/admin/cat_modify.php

    r9051 r11041  
    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
  • trunk/admin/site_update.php

    r8728 r11041  
    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
  • trunk/admin/themes/default/template/cat_list.tpl

    r9586 r11041  
    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>
  • trunk/admin/themes/default/template/cat_modify.tpl

    r9051 r11041  
    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.