Adding missing skills files

skala
Julio Montoya 13 years ago
parent e9badfb14a
commit cec719d15b
  1. 20
      main/social/home.php
  2. 61
      main/social/skills_ranking.php
  3. 0
      main/social/skills_wheel.php
  4. 5
      main/template/default/skill/skill_ranking.tpl
  5. 0
      main/template/default/skill/skill_wheel.js.tpl
  6. 1071
      main/template/default/skill/skill_wheel_student.tpl

@ -63,7 +63,8 @@ $social_left_content = SocialManager::show_social_menu('home');
$social_right_content .= '<div class="span5">';
$social_right_content .= '<div class="social-groups-home-title">'.get_lang('ContactInformation').'</div>';
$social_right_content .= '<div class="well_border">';
$social_right_content .= '<h3>'.get_lang('ContactInformation').'</h3>';
$list = array(
array('title' => get_lang('Name'), 'content' => api_get_person_name($user_info['firstname'], $user_info['lastname'])),
@ -76,13 +77,19 @@ $social_right_content .= '
<a class="btn" href="'.api_get_path(WEB_PATH).'main/auth/profile.php">
'.get_lang('EditProfile').'
</a>
</div>';
</div></div>';
if (api_get_setting('allow_skills_tool') == 'true') {
$social_right_content .= '<div class="well_border">';
$skill = new Skill();
$skill_ranking = $skill->get_user_skill_ranking(api_get_user_id());
$url = api_get_path(WEB_CODE_PATH).'social/skills_ranking.php';
$social_right_content .= Display::url(sprintf(get_lang('YourSkillRanking'), $ranking), $url);
$skill = new Skill();
$skills = $skill->get_user_skills(api_get_user_id(), true);
$social_right_content .= '<div class="social-groups-home-title">'.get_lang('Skills').'</div>';
$social_right_content .= '<h3>'.get_lang('Skills').'</h3>';
$lis = '';
if (!empty($skills)) {
foreach($skills as $skill) {
@ -90,8 +97,9 @@ $social_right_content .= '
}
$social_right_content .= Display::tag('ul', $lis);
}
$url = api_get_path(WEB_CODE_PATH).'social/skills_tree.php';
$social_right_content .= Display::url(get_lang('ViewSkillsTree'), $url);
$url = api_get_path(WEB_CODE_PATH).'social/skills_wheel.php';
$social_right_content .= Display::url(get_lang('ViewSkillsWheel'), $url);
$social_right_content .= '</div>';
}
$social_right_content .= '</div>';
@ -165,4 +173,4 @@ $content = $tpl->fetch($social_layout);
$tpl->assign('actions', $actions);
$tpl->assign('message', $message);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
$tpl->display_one_col_template();

@ -0,0 +1,61 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/**
* @package chamilo.social
* @author Julio Montoya <gugli100@gmail.com>
*/
/**
* Initialization
*/
$language_file = array('userInfo');
$cidReset = true;
require_once '../inc/global.inc.php';
//Add the JS needed to use the jqgrid
$htmlHeadXtra[] = api_get_jqgrid_js();
$interbreadcrumb[] = array("url" => "index.php","name" => get_lang('Skills'));
//jqgrid will use this URL to do the selects
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_user_skill_ranking';
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Photo'), get_lang('Firstname'), get_lang('Lastname'), get_lang('SkillsAcquired'),
get_lang('CurrentlyLearning'), get_lang('Rank'));
$column_model = array(
array('name'=>'photo', 'index'=>'photo', 'width'=>'20', 'align'=>'center', 'sortable' => 'false'),
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'80', 'align'=>'left', 'sortable' => 'false'),
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'80', 'align'=>'left', 'sortable' => 'false'),
array('name'=>'skills_acquired', 'index'=>'skills_acquired', 'width'=>'40 ', 'align'=>'left', 'sortable' => 'false'),
array('name'=>'currently_learning', 'index'=>'currently_learning', 'width'=>'40', 'align'=>'left', 'sortable' => 'false'),
array('name'=>'rank', 'index'=>'rank', 'width'=>'30', 'align'=>'left', 'sortable' => 'false')
);
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
//$extra_params['excel'] = 'excel';
$extra_params['rowList'] = array(10, 20 ,30);
$jqgrid = Display::grid_js('skill_ranking', $url,$columns,$column_model,$extra_params, array(), $action_links,true);
$content = Display::grid_html('skill_ranking');
$tpl = new Template($tool_name);
$tpl->assign('actions', $actions);
$tpl->assign('message', $message);
$tpl->assign('jqgrid_html', $jqgrid);
$content .= $tpl->fetch('default/skill/skill_ranking.tpl');
$tpl->assign('content', $content);
$tpl->display_one_col_template();

@ -0,0 +1,5 @@
<script>
$(function() {
{{ jqgrid_html }}
});
</script>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save