chg: [generic_picker] added an icon to show that a galaxy will trigger

the matrix galaxy picker
pull/4164/head
mokaddem 2019-02-15 10:12:02 +01:00
parent 8b18ab8d69
commit 24d0cf13a9
3 changed files with 6 additions and 0 deletions

View File

@ -108,6 +108,7 @@ class GalaxiesController extends AppController
'name' => $galaxy['Galaxy']['name'],
'functionName' => "getMatrixPopup('" . $target_type . "', '" . $target_id . "', " . $galaxy['Galaxy']['id'] . ")",
'isPill' => true,
'isMatrix' => true
);
if ($galaxy['Galaxy']['id'] == $mitreAttackGalaxyId) {
$param['img'] = "/img/mitre-attack-icon.ico";

View File

@ -86,6 +86,10 @@ class GenericPickerHelper extends AppHelper {
if (isset($param['template']['infoExtra'])) {
$pill_html .= $this->_View->element('genericPickerElements/info_extra', array('infoExtra' => $param['template']['infoExtra'], 'forceIcon' => true));
}
if (isset($param['isMatrix']) && $param['isMatrix']) {
$span = '<span style="position: absolute; font-size: 8px; top: 2px;" class="fa fa-th" title="' . __('Start the galaxy matrix picker') . '"></span>';
$pill_html .= $span;
}
$pill_html .= '</a>';
$pill_html .= '</li>';
return $pill_html;

View File

@ -902,6 +902,7 @@ a.pill-pre-picker {
background-color: #fcfcfc;
font-weight: bold;
border: 1px #65737ec8 solid;
position: relative;
}
.nav-pills > .active > a.pill-pre-picker {
background-color: #65737e32;