Displays grades and education names in admin tableditor. Closes #1124
authorPascal Corpet <pascal.corpet@m4x.org>
Thu, 24 Jun 2010 20:30:08 +0000 (22:30 +0200)
committerPascal Corpet <pascal.corpet@m4x.org>
Thu, 24 Jun 2010 20:30:08 +0000 (22:30 +0200)
ChangeLog
core
modules/profile.php

index 125ac8e..2f7957c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,7 @@ Bug/Wish:
         - #891: Improves education display                                 -JAC
         - #1068: Fixes addresses display on profile                        -JAC
         - #1081: Sorts language alphabetically in skill tab                -Car
+        - #1124: Displays grades and education names in admin tableditor   -Car
 
     * Search:
         - #870: Fixes region selection when choosing country from list     -Car
diff --git a/core b/core
index 4744b16..7381c10 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 4744b162d3be758e6a2b709d0e4132b0acb4336d
+Subproject commit 7381c10d8fcd28dc4393f9fb2cc25a1c266e7dfd
index b3e04a7..d0c33ea 100644 (file)
@@ -740,8 +740,16 @@ class ProfileModule extends PLModule
         $page->setTitle('Administration - Correspondances formations - niveau de formation');
         $page->assign('title', 'Gestion des correspondances formations - niveau de formation');
         $table_editor = new PLTableEditor('admin/education_degree_set', 'profile_education_degree', 'eduid', true);
-        $table_editor->describe('eduid', 'formation', true);
-        $table_editor->describe('degreeid', 'niveau', true);
+        $table_editor->describe('eduid', 'id formation', true);
+        $table_editor->describe('degreeid', 'id niveau', true);
+
+        // Adds fields to show the names of education
+        $table_editor->add_option_table('profile_education_enum','profile_education_enum.id = eduid');
+        $table_editor->add_option_field('profile_education_enum.name', 'edu_name', 'formation', null, 'degreeid');
+        // Adds fields to show the names of degrees
+        $table_editor->add_option_table('profile_education_degree_enum','profile_education_degree_enum.id = t.degreeid');
+        $table_editor->add_option_field('profile_education_degree_enum.degree', 'degree_name', 'niveau');
+
         $table_editor->apply($page, $action, $id);
     }
     function handler_admin_sections(&$page, $action = 'list', $id = null) {