Skip to content

Commit

Permalink
Delete openArrowMassives and closeArrowMassives
Browse files Browse the repository at this point in the history
update locales
update version & xml
  • Loading branch information
amma35 committed Oct 10, 2017
1 parent 74388c4 commit 11b3aa8
Show file tree
Hide file tree
Showing 28 changed files with 803 additions and 415 deletions.
4 changes: 2 additions & 2 deletions inc/ruletypology.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
class PluginTypologyRuleTypology extends Rule {

// From Rule
public static $right='plugin_typology';
public $can_sort=true;
static $rightname = "plugin_typology";
public $can_sort = true;

function getTitle() {

Expand Down
9 changes: 4 additions & 5 deletions inc/typology_item.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ public static function showForTypology(PluginTypologyTypology $typo) {

if ($canedit && $number) {
Html::openMassiveActionsForm('mass' . __CLASS__ . $rand);
$massiveactionparams = array();
$massiveactionparams = array('item' => $typo, 'container' => 'mass'.__CLASS__.$rand);
Html::showMassiveActions($massiveactionparams);
}
echo "<table class='tab_cadre_fixe'>";
Expand Down Expand Up @@ -818,8 +818,8 @@ public static function showForTypology(PluginTypologyTypology $typo) {
}
echo "</table>";
if ($canedit && $number) {
$paramsma['ontop'] = false;
Html::showMassiveActions($paramsma);
$massiveactionparams['ontop'] = false;
Html::showMassiveActions($massiveactionparams);
Html::closeForm();
}

Expand Down Expand Up @@ -987,7 +987,6 @@ static function showManagementConsole($ID, $typo_ID, $display = true){
public function getForbiddenStandardMassiveAction() {
$forbidden = parent::getForbiddenStandardMassiveAction();
$forbidden[] = 'update';
$forbidden[] = 'purge';

return $forbidden;
}
Expand All @@ -1003,7 +1002,7 @@ static function showMassiveActionsSubForm(MassiveAction $ma) {
//add item to a typo
case "add_item":
echo "</br>&nbsp;".PluginTypologyTypology::getTypeName(2)." : ";
Dropdown::show('PluginTypologyTypology',
Dropdown::show('PluginTypologyTypology',
array('name' => "plugin_typology_typologies_id"));
echo "&nbsp;" .
Html::submit(_x('button', 'Post'), array('name' => 'massiveaction'));
Expand Down
46 changes: 30 additions & 16 deletions inc/typologycriteriadefinition.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ static function showForCriteria(PluginTypologyTypologyCriteria $typocrit) {

$typocrit_id = $typocrit->getField('id');

$canedit = Session::haveRight("plugin_typology", UPDATE);
$rand = mt_rand();

$query = "SELECT `glpi_plugin_typology_typologycriteriadefinitions`.`id`,
`glpi_plugin_typology_typologycriterias`.`itemtype`,
Expand Down Expand Up @@ -151,29 +153,30 @@ static function showForCriteria(PluginTypologyTypologyCriteria $typocrit) {
}
if ($DB->num_fields($result)>0) {

if (Session::haveRight("plugin_typology", UPDATE)) {
echo "<form name='critDef_form' id='critDef_form' method='post' action='./typologycriteria.form.php'>";
if ($canedit) {
Html::openMassiveActionsForm('mass' . __CLASS__ . $rand);
$massiveactionparams = array('item' => $typocrit, 'container' => 'mass'.__CLASS__.$rand);
Html::showMassiveActions($massiveactionparams);
}

echo "<div class='center'><table class='tab_cadre_fixe'>";
echo "<tr><th colspan='4'>".PluginTypologyTypologyCriteriaDefinition::getTypeName(2)."</th></tr>";

echo "<tr class='tab_bg_1 center'>";
echo "<th colspan='2'>"._n('Field','Fields',2)."</th>";
if ($canedit) {
echo "<th width='10'>" . Html::getCheckAllAsCheckbox('mass' . __CLASS__ . $rand) . "</th>";
}
echo "<th>"._n('Field','Fields',2)."</th>";
echo "<th class='center b'>" . __('Logical operator') . "</th>";
echo "<th class='center b'>" . __('Value') . "</th>";
echo "</tr>";

while ($ligne = $DB->fetch_array($result)) {
echo "<tr class='tab_bg_2'>";

if (Session::haveRight("plugin_typology", UPDATE)) {
echo "<td width='10'>";
echo "<input type='checkbox' name='item[".$ligne["id"]."]' value='1'>";
echo "<input type='hidden' name='plugin_typology_typologycriterias_id' value='$typocrit_id'>";
echo "</td>";
} else {
if ($canedit) {
echo "<td width='10'>";
Html::showMassiveActionCheckBox(__CLASS__, $ligne["id"]);
echo "</td>";
}

Expand All @@ -182,19 +185,30 @@ static function showForCriteria(PluginTypologyTypologyCriteria $typocrit) {
echo "</tr>";
}

if (Session::haveRight("plugin_typology", UPDATE)){
Html::openArrowMassives("critDef_form",true);
Html::closeArrowMassives(array('delete_action' => __('Delete permanently')));
}
echo "</table></div>";
if (Session::haveRight("plugin_typology", UPDATE)){
if ($canedit) {
$massiveactionparams['ontop'] = false;
Html::showMassiveActions($massiveactionparams);
Html::closeForm();
}

echo "</table></div>";
}
}
}

/**
* Get the standard massive actions which are forbidden
*
* @since version 0.84
*
* @return an array of massive actions
**/
public function getForbiddenStandardMassiveAction() {
$forbidden = parent::getForbiddenStandardMassiveAction();
$forbidden[] = 'update';

return $forbidden;
}

/**
* Display all the fields available depending on itemtype selected
*
Expand Down
Binary file added locales/cs_CZ.mo
Binary file not shown.
187 changes: 187 additions & 0 deletions locales/cs_CZ.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Typology Development Team
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# David Stepan <[email protected]>, 2015
msgid ""
msgstr ""
"Project-Id-Version: GLPI Project - typology plugin\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-10 14:46+0200\n"
"PO-Revision-Date: 2017-10-10 13:03+0000\n"
"Last-Translator: Amandine Manceau\n"
"Language-Team: Czech (Czech Republic) (http://www.transifex.com/tsmr/GLPI_typology/language/cs_CZ/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs_CZ\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"

#: hook.php:190 inc/typology_item.class.php:561
msgid "Assign a typology to this material"
msgstr ""

#: hook.php:191
msgid "Delete the typology of this material"
msgstr ""

#: hook.php:192 inc/typology.class.php:288
msgid "Recalculate typology for the elements"
msgstr "Přepočítat typologii pro elementy"

#: hook.php:213
msgid "Typology's name"
msgstr "Název typologie"

#: hook.php:227 inc/typology_item.class.php:491
#: inc/typology_item.class.php:749
msgid "Responding to typology's criteria"
msgstr ""

#: setup.php:74 inc/menu.class.php:34 inc/profile.class.php:132
#: inc/typology.class.php:58
msgid "Typology"
msgid_plural "Typologies"
msgstr[0] "Typologie"
msgstr[1] "Typologie"
msgstr[2] "Typologie"

#: front/typology.form.php:82
msgid "Element not match with the rule for assigning the typology:"
msgstr ""

#: front/typology.form.php:97 inc/typology_item.class.php:1056
#: inc/typology_item.class.php:1072
msgid "Element not match with rules for assigning a typology"
msgstr ""

#: inc/notificationtargettypology.class.php:39
#: inc/notificationtargettypology.class.php:51 inc/typology.class.php:292
#: inc/typology.class.php:435
msgid "Elements not match with the typology"
msgstr ""

#: inc/notificationtargettypology.class.php:57
#: inc/notificationtargettypology.class.php:90
msgid "Link to the typology"
msgstr "Připojit k typologii"

#: inc/notificationtargettypology.class.php:58
#: inc/notificationtargettypology.class.php:91
msgid "Link to the element"
msgstr "Připojit k elementu"

#: inc/ruletypologycollection.class.php:43
msgid "Rules for assigning a typology to a computer"
msgstr ""

#: inc/typology.class.php:366
msgid "Typology of the linked elements is updated."
msgstr ""

#: inc/typologycriteria.class.php:156
msgid "Add a criterion"
msgstr "Přidat kritérium"

#: inc/typologycriteria.class.php:201
msgid "Criteria's list"
msgstr "Seznam kritérií"

#: inc/typologycriteria.class.php:225 inc/typology_item.class.php:925
msgid "Detail of the assigned typology"
msgstr ""

#: inc/typologycriteriadefinition.class.php:44
msgid "Definition"
msgid_plural "Definitions"
msgstr[0] "Definice"
msgstr[1] "Definic"
msgstr[2] "Definice"

#: inc/typologycriteriadefinition.class.php:92
msgid ""
"You don't have right to create a definition for this criteria. Thank to "
"contact a person having this right."
msgstr ""

#: inc/typologycriteriadefinition.class.php:553
#: inc/typologycriteriadefinition.class.php:559
#: inc/typologycriteriadefinition.class.php:794
msgid "Less than"
msgstr "Méně než"

#: inc/typologycriteriadefinition.class.php:554
#: inc/typologycriteriadefinition.class.php:560
#: inc/typologycriteriadefinition.class.php:796
msgid "More than"
msgstr "Více než"

#: inc/typology_item.class.php:58
msgid "Element"
msgid_plural "Elements"
msgstr[0] "Element"
msgstr[1] "Elementy"
msgstr[2] "Elementy"

#: inc/typology_item.class.php:137
msgid "Add element to the typology"
msgstr "Přidat element k typologii"

#: inc/typology_item.class.php:139
msgid "Update element to the typology"
msgstr "Aktualizovat element v typologii"

#: inc/typology_item.class.php:141
msgid "Element out of the typology"
msgstr "Element byl odstraněn z typologie"

#: inc/typology_item.class.php:224
msgid ""
"You cannot assign this typology to this material as he has already a "
"typology : "
msgstr ""

#: inc/typology_item.class.php:486
msgid "Typology assigned to this material"
msgstr ""

#: inc/typology_item.class.php:493
msgid "Actions"
msgstr "Akce"

#: inc/typology_item.class.php:525 inc/typology_item.class.php:807
msgid "for the criteria"
msgstr "pro kritérium"

#: inc/typology_item.class.php:686 inc/typology_item.class.php:733
msgid "Linked elements"
msgstr "Připojené elementy"

#: inc/typology_item.class.php:708
msgid "Select a type"
msgstr ""

#: inc/typology_item.class.php:731
msgid "No linked element"
msgstr "Žádný připojený element"

#: inc/typology_item.class.php:917
msgid "Management console"
msgstr "Konzole pro správu"

#: inc/typology_item.class.php:924
msgid "Comparison"
msgstr ""

#: inc/typology_item.class.php:926
msgid "Detail of the encountered configuration"
msgstr ""

#: inc/typology_item.class.php:932
msgid "Waiting value"
msgstr "Očekávaná hodnota"

#: inc/typology_item.class.php:933
msgid "Real value"
msgstr "Skutečná hodnota"
Binary file modified locales/de_DE.mo
Binary file not shown.
Loading

0 comments on commit 11b3aa8

Please sign in to comment.