Changeset 5957

Show
Ignore:
Timestamp:
07/07/08 21:39:20 (6 months ago)
Author:
p_lindheimer
Message:

added delete icons - should probably add links in timeconditons to timegroup that it uses

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/timeconditions/functions.inc.php

    r5925 r5957  
    340340                $currentcomponent->addguielem('_top', new gui_hidden('extdisplay', $extdisplay)); 
    341341                $currentcomponent->addguielem('_top', new gui_pageheading('title', _("Edit Time Group").": $description", false), 0); 
    342                 $currentcomponent->addguielem('_top', new gui_link('del', _("Delete Time Group")." $timegroup", $delURL, true, false), 0); 
     342                $tlabel = sprintf(_("Delete Time Group %s"),$extdisplay); 
     343                $label = '<span><img width="16" height="16" border="0" title="'.$tlabel.'" alt="" src="images/core_delete.png"/>&nbsp;'.$tlabel.'</span>'; 
     344                $currentcomponent->addguielem('_top', new gui_link('del', $label, $delURL, true, false), 0); 
    343345                $currentcomponent->addguielem('Time Group', new gui_textbox('description', $description, 'Description', 'This will display as the name of this Time Group.', '', '', false), 3); 
    344346                $timelist = timeconditions_timegroups_get_times($extdisplay); 
  • modules/branches/2.5/timeconditions/page.timeconditions.php

    r5925 r5957  
    6363        echo '<br><h3>'._("Time Condition").' '.$itemid.' '._("deleted").'!</h3>'; 
    6464} else { 
     65?> 
     66        <h2><?php echo ($itemid ? _("Time Condition:")." ". $itemid : _("Add Time Condition")); ?></h2> 
     67<?php            
    6568        if ($itemid){  
    66                 //get details for this time condition 
    6769                $thisItem = timeconditions_get($itemid); 
    68         } 
    69  
    70         $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete'; 
     70               $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete'; 
     71                $tlabel = sprintf(_("Delete Time Condition: %s"),trim($thisItem['displayname']) == '' ? $itemid : $thisItem['displayname']." ($itemid) "); 
     72               $label = '<span><img width="16" height="16" border="0" title="'.$tlabel.'" alt="" src="images/core_delete.png"/>&nbsp;'.$tlabel.'</span>'; 
    7173?> 
    72  
    73         <h2><?php echo ($itemid ? _("Time Condition:")." ". $itemid : _("Add Time Condition")); ?></h2> 
    74 <?php           if ($itemid){ ?> 
    75         <a href="<?php echo $delURL ?>"><?php echo _("Delete Time Condition")?> <?php echo $itemid; ?></a> 
     74                <a href="<?php echo $delURL ?>"><?php echo $label; ?></a><br /> 
    7675<?php 
    77                                        $usage_list = framework_display_destination_usage(timeconditions_getdest($itemid)); 
    78                                        if (!empty($usage_list)) { 
     76                $usage_list = framework_display_destination_usage(timeconditions_getdest($itemid)); 
     77                if (!empty($usage_list)) { 
    7978?> 
    80                                                <br /><a href="#" class="info"><?php echo $usage_list['text']?>:<span><?php echo $usage_list['tooltip']?></span></a> 
     79                        <a href="#" class="info"><?php echo $usage_list['text']?>:<span><?php echo $usage_list['tooltip']?></span></a> 
    8180<?php 
    82                                        
    83                                }  
     81               
     82        }  
    8483?> 
    8584        <form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return edit_onsubmit();">