custom tabs

skala
arnaud 15 years ago
parent 3f6833f940
commit 2d87b71e85
  1. 8
      main/inc/banner.inc.php
  2. 6
      main/inc/lib/banner.lib.php
  3. 19
      main/install/db_main.sql
  4. 10
      main/install/migrate-db-1.8.6.2-1.8.7-pre.sql
  5. 15
      main/lang/english/admin.inc.php
  6. 16
      main/lang/french/admin.inc.php

@ -272,6 +272,14 @@ if ($_user['user_id'] && !api_is_anonymous()) {
$menu_navigation['reports'] = $possible_tabs['reports']; $menu_navigation['reports'] = $possible_tabs['reports'];
} }
// Custom tabs
for ($i=1;$i<=3;$i++)
if (api_get_setting('show_tabs', 'custom_tab_'.$i) == 'true') {
$navigation['custom_tab_'.$i] = $possible_tabs['custom_tab_'.$i];
} else{
$menu_navigation['custom_tab_'.$i] = $possible_tabs['custom_tab_'.$i];
}
// Administration // Administration
if (api_is_platform_admin(true)) { if (api_is_platform_admin(true)) {
if (api_get_setting('show_tabs', 'platform_administration') == 'true') { if (api_get_setting('show_tabs', 'platform_administration') == 'true') {

@ -81,6 +81,12 @@ function get_tabs() {
$navigation['reports']['title'] = get_lang('Reports'); $navigation['reports']['title'] = get_lang('Reports');
} }
// Custom tabs
for ($i = 1; $i<=3; $i++)
if (api_get_setting('custom_tab_'.$i.'_name') && api_get_setting('custom_tab_'.$i.'_url')) {
$navigation['custom_tab_'.$i]['url'] = api_get_setting('custom_tab_'.$i.'_url');
$navigation['custom_tab_'.$i]['title'] = api_get_setting('custom_tab_'.$i.'_name');
}
// Platform administration // Platform administration
if (api_is_platform_admin(true)) { if (api_is_platform_admin(true)) {

@ -777,11 +777,20 @@ VALUES
('student_page_after_login', NULL, 'textfield', 'Platform', '', 'StudentPageAfterLoginTitle', 'StudentPageAfterLoginComment', NULL, NULL, 0), ('student_page_after_login', NULL, 'textfield', 'Platform', '', 'StudentPageAfterLoginTitle', 'StudentPageAfterLoginComment', NULL, NULL, 0),
('teacher_page_after_login', NULL, 'textfield', 'Platform', '', 'TeacherPageAfterLoginTitle', 'TeacherPageAfterLoginComment', NULL, NULL, 0), ('teacher_page_after_login', NULL, 'textfield', 'Platform', '', 'TeacherPageAfterLoginTitle', 'TeacherPageAfterLoginComment', NULL, NULL, 0),
('DRH_page_after_login', NULL, 'textfield', 'Platform', '', 'DRHPageAfterLoginTitle', 'DRHPageAfterLoginComment', NULL, NULL, 0), ('DRH_page_after_login', NULL, 'textfield', 'Platform', '', 'DRHPageAfterLoginTitle', 'DRHPageAfterLoginComment', NULL, NULL, 0),
('sessionadmin_page_after_login', NULL, 'textfield', 'Platform', '', 'SessionAdminPageAfterLoginTitle', 'SessionAdminPageAfterLoginComment', NULL, NULL, 0); ('sessionadmin_page_after_login', NULL, 'textfield', 'Platform', '', 'SessionAdminPageAfterLoginTitle', 'SessionAdminPageAfterLoginComment', NULL, NULL, 0),
('student_autosubscribe', NULL, 'textfield', 'Platform', '', 'StudentAutosubscribeTitle', 'StudentAutosubscribeComment', NULL, NULL, 0); ('student_autosubscribe', NULL, 'textfield', 'Platform', '', 'StudentAutosubscribeTitle', 'StudentAutosubscribeComment', NULL, NULL, 0),
('teacher_autosubscribe', NULL, 'textfield', 'Platform', '', 'TeacherAutosubscribeTitle', 'TeacherAutosubscribeComment', NULL, NULL, 0); ('teacher_autosubscribe', NULL, 'textfield', 'Platform', '', 'TeacherAutosubscribeTitle', 'TeacherAutosubscribeComment', NULL, NULL, 0),
('DRH_autosubscribe', NULL, 'textfield', 'Platform', '', 'DRHAutosubscribeTitle', 'DRHAutosubscribeComment', NULL, NULL, 0); ('DRH_autosubscribe', NULL, 'textfield', 'Platform', '', 'DRHAutosubscribeTitle', 'DRHAutosubscribeComment', NULL, NULL, 0),
('sessionadmin_autosubscribe', NULL, 'textfield', 'Platform', '', 'SessionadminAutosubscribeTitle', 'SessionadminAutosubscribeComment', NULL, NULL, 0); ('sessionadmin_autosubscribe', NULL, 'textfield', 'Platform', '', 'SessionadminAutosubscribeTitle', 'SessionadminAutosubscribeComment', NULL, NULL, 0),
('show_tabs', 'custom_tab_1', 'checkbox', 'Platform', 'false', 'ShowTabsTitle', 'ShowTabsComment', NULL, 'TabsCustom1', 1),
('show_tabs', 'custom_tab_2', 'checkbox', 'Platform', 'false', 'ShowTabsTitle', 'ShowTabsComment', NULL, 'TabsCustom2', 1),
('show_tabs', 'custom_tab_3', 'checkbox', 'Platform', 'false', 'ShowTabsTitle', 'ShowTabsComment', NULL, 'TabsCustom3', 1),
('custom_tab_1_name', NULL, 'textfield', 'Platform', '', 'CustomTab1NameTitle', 'CustomTab1NameComment', NULL, NULL, 0),
('custom_tab_1_url', NULL, 'textfield', 'Platform', '', 'CustomTab1URLTitle', 'CustomTab1URLComment', NULL, NULL, 0),
('custom_tab_2_name', NULL, 'textfield', 'Platform', '', 'CustomTab2NameTitle', 'CustomTab2NameComment', NULL, NULL, 0),
('custom_tab_2_url', NULL, 'textfield', 'Platform', '', 'CustomTab2URLTitle', 'CustomTab2URLComment', NULL, NULL, 0),
('custom_tab_3_name', NULL, 'textfield', 'Platform', '', 'CustomTab3NameTitle', 'CustomTab3NameComment', NULL, NULL, 0),
('custom_tab_3_url', NULL, 'textfield', 'Platform', '', 'CustomTab3URLTitle', 'CustomTab3URLComment', NULL, NULL, 0);
UNLOCK TABLES; UNLOCK TABLES;

@ -119,6 +119,16 @@ INSERT INTO settings_current (variable, subkey, type, category, selected_value,
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('teacher_autosubscribe', NULL, 'textfield', 'Platform', '', 'StudentAutosubscribeTitle', 'StudentAutosubscribeComment', NULL, NULL, 0); INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('teacher_autosubscribe', NULL, 'textfield', 'Platform', '', 'StudentAutosubscribeTitle', 'StudentAutosubscribeComment', NULL, NULL, 0);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('DRH_autosubscribe', NULL, 'textfield', 'Platform', '', 'StudentAutosubscribeTitle', 'StudentAutosubscribeComment', NULL, NULL, 0); INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('DRH_autosubscribe', NULL, 'textfield', 'Platform', '', 'StudentAutosubscribeTitle', 'StudentAutosubscribeComment', NULL, NULL, 0);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('sessionadmin_autosubscribe', NULL, 'textfield', 'Platform', '', 'StudentAutosubscribeTitle', 'StudentAutosubscribeComment', NULL, NULL, 0); INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('sessionadmin_autosubscribe', NULL, 'textfield', 'Platform', '', 'StudentAutosubscribeTitle', 'StudentAutosubscribeComment', NULL, NULL, 0);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('show_tabs', 'custom_tab_1', 'checkbox', 'Platform', 'false', 'ShowTabsTitle', 'ShowTabsComment', NULL, 'TabsCustom1', 1);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('show_tabs', 'custom_tab_2', 'checkbox', 'Platform', 'false', 'ShowTabsTitle', 'ShowTabsComment', NULL, 'TabsCustom2', 1);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('show_tabs', 'custom_tab_3', 'checkbox', 'Platform', 'false', 'ShowTabsTitle', 'ShowTabsComment', NULL, 'TabsCustom3', 1);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('custom_tab_1_name', NULL, 'textfield', 'Platform', '', 'CustomTab1NameTitle', 'CustomTab1NameComment', NULL, NULL, 0);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('custom_tab_1_url', NULL, 'textfield', 'Platform', '', 'CustomTab1URLTitle', 'CustomTab1URLComment', NULL, NULL, 0);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('custom_tab_2_name', NULL, 'textfield', 'Platform', '', 'CustomTab2NameTitle', 'CustomTab2NameComment', NULL, NULL, 0);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('custom_tab_2_url', NULL, 'textfield', 'Platform', '', 'CustomTab2URLTitle', 'CustomTab2URLComment', NULL, NULL, 0);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('custom_tab_3_name', NULL, 'textfield', 'Platform', '', 'CustomTab3NameTitle', 'CustomTab3NameComment', NULL, NULL, 0);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES('custom_tab_3_url', NULL, 'textfield', 'Platform', '', 'CustomTab3URLTitle', 'CustomTab3URLComment', NULL, NULL, 0);
CREATE TABLE `event_type` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `name_lang_var` varchar(40) NOT NULL, `desc_lang_var` varchar(50) NOT NULL, PRIMARY KEY (`id`)); CREATE TABLE `event_type` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `name_lang_var` varchar(40) NOT NULL, `desc_lang_var` varchar(50) NOT NULL, PRIMARY KEY (`id`));
CREATE TABLE `event_type_message` (`id` int(11) NOT NULL AUTO_INCREMENT, `event_type_id` int(11) NOT NULL,`language_id` int(11) NOT NULL, `message` varchar(200) NOT NULL, `subject` varchar(60) NOT NULL, PRIMARY KEY (`id`)); CREATE TABLE `event_type_message` (`id` int(11) NOT NULL AUTO_INCREMENT, `event_type_id` int(11) NOT NULL,`language_id` int(11) NOT NULL, `message` varchar(200) NOT NULL, `subject` varchar(60) NOT NULL, PRIMARY KEY (`id`));
CREATE TABLE `user_rel_event_type` (`id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `event_type_id` int(11) NOT NULL, PRIMARY KEY (`id`)); CREATE TABLE `user_rel_event_type` (`id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `event_type_id` int(11) NOT NULL, PRIMARY KEY (`id`));

@ -1311,6 +1311,21 @@ $DRHAutosubscribeTitle = "Auto subscribe DRH to following courses";
$DRHAutosubscribeComment = "Course code separated by '|'"; $DRHAutosubscribeComment = "Course code separated by '|'";
$SessionadminAutosubscribeTitle = "Auto subscribe sessionadmin to following courses"; $SessionadminAutosubscribeTitle = "Auto subscribe sessionadmin to following courses";
$SessionadminAutosubscribeComment = "Course code separated by '|'"; $SessionadminAutosubscribeComment = "Course code separated by '|'";
$TabsCustom1 = "Custom tab 1";
$TabsCustom2 = "Custom tab 2";
$TabsCustom3 = "Custom tab 3";
$CustomTab1NameTitle = "Custom tab 1 Name";
$CustomTab2NameTitle = "Custom tab 2 Name";
$CustomTab3NameTitle = "Custom tab 3 Name";
$CustomTab1URLTitle = "Custom tab 1 URL";
$CustomTab2URLTitle = "Custom tab 2 URL";
$CustomTab3URLTitle = "Custom tab 3 URL";
$CustomTab1NameComment = "";
$CustomTab2NameComment = "";
$CustomTab3NameComment = "";
$CustomTab1URLComment = "";
$CustomTab2URLComment = "";
$CustomTab3URLComment = "";
$event_title = 'Events notifications manager'; $event_title = 'Events notifications manager';
$GroupParentship = 'Parent group'; $GroupParentship = 'Parent group';
$NoParentship = 'No parent group'; $NoParentship = 'No parent group';

@ -1288,7 +1288,21 @@ $DRHAutosubscribeTitle = "Inscrire automatiquement les DRH aux cours suivants";
$DRHAutosubscribeComment = "Codes de cours séparé par '|'"; $DRHAutosubscribeComment = "Codes de cours séparé par '|'";
$SessionadminAutosubscribeTitle = "Inscrire automatiquement les administrateurs de session aux cours suivants"; $SessionadminAutosubscribeTitle = "Inscrire automatiquement les administrateurs de session aux cours suivants";
$SessionadminAutosubscribeComment = "Codes de cours séparé par '|'"; $SessionadminAutosubscribeComment = "Codes de cours séparé par '|'";
$TabsCustom1 = "Onglet personalisé 1";
$TabsCustom2 = "Onglet personalisé 2";
$TabsCustom3 = "Onglet personalisé 3";
$CustomTab1NameTitle = "Nom de l'onglet personalisé 1";
$CustomTab2NameTitle = "Nom de l'onglet personalisé 2";
$CustomTab3NameTitle = "Nom de l'onglet personalisé 3";
$CustomTab1URLTitle = "URL de l'onglet personalisé 1";
$CustomTab2URLTitle = "URL de l'onglet personalisé 2";
$CustomTab3URLTitle = "URL de l'onglet personalisé 3";
$CustomTab1NameComment = "";
$CustomTab2NameComment = "";
$CustomTab3NameComment = "";
$CustomTab1URLComment = "";
$CustomTab2URLComment = "";
$CustomTab3URLComment = "";
$events_title = 'Gestion des évenements'; $events_title = 'Gestion des évenements';
$GroupParentship = 'Groupe parent'; $GroupParentship = 'Groupe parent';
$NoParentship = 'Aucun groupe parent'; $NoParentship = 'Aucun groupe parent';

Loading…
Cancel
Save