mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
N°2313 - Markup extensibility: Update usages of admin. console tabs to have codes and titles
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
<?php
|
||||
// Copyright (c) 2010-2018 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
|
||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
//
|
||||
/**
|
||||
* Copyright (C) 2013-2020 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
|
||||
*/
|
||||
|
||||
@include_once('../../approot.inc.php');
|
||||
require_once(APPROOT.'application/startup.inc.php');
|
||||
@@ -48,7 +48,7 @@ function DisplayDBInconsistencies(iTopWebPage &$oP, ApplicationContext &$oAppCon
|
||||
}
|
||||
$sClassSelection = utils::ReadParam('class_selection', '');
|
||||
|
||||
$oP->SetCurrentTab(Dict::S('DBTools:Inconsistencies'));
|
||||
$oP->SetCurrentTab('DBTools:Inconsistencies');
|
||||
|
||||
$bRunAnalysis = intval(utils::ReadParam('run_analysis', '0'));
|
||||
if ($bRunAnalysis)
|
||||
@@ -293,7 +293,7 @@ function DisplayLostAttachments(iTopWebPage &$oP, ApplicationContext &$oAppConte
|
||||
$bDoRestore = in_array($sStepName, array('restore'));
|
||||
|
||||
// Build HTML
|
||||
$oP->SetCurrentTab(Dict::S('DBTools:LostAttachments'));
|
||||
$oP->SetCurrentTab('DBTools:LostAttachments');
|
||||
|
||||
$oP->add('<div class="db-tools-tab-content">');
|
||||
$oP->add('<div class="dbt-lostattachments">');
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<?php
|
||||
// Copyright (C) 2010-2017 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
|
||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
/**
|
||||
* Copyright (C) 2013-2020 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
|
||||
*/
|
||||
|
||||
class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExtension
|
||||
{
|
||||
@@ -258,7 +259,7 @@ class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExt
|
||||
{
|
||||
$iCount = $oAttachmentsRenderer->GetAttachmentsSet()->Count() + $oAttachmentsRenderer->GetTempAttachmentsSet()->Count();
|
||||
$sTitle = ($iCount > 0) ? Dict::Format('Attachments:TabTitle_Count', $iCount) : Dict::S('Attachments:EmptyTabTitle');
|
||||
$oPage->SetCurrentTab($sTitle);
|
||||
$oPage->SetCurrentTab('Attachments:Tab', $sTitle);
|
||||
}
|
||||
|
||||
$oPage->add('<fieldset>');
|
||||
|
||||
@@ -1735,7 +1735,7 @@
|
||||
}
|
||||
|
||||
$sCount = ($iTotal > 0) ? ' ('.$iTotal.')' : '';
|
||||
$oPage->SetCurrentTab(Dict::S('Class:FunctionalCI/Tab:OpenedTickets').$sCount);
|
||||
$oPage->SetCurrentTab('Class:FunctionalCI/Tab:OpenedTickets', Dict::S('Class:FunctionalCI/Tab:OpenedTickets').$sCount);
|
||||
|
||||
foreach ($aSearches as $sSubClass => $oSearch)
|
||||
{
|
||||
@@ -6722,7 +6722,7 @@
|
||||
|
||||
if (!$bEditMode)
|
||||
{
|
||||
$oPage->SetCurrentTab(Dict::S('Class:Subnet/Tab:IPUsage'));
|
||||
$oPage->SetCurrentTab('Class:Subnet/Tab:IPUsage');
|
||||
|
||||
$bit_ip = ip2long($this->Get('ip'));
|
||||
$bit_mask = ip2long($this->Get('ip_mask'));
|
||||
@@ -6744,7 +6744,7 @@
|
||||
$iCountRange = $iIPMax - $iIPMin; // On 32-bit systems the substraction will be computed using floats for values greater than PHP_MAX_INT;
|
||||
$iFreeCount = $iCountRange - $iCountUsed;
|
||||
|
||||
$oPage->SetCurrentTab(Dict::S('Class:Subnet/Tab:FreeIPs'));
|
||||
$oPage->SetCurrentTab('Class:Subnet/Tab:FreeIPs');
|
||||
$oPage->p(Dict::Format('Class:Subnet/Tab:FreeIPs-count', $iFreeCount));
|
||||
$oPage->p(Dict::S('Class:Subnet/Tab:FreeIPs-explain'));
|
||||
|
||||
|
||||
@@ -1084,17 +1084,17 @@
|
||||
if (MetaModel::IsValidClass('KnownError'))
|
||||
{
|
||||
//Search for known errors
|
||||
$oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList'));
|
||||
$oPage->SetCurrentTab('Class:UserRequest:KnownErrorList');
|
||||
$iTicketID = $this->GetKey();;
|
||||
$oKnownErrorSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT KnownError AS ke JOIN lnkErrorToFunctionalCI AS l1 ON l1.error_id=ke.id JOIN FunctionalCI AS ci ON l1.functionalci_id=ci.id JOIN lnkFunctionalCIToTicket AS l2 ON l2.functionalci_id=ci.id WHERE l2.ticket_id=$iTicketID"));
|
||||
$iNumberKE=$oKnownErrorSet->count();
|
||||
if ($iNumberKE > 0)
|
||||
{
|
||||
$oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList')." ($iNumberKE)");
|
||||
$oPage->SetCurrentTab('Class:UserRequest:KnownErrorList', Dict::S('Class:UserRequest:KnownErrorList')." ($iNumberKE)");
|
||||
}
|
||||
else
|
||||
{
|
||||
$oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList'));
|
||||
$oPage->SetCurrentTab('Class:UserRequest:KnownErrorList');
|
||||
}
|
||||
self::DisplaySet($oPage, $oKnownErrorSet, array ('menu' => false));
|
||||
}
|
||||
|
||||
@@ -1226,17 +1226,17 @@
|
||||
if (MetaModel::IsValidClass('KnownError'))
|
||||
{
|
||||
//Search for known errors
|
||||
$oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList'));
|
||||
$oPage->SetCurrentTab('Class:UserRequest:KnownErrorList');
|
||||
$iTicketID = $this->GetKey();;
|
||||
$oKnownErrorSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT KnownError AS ke JOIN lnkErrorToFunctionalCI AS l1 ON l1.error_id=ke.id JOIN FunctionalCI AS ci ON l1.functionalci_id=ci.id JOIN lnkFunctionalCIToTicket AS l2 ON l2.functionalci_id=ci.id WHERE l2.ticket_id=$iTicketID"));
|
||||
$iNumberKE=$oKnownErrorSet->count();
|
||||
if ($iNumberKE > 0)
|
||||
{
|
||||
$oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList')." ($iNumberKE)");
|
||||
$oPage->SetCurrentTab('Class:UserRequest:KnownErrorList', Dict::S('Class:UserRequest:KnownErrorList')." ($iNumberKE)");
|
||||
}
|
||||
else
|
||||
{
|
||||
$oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList'));
|
||||
$oPage->SetCurrentTab('Class:UserRequest:KnownErrorList');
|
||||
}
|
||||
self::DisplaySet($oPage, $oKnownErrorSet, array ('menu' => false));
|
||||
}
|
||||
|
||||
@@ -1243,17 +1243,17 @@
|
||||
if (MetaModel::IsValidClass('KnownError'))
|
||||
{
|
||||
//Search for known errors
|
||||
$oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList'));
|
||||
$oPage->SetCurrentTab('Class:UserRequest:KnownErrorList');
|
||||
$iTicketID = $this->GetKey();;
|
||||
$oKnownErrorSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT KnownError AS ke JOIN lnkErrorToFunctionalCI AS l1 ON l1.error_id=ke.id JOIN FunctionalCI AS ci ON l1.functionalci_id=ci.id JOIN lnkFunctionalCIToTicket AS l2 ON l2.functionalci_id=ci.id WHERE l2.ticket_id=$iTicketID"));
|
||||
$iNumberKE=$oKnownErrorSet->count();
|
||||
if ($iNumberKE > 0)
|
||||
{
|
||||
$oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList')." ($iNumberKE)");
|
||||
$oPage->SetCurrentTab('Class:UserRequest:KnownErrorList', Dict::S('Class:UserRequest:KnownErrorList')." ($iNumberKE)");
|
||||
}
|
||||
else
|
||||
{
|
||||
$oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList'));
|
||||
$oPage->SetCurrentTab('Class:UserRequest:KnownErrorList');
|
||||
}
|
||||
self::DisplaySet($oPage, $oKnownErrorSet, array ('menu' => false));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user