Changeset 10594


Ignore:
Timestamp:
04/23/11 14:48:05 (9 years ago)
Author:
patdenice
Message:

Change tabsheet place for plugins, themes and languages.
Plugins, themes and languages use same update page.

Location:
trunk
Files:
3 added
6 deleted
12 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r10511 r10594  
    148148    'U_CONFIG_EXTENTS'=> $link_start.'extend_for_templates', 
    149149    'U_CONFIG_MENUBAR'=> $link_start.'menubar', 
    150     'U_CONFIG_LANGUAGES' => $link_start.'languages_installed', 
    151     'U_CONFIG_THEMES'=> $link_start.'themes_installed', 
     150    'U_CONFIG_LANGUAGES' => $link_start.'languages', 
     151    'U_CONFIG_THEMES'=> $link_start.'themes', 
    152152    'U_CATEGORIES'=> $link_start.'cat_list', 
    153153    'U_MOVE'=> $link_start.'cat_move', 
     
    165165    'U_ADMIN'=> PHPWG_ROOT_PATH.'admin.php', 
    166166    'U_LOGOUT'=> PHPWG_ROOT_PATH.'index.php?act=logout', 
    167     'U_PLUGINS'=> $link_start.'plugins_list', 
     167    'U_PLUGINS'=> $link_start.'plugins', 
    168168    'U_ADD_PHOTOS' => $link_start.'photos_add', 
    169169    'U_CHANGE_THEME' => PHPWG_ROOT_PATH.'admin.php?change_theme=1', 
  • trunk/admin/include/functions.php

    r10511 r10594  
    20732073      return 2; 
    20742074 
    2075     case 'plugins_list': 
    2076     case 'plugins_update': 
    2077     case 'plugins_new': 
     2075    case 'plugins': 
    20782076    case 'plugin': 
    20792077      return 3; 
     
    20922090    case 'extend_for_templates': 
    20932091    case 'menubar': 
    2094     case 'themes_new': 
    2095     case 'themes_installed': 
     2092    case 'themes': 
    20962093    case 'theme': 
    2097     case 'languages_installed': 
    2098     case 'languages_new': 
     2094    case 'languages': 
    20992095      return 5; 
    21002096  } 
  • trunk/admin/include/languages.class.php

    r9549 r10594  
    3434  { 
    3535    $this->get_fs_languages($target_charset); 
    36   } 
    37  
    38   /** 
    39    * Set tabsheet for languages pages. 
    40    * @param string selected page. 
    41    */ 
    42   function set_tabsheet($selected) 
    43   { 
    44     include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 
    45  
    46     $link = get_root_url().'admin.php?page='; 
    47  
    48     $tabsheet = new tabsheet(); 
    49     $tabsheet->add('languages_installed', l10n('Installed Languages'), $link.'languages_installed'); 
    50     $tabsheet->add('languages_update', l10n('Check for updates'), $link.'languages_update'); 
    51     $tabsheet->add('languages_new', l10n('Add New Language'), $link.'languages_new'); 
    52     $tabsheet->select($selected); 
    53     $tabsheet->assign(); 
    5436  } 
    5537 
  • trunk/admin/include/plugins.class.php

    r10293 r10594  
    4040      $this->db_plugins_by_id[$db_plugin['id']] = $db_plugin; 
    4141    } 
    42   } 
    43  
    44   /** 
    45    * Set tabsheet for plugins pages. 
    46    * @param string selected page. 
    47    */ 
    48   function set_tabsheet($selected) 
    49   { 
    50     include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 
    51  
    52     $link = get_root_url().'admin.php?page='; 
    53  
    54     $tabsheet = new tabsheet(); 
    55     $tabsheet->add('plugins_list', l10n('Plugin list'), $link.'plugins_list'); 
    56     $tabsheet->add('plugins_update', l10n('Check for updates'), $link.'plugins_update'); 
    57     $tabsheet->add('plugins_new', l10n('Other plugins'), $link.'plugins_new'); 
    58     $tabsheet->select($selected); 
    59     $tabsheet->assign(); 
    6042  } 
    6143 
  • trunk/admin/include/themes.class.php

    r9472 r10594  
    3939      $this->db_themes_by_id[$db_theme['id']] = $db_theme; 
    4040    } 
    41   } 
    42  
    43   /** 
    44    * Set tabsheet for themes pages. 
    45    * @param string selected page. 
    46    */ 
    47   function set_tabsheet($selected) 
    48   { 
    49     include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 
    50  
    51     $link = get_root_url().'admin.php?page='; 
    52  
    53     $tabsheet = new tabsheet(); 
    54     $tabsheet->add('themes_installed', l10n('Installed Themes'), $link.'themes_installed'); 
    55     $tabsheet->add('themes_update', l10n('Check for updates'), $link.'themes_update'); 
    56     $tabsheet->add('themes_new', l10n('Add New Theme'), $link.'themes_new'); 
    57     $tabsheet->select($selected); 
    58     $tabsheet->assign(); 
    5941  } 
    6042 
  • trunk/admin/include/updates.class.php

    r10511 r10594  
    1616  var $merged_extension_url = 'http://piwigo.org/download/merged_extensions.txt'; 
    1717 
    18   function __construct() 
     18  function __construct($page='updates') 
    1919  { 
    2020    $this->types = array('plugins', 'themes', 'languages'); 
     21 
     22    if (in_array($page, $this->types)) 
     23    { 
     24      $this->types = array($page); 
     25    } 
    2126    $this->default_themes = array('clear', 'dark', 'Sylvia'); 
    2227    $this->default_plugins = array('admin_multi_view', 'c13y_upgrade', 'language_switch', 'LocalFilesEditor'); 
  • trunk/admin/languages_installed.php

    r9518 r10594  
    3535$languages = new languages(); 
    3636$languages->get_db_languages(); 
    37 $languages->set_tabsheet($page['page']); 
    3837 
    3938//--------------------------------------------------perform requested actions 
  • trunk/admin/languages_new.php

    r9518 r10594  
    3535$languages = new languages(); 
    3636$languages->get_db_languages(); 
    37 $languages->set_tabsheet($page['page']); 
    3837 
    3938// +-----------------------------------------------------------------------+ 
  • trunk/admin/plugins_installed.php

    r10570 r10594  
    6464  } 
    6565} 
    66  
    67 //--------------------------------------------------------------------Tabsheet 
    68 $plugins->set_tabsheet($page['page']); 
    6966 
    7067// +-----------------------------------------------------------------------+ 
  • trunk/admin/plugins_new.php

    r9598 r10594  
    3131$template->set_filenames(array('plugins' => 'plugins_new.tpl')); 
    3232 
    33 $base_url = get_root_url().'admin.php?page='.$page['page']; 
     33$base_url = get_root_url().'admin.php?page='.$page['page'].'&'.$page['tab']; 
    3434 
    3535$plugins = new plugins(); 
     
    8282} 
    8383 
    84 //--------------------------------------------------------------------Tabsheet 
    85 $plugins->set_tabsheet($page['page']); 
    86  
    8784//---------------------------------------------------------------Order options 
    8885$template->assign('order_options', 
  • trunk/admin/themes/default/template/plugins_list.tpl

    r10378 r10594  
    8282  <span class="sort"> 
    8383    <form action="" method="get" name="change_order"> 
    84       <input type="hidden" name="page" value="plugins_list"/> 
     84      <input type="hidden" name="page" value="plugins"/> 
    8585      {'Sort order'|@translate} :  
    8686      <select name="plugin_order" onchange="this.form.submit();"> 
  • trunk/admin/themes_installed.php

    r8728 r10594  
    152152 
    153153 
    154 $themes->set_tabsheet($page['page']); 
    155154$template->set_filenames(array('themes' => 'themes_installed.tpl')); 
    156155$template->assign_var_from_handle('ADMIN_CONTENT', 'themes'); 
  • trunk/admin/themes_new.php

    r8728 r10594  
    3232 
    3333$themes = new themes(); 
    34 $themes->set_tabsheet('themes_new'); 
    3534 
    3635// +-----------------------------------------------------------------------+ 
Note: See TracChangeset for help on using the changeset viewer.