summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfc6d97)
raw | patch | inline | side by side (parent: dfc6d97)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 25 Jan 2006 09:55:28 +0000 (09:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 25 Jan 2006 09:55:28 +0000 (09:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2577 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_glpiPrinterCartridges.inc | patch | blob | history | |
plugins/admin/systems/glpiPrinterCartridges.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_glpiPrinterCartridges.inc b/plugins/admin/systems/class_glpiPrinterCartridges.inc
index 0276ce1e2870d7c89dbb2902ddbb396b572696c3..4f31fdfa57fbfe12c3782ff252cb46e2db235d09 100644 (file)
/* Delete this entry */
if(isset($_POST['delete_glpi_confirm'])&&($this->del)) {
- if(count($this->parent->handle->getCartridgesWhichUseThisType($this->del))){
- print_red(_("You can't delete this cartridge type, it is still in use."));
+ $tmp = $this->parent->handle->is_cartridgeTypeUsed($this->del);
+ if(count($tmp)){
+
+ $str = "";
+ foreach($tmp as $id => $name){
+ $str .= $name.", ";
+ }
+ $str = preg_replace("/, $/","",$str);
+
+ print_red(sprintf(_("You can't delete this cartridge type, it is still in use by this printer(s) '%s'."),$str));
}else{
$val = ($this->parent->handle->getCartridgeTypeInformations($this->del));
$this->cur_dialog = new glpiPrinterCartridgesEdit($this->config,$this->dn,$this->PrinterType,$val[$this->del]);
/* Save changes if check is ok */
if(isset($_POST['SaveCartridge'])){
+ $this->cur_dialog->save_object();
if(count($this->cur_dialog->check())) {
foreach($this->cur_dialog->check() as $checks){
print_red($checks);
}
}else{
- $this->cur_dialog->save_object();
$this->cur_dialog->save();
$this->cur_dialog = false;
}
$smarty->assign("search_image", get_template_path('images/search.png'));
$smarty->assign("searchu_image", get_template_path('images/search_user.png'));
$smarty->assign("tree_image", get_template_path('images/tree.png'));
- $smarty->assign("infoimage", get_template_path('images/info.png'));
- $smarty->assign("launchimage", get_template_path('images/launch.png'));
+ $smarty->assign("infoimage", get_template_path('images/info_small.png'));
+ $smarty->assign("launchimage", get_template_path('images/small_filter.png'));
$smarty->assign("apply", apply_filter());
$smarty->assign("alphabet", generate_alphabet());
$smarty->assign("cartridge_regex", $filter);
diff --git a/plugins/admin/systems/glpiPrinterCartridges.tpl b/plugins/admin/systems/glpiPrinterCartridges.tpl
index d1cea49978cd2bb1f46c32cc8ad9f33b99cd23d2..334b62b6426c89eabb6e74da3d10267d03b15a6c 100644 (file)
<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=4>
<tr>
<td style="vertical-align:top;width:50%;" >
- <div class="contentboxh">
- <p class="contentboxh">
+ <div class="contentboxh" style="height:20px;">
+ <p class="contentboxh" style="font-size:12px;">
{t}List of available cartridge type for this type of printer{/t}
</p>
</div>
</div>
</td>
<td style="vertical-align:top;">
- <div class="contentboxh" style="border-bottom:1px solid #B0B0B0;">
- <p class="contentboxh"><img src="{$infoimage}" align="right" alt="[i]">{t}Information{/t}</p>
+ <div class="contentboxh" style="border-bottom:1px solid #B0B0B0;height:20px;" >
+ <p class="contentboxh" style="font-size:12px;"><img src="{$infoimage}" align="right" alt="[i]">{t}Information{/t}</p>
</div>
<div class="contentboxb">
<p class="contentboxb">
</p>
</div>
<br>
- <div class="contentboxh">
- <p class="contentboxh"><img src="{$launchimage}" align="right" alt="[F]">{t}Filters{/t}</p>
+ <div class="contentboxh" style="height:20px;">
+ <p class="contentboxh" style="font-size:12px;"><img src="{$launchimage}" align="right" alt="[F]">{t}Filters{/t}</p>
</div>
<div class="contentboxb">
<table summary="" style="width:100%;border-top:1px solid #B0B0B0;">