Changeset 16925


Ignore:
Timestamp:
07/23/12 12:03:14 (7 years ago)
Author:
mistic100
Message:

feature 2703: make it easy for plugins to add tabs in admin screens
add a trigger a give an id to each core tabsheets

Location:
trunk/admin
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/album.php

    r13668 r16925  
    6363 
    6464$tabsheet = new tabsheet(); 
     65$tabsheet->set_id('album'); 
    6566$tabsheet->add('properties', l10n('Properties'), $admin_album_base_url.'-properties'); 
    6667$tabsheet->add('sort_order', l10n('Manage photo ranks'), $admin_album_base_url.'-sort_order'); 
  • trunk/admin/batch_manager.php

    r14689 r16925  
    380380{ 
    381381  $tabsheet = new tabsheet(); 
     382  $tabsheet->set_id('batch_manager'); 
    382383  foreach ($tabs as $tab) 
    383384  { 
  • trunk/admin/cat_options.php

    r12922 r16925  
    139139// TabSheet 
    140140$tabsheet = new tabsheet(); 
     141$tabsheet->set_id('cat_options'); 
    141142// TabSheet initialization 
    142143$opt_link = $link_start.'cat_options&section='; 
  • trunk/admin/comments.php

    r13240 r16925  
    9999 
    100100$tabsheet = new tabsheet(); 
     101$tabsheet->set_id('comments'); 
    101102$tabsheet->add('', l10n('User comments validation'), ''); 
    102103$tabsheet->select(''); 
  • trunk/admin/configuration.php

    r16167 r16925  
    287287// TabSheet 
    288288$tabsheet = new tabsheet(); 
     289$tabsheet->set_id('configuration'); 
    289290// TabSheet initialization 
    290291$tabsheet->add('main', l10n('Main'), $conf_link.'main'); 
  • trunk/admin/help.php

    r12922 r16925  
    6666 
    6767$tabsheet = new tabsheet(); 
     68$tabsheet->set_id('help'); 
    6869foreach ($tabs as $tab) 
    6970{ 
  • trunk/admin/include/albums_tab.inc.php

    r13282 r16925  
    2727 
    2828$tabsheet = new tabsheet(); 
     29$tabsheet->set_id('cat_list'); 
    2930$tabsheet->add('list', l10n('List'), $my_base_url.'cat_list'); 
    3031$tabsheet->add('move', l10n('Move'), $my_base_url.'cat_move'); 
  • trunk/admin/include/functions_history.inc.php

    r14688 r16925  
    3030  // TabSheet 
    3131  $tabsheet = new tabsheet(); 
     32  $tabsheet->set_id('history'); 
    3233  // TabSheet initialization 
    3334  $tabsheet->add('stats', l10n('Statistics'), $link_start.'stats'); 
  • trunk/admin/include/tabsheet.class.php

    r12922 r16925  
    2525{ 
    2626  var $sheets; 
     27  var $uniqid; 
    2728  var $name; 
    2829  var $titlename; 
     
    3637  { 
    3738    $this->sheets = array(); 
     39    $this->uniqid = null; 
    3840    $this->name = $name; 
    3941    $this->titlename = $titlename; 
    4042    $this->selected = ""; 
     43  } 
     44   
     45  function set_id($id) 
     46  { 
     47    $this->uniqid = $id; 
    4148  } 
    4249 
     
    8289  function select($name) 
    8390  { 
     91    $this->sheets = trigger_event('tabsheet_before_select', $this->sheets, $this->uniqid); 
    8492    $this->selected = $name; 
    8593  } 
  • trunk/admin/languages.php

    r12922 r16925  
    3737 
    3838$tabsheet = new tabsheet(); 
     39$tabsheet->set_id('languages'); 
    3940$tabsheet->add('installed', l10n('Installed Languages'), $my_base_url.'&tab=installed'); 
    4041$tabsheet->add('update', l10n('Check for updates'), $my_base_url.'&tab=update'); 
  • trunk/admin/notification_by_mail.php

    r12922 r16925  
    589589  // TabSheet 
    590590  $tabsheet = new tabsheet(); 
     591  $tabsheet->set_id('nbm'); 
    591592  // TabSheet initialization 
    592593  $tabsheet->add('param', l10n('Parameter'), 
  • trunk/admin/photo.php

    r13077 r16925  
    6262 
    6363$tabsheet = new tabsheet(); 
     64$tabsheet->set_id('photo'); 
    6465$tabsheet->add('properties', l10n('Properties'), $admin_photo_base_url.'-properties'); 
    6566$tabsheet->add('coi', l10n('Center of interest'), $admin_photo_base_url.'-coi'); 
  • trunk/admin/photos_add.php

    r13451 r16925  
    8888 
    8989$tabsheet = new tabsheet(); 
     90$tabsheet->set_id('photos_add'); 
    9091foreach ($tabs as $tab) 
    9192{ 
  • trunk/admin/plugins.php

    r12922 r16925  
    3737 
    3838$tabsheet = new tabsheet(); 
     39$tabsheet->set_id('plugins'); 
    3940$tabsheet->add('installed', l10n('Plugin list'), $my_base_url.'&tab=installed'); 
    4041$tabsheet->add('update', l10n('Check for updates'), $my_base_url.'&tab=update'); 
  • trunk/admin/rating.php

    r13077 r16925  
    3737include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 
    3838$tabsheet = new tabsheet(); 
     39$tabsheet->set_id('rating'); 
    3940$tabsheet->add('rating', l10n('Photos'), get_root_url().'admin.php?page=rating'); 
    4041$tabsheet->add('rating_user', l10n('Users'), get_root_url().'admin.php?page=rating_user'); 
  • trunk/admin/rating_user.php

    r12922 r16925  
    2626include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 
    2727$tabsheet = new tabsheet(); 
     28$tabsheet->set_id('rating'); 
    2829$tabsheet->add('rating', l10n('Photos'), get_root_url().'admin.php?page=rating'); 
    2930$tabsheet->add('rating_user', l10n('Users'), get_root_url().'admin.php?page=rating_user'); 
  • trunk/admin/themes.php

    r12922 r16925  
    3737 
    3838$tabsheet = new tabsheet(); 
     39$tabsheet->set_id('themes'); 
    3940$tabsheet->add('installed', l10n('Installed Themes'), $my_base_url.'&tab=installed'); 
    4041$tabsheet->add('update', l10n('Check for updates'), $my_base_url.'&tab=update'); 
  • trunk/admin/updates.php

    r10511 r16925  
    3535 
    3636$tabsheet = new tabsheet(); 
     37$tabsheet->set_id('updates'); 
    3738$tabsheet->add('pwg', l10n('Piwigo Update'), $my_base_url); 
    3839$tabsheet->add('ext', l10n('Extensions Update'), $my_base_url.'&tab=ext'); 
Note: See TracChangeset for help on using the changeset viewer.