From 1d23e75bdf4be1b39a8460acda54243f85b52168 Mon Sep 17 00:00:00 2001 From: Imanol Losada Date: Thu, 19 Feb 2015 16:36:21 -0500 Subject: [PATCH] Add right click modal to profile skill wheel - refs BT#9413 --- main/admin/skills_wheel.php | 1 + .../template/default/skill/skill_wheel.js.tpl | 57 +++++++++++-------- .../default/skill/skill_wheel_student.tpl | 50 ++++++++++++++++ 3 files changed, 85 insertions(+), 23 deletions(-) diff --git a/main/admin/skills_wheel.php b/main/admin/skills_wheel.php index 539a0b1dca..4965a9a751 100755 --- a/main/admin/skills_wheel.php +++ b/main/admin/skills_wheel.php @@ -46,6 +46,7 @@ $tpl->assign('wheel_url', $url); $url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1'; $tpl->assign('url', $url); +$tpl->assign('isAdministration', true); $content = $tpl->fetch('default/skill/skill_wheel.tpl'); $tpl->assign('content', $content); diff --git a/main/template/default/skill/skill_wheel.js.tpl b/main/template/default/skill/skill_wheel.js.tpl index f2a1e8b21b..25f5483e4e 100755 --- a/main/template/default/skill/skill_wheel.js.tpl +++ b/main/template/default/skill/skill_wheel.js.tpl @@ -324,10 +324,16 @@ function open_popup(skill_id, parent_id) { if (skill) { var parent_info = get_skill_info(skill.extra.parent_id); - $("#id").attr('value', skill.id); - $("#name").attr('value', skill.name); - $("#short_code").attr('value', skill.short_code); - $("#description").attr('value', skill.description); + if ("{{ isAdministration }}") { + $("#id").attr('value', skill.id); + $("#name").attr('value', skill.name); + $("#short_code").attr('value', skill.short_code); + $("#description").attr('value', skill.description); + } else { + $("#name").text(skill.name); + $("#short_code").text(skill.short_code); + $("#description").text(skill.description); + } //Filling parent_id $("#parent_id").append('