Ignore:
Timestamp:
Feb 2, 2011, 9:55:58 PM (14 years ago)
Author:
rvelices
Message:

fix admin modification of coordinates (element_set become batch_manager)

Location:
extensions/rv_gmaps/trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_gmaps/trunk/admin/admin_edit.php

    r8683 r9069  
    77  $_GET['cat'] = 'caddie';
    88$_GET['mode'] = 'map';
    9 include (PHPWG_ROOT_PATH.'admin/element_set.php');
     9include (PHPWG_ROOT_PATH.'admin/batch_manager.php');
    1010
    11 $template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d photo', '%d photos', count($page['cat_elements_id'])).' - '.$page['title']);
     11$template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d photo', '%d photos', count($page['cat_elements_id'])));
    1212
    1313if ( isset($_POST['submit']) )
     
    5656}
    5757
    58 
    59 $template->append(
    60   'specials',
    61   array(
    62                 $admin_url.get_query_string_diff(array('start','cat')).'&cat=caddie' => l10n('Caddie')
    63     ),
    64         true
    65   );
     58$specials_selected = null;
     59foreach( array('caddie'=>'Caddie', 'recent'=>'Recent photos') as $k => $v)
     60{
     61        $link = $admin_url.get_query_string_diff(array('start','cat')).'&cat='.$k;
     62        $template->append(
     63                'specials',
     64                array(
     65                        $link => l10n($v),
     66                        ),
     67                true
     68                );
     69        if ($k == $_GET['cat']) $specials_selected = $link;
     70}
     71$template->assign('specials_selected', $specials_selected);
    6672
    6773$query = '
     
    7480if (!empty($result))
    7581{
    76   while ($row = mysql_fetch_assoc($result))
    77   {
    78     $url = $admin_url.get_query_string_diff(array('start','cat')).'&cat='.$row['id'];
    79     if ( $row['id']==$_GET['cat'] ) $selecteds[] = $url;
    80     $row['id']=$url;
    81     array_push($categories, $row);
    82   }
     82        while ($row = mysql_fetch_assoc($result))
     83        {
     84                $url = $admin_url.get_query_string_diff(array('start','cat')).'&cat='.$row['id'];
     85                if ( $row['id']==$_GET['cat'] ) $selecteds[] = $url;
     86                $row['id']=$url;
     87                array_push($categories, $row);
     88        }
    8389}
    8490usort($categories, 'global_rank_compare');
  • extensions/rv_gmaps/trunk/admin/admin_edit.tpl

    r8683 r9069  
    44<select onchange="document.location = this.options[this.selectedIndex].value;">
    55  <optgroup label="Specials">
    6     {html_options options=$specials}
     6    {html_options options=$specials selected=$specials_selected}
    77  </optgroup>
    88  <optgroup label="{'Albums'|@translate}">
Note: See TracChangeset for help on using the changeset viewer.