source: branches/2.7/admin/include/add_core_tabs.inc.php @ 30973

Last change on this file since 30973 was 30973, checked in by plg, 9 years ago

merge r30972 from trunk to branch 2.7

bug 3203 fixed: for IE, explicit the url even for staying on the same page

File size: 9.2 KB
RevLine 
[16928]1<?php
2// +-----------------------------------------------------------------------+
3// | Piwigo - a PHP based photo gallery                                    |
4// +-----------------------------------------------------------------------+
[26461]5// | Copyright(C) 2008-2014 Piwigo Team                  http://piwigo.org |
[16928]6// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
7// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
8// +-----------------------------------------------------------------------+
9// | This program is free software; you can redistribute it and/or modify  |
10// | it under the terms of the GNU General Public License as published by  |
11// | the Free Software Foundation                                          |
12// |                                                                       |
13// | This program is distributed in the hope that it will be useful, but   |
14// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
15// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
16// | General Public License for more details.                              |
17// |                                                                       |
18// | You should have received a copy of the GNU General Public License     |
19// | along with this program; if not, write to the Free Software           |
20// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
21// | USA.                                                                  |
22// +-----------------------------------------------------------------------+
23
[28714]24add_event_handler('tabsheet_before_select', 'add_core_tabs', 0);
[16928]25
26function add_core_tabs($sheets, $tab_id)
27{
28  switch($tab_id)
29  {
30    case 'album':
31      global $admin_album_base_url;
[23382]32      $sheets['properties'] = array('caption' => '<span class="icon-pencil"></span>'.l10n('Properties'), 'url' => $admin_album_base_url.'-properties');
[23029]33      $sheets['sort_order'] = array('caption' => '<span class="icon-shuffle"></span>'.l10n('Manage photo ranks'), 'url' => $admin_album_base_url.'-sort_order');
34      $sheets['permissions'] = array('caption' => '<span class="icon-lock"></span>'.l10n('Permissions'), 'url' => $admin_album_base_url.'-permissions');
35      $sheets['notification'] = array('caption' => '<span class="icon-mail-alt"></span>'.l10n('Notification'), 'url' => $admin_album_base_url.'-notification');
[16928]36      break;
[28714]37
[16928]38    case 'albums':
39      global $my_base_url;
[23382]40      $sheets['list'] = array('caption' => '<span class="icon-menu"></span>'.l10n('List'), 'url' => $my_base_url.'cat_list');
41      $sheets['move'] = array('caption' => '<span class="icon-move"></span>'.l10n('Move'), 'url' => $my_base_url.'cat_move');
[23029]42      $sheets['permalinks'] = array('caption' => '<span class="icon-link"></span>'.l10n('Permalinks'), 'url' => $my_base_url.'permalinks');
[16928]43      break;
[28714]44
[16928]45    case 'batch_manager':
46      global $manager_link;
47      $sheets['global'] = array('caption' => l10n('global mode'), 'url' => $manager_link.'global');
48      $sheets['unit'] = array('caption' => l10n('unit mode'), 'url' => $manager_link.'unit');
49      break;
[28714]50
[16928]51    case 'cat_options':
52      global $link_start, $conf;
[23029]53      $sheets['status'] = array('caption' => '<span class="icon-lock"></span>'.l10n('Public / Private'), 'url' => $link_start.'cat_options&amp;section=status');
54      $sheets['visible'] = array('caption' => '<span class="icon-block"></span>'.l10n('Lock'), 'url' => $link_start.'cat_options&amp;section=visible');
[16928]55      if ($conf['activate_comments'])
[23029]56        $sheets['comments'] = array('caption' => '<span class="icon-chat"></span>'.l10n('Comments'), 'url' => $link_start.'cat_options&amp;section=comments');
[16928]57      if ($conf['allow_random_representative'])
58        $sheets['representative'] = array('caption' => l10n('Representative'), 'url' => $link_start.'cat_options&amp;section=representative');
59      break;
[28714]60
[16928]61    case 'comments':
[30973]62      global $my_base_url;
63      $sheets[''] = array('caption' => l10n('User comments'), 'url' => $my_base_url.'comments');
[16928]64      break;
[25237]65
66    case 'users':
[30973]67      global $my_base_url;
68      $sheets[''] = array('caption' => '<span class="icon-users"> </span>'.l10n('User list'), 'url' => $my_base_url.'user_list');
[25237]69      break;
[25449]70
71    case 'groups':
[30973]72      global $my_base_url;
73      $sheets[''] = array('caption' => '<span class="icon-group"> </span>'.l10n('Groups'), 'url' => $my_base_url.'group_list');
[25449]74      break;
75
[16928]76    case 'configuration':
77      global $conf_link;
[25372]78      $sheets['main'] = array('caption' => l10n('General'), 'url' => $conf_link.'main');
[16928]79      $sheets['sizes'] = array('caption' => l10n('Photo sizes'), 'url' => $conf_link.'sizes');
80      $sheets['watermark'] = array('caption' => l10n('Watermark'), 'url' => $conf_link.'watermark');
81      $sheets['display'] = array('caption' => l10n('Display'), 'url' => $conf_link.'display');
82      $sheets['comments'] = array('caption' => l10n('Comments'), 'url' => $conf_link.'comments');
83      $sheets['default'] = array('caption' => l10n('Guest Settings'), 'url' => $conf_link.'default');
84      break;
[28714]85
[16928]86    case 'help':
87      global $help_link;
88      $sheets['add_photos'] = array('caption' => l10n('Add Photos'), 'url' => $help_link.'add_photos');
89      $sheets['permissions'] = array('caption' => l10n('Permissions'), 'url' => $help_link.'permissions');
90      $sheets['groups'] = array('caption' => l10n('Groups'), 'url' => $help_link.'groups');
91      $sheets['virtual_links'] = array('caption' => l10n('Virtual Links'), 'url' => $help_link.'virtual_links');
92      $sheets['misc'] = array('caption' => l10n('Miscellaneous'), 'url' => $help_link.'misc');
93      break;
[28714]94
[16928]95    case 'history':
96      global $link_start;
[23382]97      $sheets['stats'] = array('caption' => '<span class="icon-signal"></span>'.l10n('Statistics'), 'url' => $link_start.'stats');
98      $sheets['history'] = array('caption' => '<span class="icon-search"></span>'.l10n('Search'), 'url' => $link_start.'history');
[16928]99      break;
[28714]100
[16928]101    case 'languages':
102      global $my_base_url;
[23382]103      $sheets['installed'] = array('caption' => '<span class="icon-language"></span>'.l10n('Installed Languages'), 'url' => $my_base_url.'&amp;tab=installed');
104      $sheets['update'] = array('caption' => '<span class="icon-arrows-cw"></span>'.l10n('Check for updates'), 'url' => $my_base_url.'&amp;tab=update');
105      $sheets['new'] = array('caption' => '<span class="icon-plus-circled"></span>'.l10n('Add New Language'), 'url' => $my_base_url.'&amp;tab=new');
[16928]106      break;
[28714]107
[16928]108    case 'nbm':
109      global $base_url;
110      $sheets['param'] = array('caption' => l10n('Parameter'), 'url' => $base_url.'?page=notification_by_mail&amp;mode=param');
111      $sheets['subscribe'] = array('caption' => l10n('Subscribe'), 'url' => $base_url.'?page=notification_by_mail&amp;mode=subscribe');
112      $sheets['send'] = array('caption' => l10n('Send'), 'url' => $base_url.'?page=notification_by_mail&amp;mode=send');
113      break;
[28714]114
[16928]115    case 'photo':
116      global $admin_photo_base_url;
117      $sheets['properties'] = array('caption' => l10n('Properties'), 'url' => $admin_photo_base_url.'-properties');
[23029]118      $sheets['coi'] = array('caption' => '<span class="icon-crop"></span>'.l10n('Center of interest'), 'url' => $admin_photo_base_url.'-coi');
[16928]119      break;
[28714]120
[16928]121    case 'photos_add':
122      global $conf;
[23382]123      $sheets['direct'] = array('caption' => '<span class="icon-upload"></span>'.l10n('Web Form'), 'url' => PHOTOS_ADD_BASE_URL.'&amp;section=direct');
124      $sheets['applications'] = array('caption' => '<span class="icon-network"></span>'.l10n('Applications'), 'url' => PHOTOS_ADD_BASE_URL.'&amp;section=applications');
[16928]125      if ($conf['enable_synchronization'])
[23382]126        $sheets['ftp'] = array('caption' => '<span class="icon-exchange"></span>'.l10n('FTP + Synchronization'), 'url' => PHOTOS_ADD_BASE_URL.'&amp;section=ftp');
[16928]127      break;
[28714]128
[16928]129    case 'plugins':
130      global $my_base_url;
[23382]131      $sheets['installed'] = array('caption' => '<span class="icon-equalizer"></span>'.l10n('Plugin list'), 'url' => $my_base_url.'&amp;tab=installed');
132      $sheets['update'] = array('caption' => '<span class="icon-arrows-cw"></span>'.l10n('Check for updates'), 'url' => $my_base_url.'&amp;tab=update');
133      $sheets['new'] = array('caption' => '<span class="icon-plus-circled"></span>'.l10n('Other plugins'), 'url' => $my_base_url.'&amp;tab=new');
[16928]134      break;
[28714]135
[16928]136    case 'rating':
137      $sheets['rating'] = array('caption' => l10n('Photos'), 'url' => get_root_url().'admin.php?page=rating');
138      $sheets['rating_user'] = array('caption' => l10n('Users'), 'url' => get_root_url().'admin.php?page=rating_user');
139      break;
[28714]140
[16928]141    case 'themes':
142      global $my_base_url;
[23382]143      $sheets['installed'] = array('caption' => '<span class="icon-brush"></span>'.l10n('Installed Themes'), 'url' => $my_base_url.'&amp;tab=installed');
144      $sheets['update'] = array('caption' => '<span class="icon-arrows-cw"></span>'.l10n('Check for updates'), 'url' => $my_base_url.'&amp;tab=update');
145      $sheets['new'] = array('caption' => '<span class="icon-plus-circled"></span>'.l10n('Add New Theme'), 'url' => $my_base_url.'&amp;tab=new');
[16928]146      break;
[28714]147
[16928]148    case 'updates':
149      global $my_base_url;
150      $sheets['pwg'] = array('caption' => l10n('Piwigo Update'), 'url' => $my_base_url);
151      $sheets['ext'] = array('caption' => l10n('Extensions Update'), 'url' => $my_base_url.'&amp;tab=ext');
152      break;
153  }
[28714]154
[16928]155  return $sheets;
156}
157
158?>
Note: See TracBrowser for help on using the repository browser.