diff --git a/main/css/base.css b/main/css/base.css index d150a485ac..97af853832 100755 --- a/main/css/base.css +++ b/main/css/base.css @@ -3334,6 +3334,214 @@ form .formw .freeze { } /* jsPlumb */ +/* **************************************************** + CSS SKILL + **************************************************** */ +.skill-options .legend{ + border: 1px dashed #cccccc; + padding: 1em; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + margin-bottom: 1em; + margin-top: 1em; + background-color: #FFFFFF; +} +.skill-options .legend .title-skill, +.skill-options .saved_profiles .title-skill +{ + color: #666655; + padding-bottom: 1em; + font-size: 16px; +} +.skill-options .skill-profile .title-skill{ + color: #666655; + padding-bottom: .5em; + font-size: 18px; +} +.skill-options .skill-home{ + margin-top: 1em; +} +.skill-options .btn-block { + box-sizing: border-box; + display: block; + padding-left: 0; + padding-right: 0; + width: 100%; +} +.skill-options .accordion-heading { + border-bottom: 0px none; + background: #3FA5C3; +} +.skill-options .accordion-heading a{ + color: #FFFFFF; +} +.skill-options .button-skill{ + margin-top: 1em; +} +.skill-options .form-search .holder{ + border: 1px solid #cccccc; + padding-left: .5em; + padding-right: .5em; +} +.skill-options .accordion-inner { + padding: 9px 15px; + /*border: 1px solid #dadada;*/ + background-color: #FFFFFF; +} +.skill-options .items_save{ + margin-top: .5em; + margin-bottom: .5em; + display: inline-block; + height: auto !important; + clear: both; + width: 100%; +} +.skill-options .accordion-group { + margin-bottom: 2px; + border: 1px solid #3FA5C3; + border-radius: 4px; +} +.skill-options .accordion-inner { + padding: 9px 15px; + border-top: 1px solid #3FA5C3; +} +.skill-options .load_wheel{ + -moz-border-radius:6px; + -webkit-border-radius:6px; + border-radius:6px; + border:1px solid #C09853; + background:#FCF8E3; + padding:1px 5px 2px; + color:#333; +} +.skill-options .skill-items{ + padding-bottom: 1em; + margin-bottom: .5em; + margin-top: .5em; +} +.skill-options .skill-winner{ + list-style: none; + margin: 0; + padding: 0; +} +.skill-options .skill-winner li{ + float: left; + margin-right: 1em; + padding-bottom: 1em; +} +.skill-options .skill-winner li a{ + background: url("../img/icons/16/winner.png") no-repeat; + padding-left: 1.5em; + padding-bottom: 1em; +} +.skill-options .skill-profile{ + width: 100%; + display: block; + border: 1px solid #CCC; + border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + margin-top: 1em; + background-color: #FFFFFF; + padding-top: .5em; + padding-bottom: .5em; +} +.skill-options .section-info-skill{ + display: inline-block; + padding-top: .5em; + padding-bottom: .5em; + width: 100%; + clear: both; +} +.skill-options .skill-profile .avatar{ + display: block; + width: auto; + text-align: center; +} +.skill-options .skill-profile .info-user{ + display: block; + width: auto; + margin-left: 1em; + padding: 1em; +} +.skill-options .button-skill{ + margin-bottom: .5em; +} +.page-items-profile{ + padding-top: 2em; + padding-bottom: 2em; + padding-left: 1em; + padding-right: 1em; +} +.page-items-profile .title-skill{ + margin-bottom: 1em; + font-size: 18px; + color: #333333; + margin-top: 1em; +} +.page-items-profile .block-items{ + display: block; + width: 22.5%; + margin:10px; + float: left; +} +.page-items-profile .award-items{ + list-style: none; + margin: 0; + padding: 0; +} +.page-items-profile .number-skill{ + background-color: #FFFFFF; + padding-top: .5em; + padding-bottom: .5em; + padding-left: .5em; + margin-bottom: 1em; + border: 1px solid #cccccc; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; +} +.page-items-profile .block-items .border-items{ + background-color: #EFEFEF; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + border: 1px solid #cccccc; +} +.page-items-profile .items-info{ + padding:1em; +} +.page-items-profile .info-profile{ + margin-top: 1em; + margin-bottom: .5em; +} +.page-items-profile .items-info .avatar-profile{ + text-align: center; + background: #FFFFFF; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + padding-bottom: 5px; + padding-top: 5px; + border: 1px solid #cccccc; +} +.skill_partition { + cursor: pointer; + stroke: #000000; + stroke-width: 0.5px; +} + +#skill_holder li { + float:left; + padding-right: 10px; + margin-bottom: .5em; +} + + +/* **************************************************** + END SKILL + **************************************************** */ .skill_root { box-shadow: 2px 2px 19px #aaa; @@ -4839,16 +5047,6 @@ i.size-32.icon-new-work{ } /* Default skill partition colors */ -.skill_partition { - cursor: pointer; - stroke: #000000; - stroke-width: 1.5; -} - -#skill_holder li { - float:left; - /*width: 120px;*/ -} #filepaths input{ margin-bottom:5px; diff --git a/main/img/icons/16/award_red.png b/main/img/icons/16/award_red.png new file mode 100644 index 0000000000..7675b93890 Binary files /dev/null and b/main/img/icons/16/award_red.png differ diff --git a/main/img/icons/16/award_red_na.png b/main/img/icons/16/award_red_na.png new file mode 100644 index 0000000000..5a5d3242c1 Binary files /dev/null and b/main/img/icons/16/award_red_na.png differ diff --git a/main/img/icons/16/winner.png b/main/img/icons/16/winner.png new file mode 100644 index 0000000000..4c303819d8 Binary files /dev/null and b/main/img/icons/16/winner.png differ diff --git a/main/img/icons/22/award_green.png b/main/img/icons/22/award_green.png new file mode 100644 index 0000000000..d358e4f47f Binary files /dev/null and b/main/img/icons/22/award_green.png differ diff --git a/main/img/icons/22/award_red.png b/main/img/icons/22/award_red.png new file mode 100644 index 0000000000..478b69129b Binary files /dev/null and b/main/img/icons/22/award_red.png differ diff --git a/main/img/icons/22/award_red_na.png b/main/img/icons/22/award_red_na.png new file mode 100644 index 0000000000..5ce6d1ff51 Binary files /dev/null and b/main/img/icons/22/award_red_na.png differ diff --git a/main/img/icons/22/award_red_start.png b/main/img/icons/22/award_red_start.png new file mode 100644 index 0000000000..83a0ca9ae2 Binary files /dev/null and b/main/img/icons/22/award_red_start.png differ diff --git a/main/img/icons/22/winner.png b/main/img/icons/22/winner.png new file mode 100644 index 0000000000..cc0845539e Binary files /dev/null and b/main/img/icons/22/winner.png differ diff --git a/main/img/icons/32/award_red.png b/main/img/icons/32/award_red.png new file mode 100644 index 0000000000..6242df7e5a Binary files /dev/null and b/main/img/icons/32/award_red.png differ diff --git a/main/img/icons/32/award_red_na.png b/main/img/icons/32/award_red_na.png new file mode 100644 index 0000000000..1284958ec8 Binary files /dev/null and b/main/img/icons/32/award_red_na.png differ diff --git a/main/inc/ajax/skill.ajax.php b/main/inc/ajax/skill.ajax.php index cd3c7c13c0..0f3c323cd3 100755 --- a/main/inc/ajax/skill.ajax.php +++ b/main/inc/ajax/skill.ajax.php @@ -263,7 +263,7 @@ switch ($action) { } if (!empty($ordered_user_list)) { - arsort($ordered_user_list); + krsort($ordered_user_list); } } @@ -332,6 +332,18 @@ switch ($action) { } } break; + case 'delete_profile': + if (api_is_platform_admin() || api_is_drh()) { + $profileId = $_REQUEST['profile']; + + $skillProfile = new SkillProfile(); + $isDeleted = $skillProfile->delete($profileId); + + echo json_encode(array( + 'status' => $isDeleted + )); + } + break; case 'skill_exists': $skill_data = $skill->get($_REQUEST['skill_id']); if (!empty($skill_data)) { diff --git a/main/inc/lib/javascript/d3/colorbrewer.js b/main/inc/lib/javascript/d3/colorbrewer.js index 7261590924..9595aa834c 100755 --- a/main/inc/lib/javascript/d3/colorbrewer.js +++ b/main/inc/lib/javascript/d3/colorbrewer.js @@ -6,7 +6,7 @@ var colorbrewer = { YlGn:{3:["rgb(247,252,185)","rgb(173,221,142)","rgb(49,163,84)"],4:["rgb(255,255,204)","rgb(194,230,153)","rgb(120,198,121)","rgb(35,132,67)"],5:["rgb(255,255,204)","rgb(194,230,153)","rgb(120,198,121)","rgb(49,163,84)","rgb(0,104,55)"],6:["rgb(255,255,204)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(49,163,84)","rgb(0,104,55)"],7:["rgb(255,255,204)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(65,171,93)","rgb(35,132,67)","rgb(0,90,50)"],8:["rgb(255,255,229)","rgb(247,252,185)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(65,171,93)","rgb(35,132,67)","rgb(0,90,50)"],9:["rgb(255,255,229)","rgb(247,252,185)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(65,171,93)","rgb(35,132,67)","rgb(0,104,55)","rgb(0,69,41)"]}, YlGnBu:{3:["rgb(237,248,177)","rgb(127,205,187)","rgb(44,127,184)"],4:["rgb(255,255,204)","rgb(161,218,180)","rgb(65,182,196)","rgb(34,94,168)"],5:["rgb(255,255,204)","rgb(161,218,180)","rgb(65,182,196)","rgb(44,127,184)","rgb(37,52,148)"],6:["rgb(255,255,204)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(44,127,184)","rgb(37,52,148)"],7:["rgb(255,255,204)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(29,145,192)","rgb(34,94,168)","rgb(12,44,132)"],8:["rgb(255,255,217)","rgb(237,248,177)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(29,145,192)","rgb(34,94,168)","rgb(12,44,132)"],9:["rgb(255,255,217)","rgb(237,248,177)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(29,145,192)","rgb(34,94,168)","rgb(37,52,148)","rgb(8,29,88)"]}, GnBu:{3:["rgb(224,243,219)","rgb(168,221,181)","rgb(67,162,202)"],4:["rgb(240,249,232)","rgb(186,228,188)","rgb(123,204,196)","rgb(43,140,190)"],5:["rgb(240,249,232)","rgb(186,228,188)","rgb(123,204,196)","rgb(67,162,202)","rgb(8,104,172)"],6:["rgb(240,249,232)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(67,162,202)","rgb(8,104,172)"],7:["rgb(240,249,232)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(78,179,211)","rgb(43,140,190)","rgb(8,88,158)"],8:["rgb(247,252,240)","rgb(224,243,219)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(78,179,211)","rgb(43,140,190)","rgb(8,88,158)"],9:["rgb(247,252,240)","rgb(224,243,219)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(78,179,211)","rgb(43,140,190)","rgb(8,104,172)","rgb(8,64,129)"]}, -BuGn:{3:["rgb(229,245,249)","rgb(153,216,201)","rgb(44,162,95)"],4:["rgb(237,248,251)","rgb(178,226,226)","rgb(102,194,164)","rgb(35,139,69)"],5:["rgb(237,248,251)","rgb(178,226,226)","rgb(102,194,164)","rgb(44,162,95)","rgb(0,109,44)"],6:["rgb(237,248,251)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(44,162,95)","rgb(0,109,44)"],7:["rgb(237,248,251)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,88,36)"],8:["rgb(247,252,253)","rgb(229,245,249)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,88,36)"],9:["rgb(247,252,253)","rgb(229,245,249)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,109,44)","rgb(0,68,27)"]}, +BuGn:{3:["rgb(229,245,249)","rgb(153git c,216,201)","rgb(44,162,95)"],4:["rgb(237,248,251)","rgb(178,226,226)","rgb(102,194,164)","rgb(35,139,69)"],5:["rgb(237,248,251)","rgb(178,226,226)","rgb(102,194,164)","rgb(44,162,95)","rgb(0,109,44)"],6:["rgb(237,248,251)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(44,162,95)","rgb(0,109,44)"],7:["rgb(237,248,251)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,88,36)"],8:["rgb(247,252,253)","rgb(229,245,249)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,88,36)"],9:["rgb(247,252,253)","rgb(229,245,249)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,109,44)","rgb(0,68,27)"]}, PuBuGn:{3:["rgb(236,226,240)","rgb(166,189,219)","rgb(28,144,153)"],4:["rgb(246,239,247)","rgb(189,201,225)","rgb(103,169,207)","rgb(2,129,138)"],5:["rgb(246,239,247)","rgb(189,201,225)","rgb(103,169,207)","rgb(28,144,153)","rgb(1,108,89)"],6:["rgb(246,239,247)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(28,144,153)","rgb(1,108,89)"],7:["rgb(246,239,247)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(54,144,192)","rgb(2,129,138)","rgb(1,100,80)"],8:["rgb(255,247,251)","rgb(236,226,240)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(54,144,192)","rgb(2,129,138)","rgb(1,100,80)"],9:["rgb(255,247,251)","rgb(236,226,240)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(54,144,192)","rgb(2,129,138)","rgb(1,108,89)","rgb(1,70,54)"]}, PuBu:{3:["rgb(236,231,242)","rgb(166,189,219)","rgb(43,140,190)"],4:["rgb(241,238,246)","rgb(189,201,225)","rgb(116,169,207)","rgb(5,112,176)"],5:["rgb(241,238,246)","rgb(189,201,225)","rgb(116,169,207)","rgb(43,140,190)","rgb(4,90,141)"],6:["rgb(241,238,246)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(43,140,190)","rgb(4,90,141)"],7:["rgb(241,238,246)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(54,144,192)","rgb(5,112,176)","rgb(3,78,123)"],8:["rgb(255,247,251)","rgb(236,231,242)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(54,144,192)","rgb(5,112,176)","rgb(3,78,123)"],9:["rgb(255,247,251)","rgb(236,231,242)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(54,144,192)","rgb(5,112,176)","rgb(4,90,141)","rgb(2,56,88)"]}, BuPu:{3:["rgb(224,236,244)","rgb(158,188,218)","rgb(136,86,167)"],4:["rgb(237,248,251)","rgb(179,205,227)","rgb(140,150,198)","rgb(136,65,157)"],5:["rgb(237,248,251)","rgb(179,205,227)","rgb(140,150,198)","rgb(136,86,167)","rgb(129,15,124)"],6:["rgb(237,248,251)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(136,86,167)","rgb(129,15,124)"],7:["rgb(237,248,251)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(140,107,177)","rgb(136,65,157)","rgb(110,1,107)"],8:["rgb(247,252,253)","rgb(224,236,244)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(140,107,177)","rgb(136,65,157)","rgb(110,1,107)"],9:["rgb(247,252,253)","rgb(224,236,244)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(140,107,177)","rgb(136,65,157)","rgb(129,15,124)","rgb(77,0,75)"]}, diff --git a/main/inc/lib/javascript/tag/style.css b/main/inc/lib/javascript/tag/style.css index efc444ed0f..a6f55bba2c 100755 --- a/main/inc/lib/javascript/tag/style.css +++ b/main/inc/lib/javascript/tag/style.css @@ -1,81 +1,222 @@ /* TextboxList sample CSS */ ul.holder { - background-color: white; - -moz-border-radius:5px 5px 5px 5px; - -web-kit-border-radius:5px 5px 5px 5px; - margin: 0; border: 1px solid #ccc; - overflow: hidden; + overflow: hidden; height: auto !important; - height: 1%; - padding: 4px 5px 0; + height: 1%; } *:first-child+html ul.holder { padding-bottom: 2px; } * html ul.holder { padding-bottom: 2px; } /* ie7 and below */ -ul.holder li { +ul.holder_simple li { float: left; list-style-type: none; margin: 0 5px 4px 0; white-space:nowrap; } -ul.holder li.bit-box, ul.holder li.bit-input input { - box-shadow: none; +ul.holder li.bit-box,ul.holder li.bit-input input { + box-shadow:none } -ul.holder li.bit-box { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; border: 1px solid #CAD8F3; background: #DEE7F8; padding: 1px 5px 2px; } -ul.holder li.bit-box-focus { border-color: #598BEC; background: #598BEC; color: #fff; } -ul.holder li.bit-input input { - width: auto; overflow:visible; margin: 0; border: 0px; outline: 0; padding: 3px 0px 2px; } /* no left/right padding here please */ + +ul.holder_simple li.bit-box { + -moz-border-radius:6px; + -webkit-border-radius:6px; + border-radius:6px; + border:1px solid #C09853; + background:#FCF8E3; + padding:1px 5px 2px; + color:#333; +} + +ul.holder_simple li.bit-box-focus { + border-color:#FCF8E3; + background:#FCF8E3; +} + +ul.holder li.bit-input input { + width:auto; + overflow:visible; + margin:0; + border:0; + outline:0; + padding:3px 0 2px +} + ul.holder li.bit-input input.smallinput { - width: 20px; + width:20px } -/* Facebook demo CSS */ -#add { border: 1px solid #999; width: 550px; margin: 50px; padding: 20px 30px 10px; } -form ol li { list-style-type: none; } -form ol { font: 11px "Lucida Grande", "Verdana"; margin: 0; padding: 0; } -form ol li.input-text { margin-bottom: 10px; list-style-type: none; padding-bottom: 10px; } -form ol li.input-text label { font-weight: bold; cursor: pointer; display: block; font-size: 13px; margin-bottom: 10px; } -form ol li.input-text input { background-image:none; width: 500px; padding: 5px 5px 6px; font: 11px "Lucida Grande", "Verdana"; border: 1px solid #999; } +#add { + border:1px solid #999; + width:550px; + margin:50px; + padding:20px 30px 10px +} -/* This hide the shadow.gid image of dokeos*/ -ul.holder input[type="text"]:focus, ul.holder input-text input[type="password"]:focus { - background-image:none; +form ol li { + list-style-type:none } +form ol { + font:11px "Lucida Grande",Verdana; + margin:0; + padding:0 +} +form ol li.input-text { + margin-bottom:10px; + list-style-type:none; + padding-bottom:10px +} +form ol li.input-text label { + font-weight:700; + cursor:pointer; + display:block; + font-size:13px; + margin-bottom:10px +} -/*form ul.holder { width: 500px; } */ -form ul { margin: 0 !important } -ul.holder li.bit-box, #apple-list ul.holder li.bit-box { padding-right: 15px; position: relative; z-index:1000;} -#apple-list ul.holder li.bit-input { margin: 0; } -#apple-list ul.holder li.bit-input input.smallinput { width: 5px; } -ul.holder li.bit-hover { background: #BBCEF1; border: 1px solid #6D95E0; } -ul.holder li.bit-box-focus { border-color: #598BEC; background: #598BEC; color: #fff; } -ul.holder li.bit-box a.closebutton { position: absolute; right: 4px; top: 5px; display: block; width: 7px; height: 7px; font-size: 1px; background: url('close.gif'); } -ul.holder li.bit-box a.closebutton:hover { background-position: 7px; } -ul.holder li.bit-box-focus a.closebutton, ul.holder li.bit-box-focus a.closebutton:hover { background-position: bottom; } +form ol li.input-text input { + background-image:none; + width:500px; + padding:5px 5px 6px; + font:11px "Lucida Grande",Verdana; + border:1px solid #999 +} -/* Autocompleter */ +ul.holder input[type="text"]:focus,ul.holder input-text input[type="password"]:focus { + background-image:none +} -.facebook-auto { - z-index:2000; - display: none; - position: absolute; -/* width: 512px; */ - background: #eee; +form ul { + margin-left:0 !important; + margin-bottom: 0 !important; } -.facebook-auto .default { z-index:2000; padding: 5px 7px; border: 1px solid #ccc; border-width: 0 1px 1px;font-family:"Lucida Grande","Verdana"; font-size:11px; } -.facebook-auto ul { display: none; margin: 0; padding: 0; overflow: auto; position:absolute; z-index:9999} -.facebook-auto ul li { padding: 5px 12px; z-index: 1000; cursor: pointer; margin: 0; list-style-type: none; border: 1px solid #ccc; border-width: 0 1px 1px; font: 11px "Lucida Grande", "Verdana"; background-color: #eee } -.facebook-auto ul li em { font-weight: bold; font-style: normal; background: #ccc; } -.facebook-auto ul li.auto-focus { background: #4173CC; color: #fff; } -.facebook-auto ul li.auto-focus em { background: none; } -.deleted { background-color:#4173CC !important; color:#ffffff !important;} -.hidden { display:none;} -#demo ul.holder li.bit-input input { padding: 2px 0 1px; border: 1px solid #999; } -.ie6fix {height:1px;width:1px; position:absolute;top:0px;left:0px;z-index:1;} +ul.holder li.bit-box,#apple-list ul.holder li.bit-box { + padding-right:15px; + position:relative; + z-index:1000 +} + +#apple-list ul.holder li.bit-input { + margin:0 +} + +#apple-list ul.holder li.bit-input input.smallinput { + width:5px +} + +ul.holder li.bit-hover { + background:#BBCEF1; + border:1px solid #6D95E0 +} + +ul.holder li.bit-box-focus { + border-color:#598BEC; + background:#598BEC; + color:#fff +} -.holder_simple { - border:none !important; +ul.holder li.bit-box a.closebutton { + position:absolute; + right:4px; + top:5px; + display:block; + width:7px; + height:7px; + font-size:1px; + background:url(close.gif) +} + +ul.holder li.bit-box a.closebutton:hover { + background-position:7px +} + +ul.holder li.bit-box-focus a.closebutton,ul.holder li.bit-box-focus a.closebutton:hover { + background-position:bottom +} + +.facebook-auto { + z-index:2000; + display:none; + position:absolute; + background:#FCF8E3; + border: 1px solid #FBEED5; + margin-right: 1em; +} + +.facebook-auto .default { + z-index:2000; + padding:5px 7px; + color:#C09853; + font-size:13px; +} + +.facebook-auto ul { + display:none; + margin:0; + padding:0; + overflow:auto; + position:absolute; + z-index:9999 !important; +} + +.facebook-auto ul li { + padding:5px 10px; + z-index:1000; + cursor:pointer; + margin:0; + list-style-type:none; + background:#FCF8E3; + border: 1px solid #FBEED5; + color: #666; +} + +.facebook-auto ul li em { + color:#C09853; + font-weight: bold; +} + +.facebook-auto ul li.auto-focus { + background:#F0F0F0; + color:#333; +} + +.facebook-auto ul li.auto-focus em { + background:none +} + +.deleted { + background-color:#4173CC!important; + color:#fff!important +} + +.hidden { + display:none +} + +#demo ul.holder li.bit-input input { + padding:2px 0 1px; + border:1px solid #999 +} + +.ie6fix { + height:1px; + width:1px; + position:absolute; + top:0; + left:0; + z-index:1 +} +ul.holder_simple{ + list-style: none; + margin:0; + height: auto !important; + width: 93%; } +ul.border { + border: 1px dashed #cccccc; + padding: .5em 1em; + margin-top: 1em; + display: inline-block; +} \ No newline at end of file diff --git a/main/inc/lib/skill.lib.php b/main/inc/lib/skill.lib.php index 4fc584f39d..333473ab8a 100755 --- a/main/inc/lib/skill.lib.php +++ b/main/inc/lib/skill.lib.php @@ -66,6 +66,22 @@ class SkillProfile extends Model } return false; } + + /** + * Delete a skill profile + * @param int $id The skill profile id + * @return boolean Whether delete a skill profile + */ + public function delete($id) { + Database::delete( + $this->table_rel_profile, + array( + 'profile_id' => $id + ) + ); + + return parent::delete($id); + } } class SkillRelProfile extends Model @@ -853,6 +869,7 @@ class Skill extends Model $tmp = array(); $tmp['name'] = $elem['name']; $tmp['id'] = $elem['id']; + $tmp['isSearched'] = self::isSearched($elem['id']); if (is_array($elem['children'])) { $tmp['children'] = $this->get_skill_json($elem['children'], $depth + 1, $max_depth); @@ -971,4 +988,42 @@ class Skill extends Model } return false; } + + /** + * Check if a skill is searched + * @param int $id The skill id + * @return boolean Whether el skill is searched return true. Otherwise return false + */ + public static function isSearched($id) + { + $id = intval($id); + + if (empty($id)) { + return false; + } + + $skillRelProfileTable = Database::get_main_table(TABLE_MAIN_SKILL_REL_PROFILE); + + $result = Database::select( + 'COUNT( DISTINCT `skill_id`) AS qty', + $skillRelProfileTable, + array( + 'where' => array( + 'skill_id = ?' => $id + ) + ), + 'first' + ); + + if ($result === false) { + return false; + } + + if ($result['qty'] > 0) { + return true; + } + + return false; + } + } diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php index 43b94bf0e4..43f47f7971 100755 --- a/main/inc/lib/userportal.lib.php +++ b/main/inc/lib/userportal.lib.php @@ -312,7 +312,9 @@ class IndexManager $content .= Display::tag('li', Display::url(get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/skills_wheel.php')); - if (api_get_setting('allow_hr_skills_management') == 'true' || api_is_platform_admin()) { + $allowSkillsManagement = api_get_setting('allow_hr_skills_management') == 'true'; + + if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) { $content .= Display::tag('li', Display::url(get_lang('ManageSkills'), api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php')); } $content .= ''; diff --git a/main/social/skills_wheel.php b/main/social/skills_wheel.php index b55c6686be..1c3e78b84e 100755 --- a/main/social/skills_wheel.php +++ b/main/social/skills_wheel.php @@ -31,6 +31,11 @@ $htmlHeadXtra[] = '

{{"Skills"|get_lang}}