mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
* datatable row actions
Below is a sample of extra param to enable feature:
$aExtraParams['row_actions'] = [
[
'tooltip' => 'remove an element',
'icon_css_class' => 'fa-minus',
'js_row_action' => 'console.log("You clicked the remove button");',
'confirmation' => [
'message' => 'UI:ConfirmationMessage',
'message_row_data' => "name",
'remember_choice_pref_key' => 'remove_do_not_show_again',
],
],
[
'tooltip' => 'open in new tab',
'icon_css_class' => 'fa-external-link-square-alt',
'on_action_js' => 'window.open("http://localhost/itop-branchs/dev/pages/UI.php?operation=details&class=UserRequest&id=" + aData.id + "&c[menu]=UserRequest%3AOpenRequests");',
],
[
'tooltip' => 'other actions',
'icon_css_class' => 'fa-ellipsis-v',
'on_action_js' => 'console.log(event);',
],
];
* Contrôleur pour la suppression et le détachement de liens
* Block UI pour l'édition des relations
* Block UI pour la visualisation des relations
* Boutons d'actions pour la suppression et le détachement de liens
* Gestion dialogue de confirmation pour les row actions
54 lines
1.5 KiB
PHP
54 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* Copyright (C) 2013-2021 Combodo SARL
|
|
*
|
|
* This file is part of iTop.
|
|
*
|
|
* iTop is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* iTop is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
*/
|
|
|
|
namespace Combodo\iTop\Application\UI\Base\Component\Dialog;
|
|
|
|
use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
|
|
|
/**
|
|
* Class DialogUIBlockFactory
|
|
*
|
|
* @api
|
|
*
|
|
* @since 3.1.0
|
|
* @package Combodo\iTop\Application\UI\Base\Component\Dialog
|
|
*/
|
|
class DialogUIBlockFactory extends AbstractUIBlockFactory
|
|
{
|
|
/** @inheritDoc */
|
|
public const TWIG_TAG_NAME = 'UIDialog';
|
|
/** @inheritDoc */
|
|
public const UI_BLOCK_CLASS_NAME = Dialog::class;
|
|
|
|
/**
|
|
* Make a basis Dialog component
|
|
*
|
|
* @param string $sTitle Title of the alert
|
|
* @param string $sContent The raw HTML content, must be already sanitized
|
|
* @param string|null $sId id of the html block
|
|
*
|
|
* @return \Combodo\iTop\Application\UI\Base\Component\Alert\Alert
|
|
*/
|
|
public static function MakeNeutral(string $sTitle = '', string $sContent = '', ?string $sId = null)
|
|
{
|
|
return new Dialog($sTitle, $sContent, $sId);
|
|
}
|
|
|
|
|
|
} |