summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 45ef420)
raw | patch | inline | side by side (parent: 45ef420)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Jun 2008 09:21:29 +0000 (09:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Jun 2008 09:21:29 +0000 (09:21 +0000) |
-Added status col
-Fixed encoding.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11391 594d385d-05f5-0310-b6e9-bd551577e9d8
-Fixed encoding.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11391 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/dak/addons/dak/class_dakkeyring.inc | patch | blob | history |
diff --git a/gosa-plugins/dak/addons/dak/class_dakkeyring.inc b/gosa-plugins/dak/addons/dak/class_dakkeyring.inc
index e3518f4bd8543b97380599786b1d72634ac4a96e..921ac13c48576c41bf3b968a41c09411b38acf08 100644 (file)
/* Set default col styles
*/
$s0 = "style='width:10px;'";
- $s1 = "style='width:100px;'";
- $s2 = "style='width:100px;'";
- $s3 = "style='width:100px;'";
+ $s1 = "style='width:70px;'";
+ $s2 = "style='width:50px;'";
+ $s3 = "style='width:130px;'";
$s4 = "";
- $s5 = "style='width:100px; border-right:0px;'";
+ $s5 = "style='text-align: right;width:50px; border-right:0px;'";
/* Add header
*/
$h0 = array("string" => "", "attach" => $s0);
$h1 = array("string" => _("Key ID"), "attach" => $s1);
$h2 = array("string" => _("Length"), "attach" => $s2);
- $h3 = array("string" => _("Validity"), "attach" => $s3);
+ $h3 = array("string" => _("Status"), "attach" => $s3);
$h4 = array("string" => _("UID"), "attach" => $s4);
$h5 = array("string" => _("Action"), "attach" => $s5);
$divlist->SetHeader(array($h0,$h1,$h2,$h3,$h4,$h5));
if(!is_array($entry['UID'])){
$entry['UID'] = array($entry['UID']);
}
- $key_id = $length = $valid = "";
+ $key_id = $length = $created = $expired = $expires = "";
- if(isset($entry['ATTRIBUTES']['UID'])){
- $key_id = $entry['ATTRIBUTES']['UID'];
- }
- if(isset($entry['ATTRIBUTES']['LENGTH'])){
- $length = $entry['ATTRIBUTES']['LENGTH'];
- }
- if(isset($entry['ATTRIBUTES']['VALID'])){
- $valid = $entry['ATTRIBUTES']['VALID'];
+ foreach(array("key_id"=>"UID","length"=>"LENGTH","created"=>"CREATED","expired"=>"EXPIRED","expires"=>"EXPIRES") as $var => $name){
+ if(isset($entry['ATTRIBUTES'][$name])){
+ $$var = $entry['ATTRIBUTES'][$name];
+ }
}
+ $status ="-";
+ $title = " title='".sprintf(_("Created: %s"),$created)."' ";
+ if(empty($expires) && empty($expired)) $status = "<font $title style='color:green;'>"._("Valid")."</font>";
+ if(!empty($expired)) $status = "<font $title style='color:red; font-size:bold'>"._("Expired: ").$expired."</font>";
+ if(!empty($expires)) $status = "<font $title style='color:green;'>"._("Expires: ").$expires."</font>";
+
/* Create detail icon
*/
$hide = "<input type='image' name='details_".$key."' src='images/forward-arrow.png' alt='-' class='center'> ";
$f1 = array("string" => "","attach" => $s1);
$f2 = array("string" => "","attach" => $s2);
$f3 = array("string" => "","attach" => $s3);
- $f4 = array("string" => htmlentities($val) ,"attach" => $s4);
+ $f4 = array("string" => xmlentities(utf8_decode($val)), "attach" => $s4);
$f5 = array("string" => "","attach" => $s5);
if($first){
$f0 = array("string" => $hide ,"attach" => $s0);
$f1 = array("string" => $key_id ,"attach" => $s1);
$f2 = array("string" => $length ,"attach" => $s2);
- $f3 = array("string" => $valid ,"attach" => $s3);
- $f4 = array("string" => htmlentities($val) ,"attach" => $s4);
+ $f3 = array("string" => $status ,"attach" => $s3);
+ $f4 = array("string" => xmlentities(utf8_decode($val)), "attach" => $s4);
$f5 = array("string" => $actions ,"attach" => $s5);
}
$divlist->AddEntry(array($f0,$f1,$f2,$f3,$f4,$f5));
}
$f1 = array("string" => $key_id, "attach" => $s1);
$f2 = array("string" => $length, "attach" => $s2);
- $f3 = array("string" => $valid, "attach" => $s3);
- $f4 = array("string" => htmlentities($entry['UID'][0]), "attach" => $s4);
+ $f3 = array("string" => $status, "attach" => $s3);
+ $f4 = array("string" => xmlentities(utf8_decode($entry['UID'][0])), "attach" => $s4);
$f5 = array("string" => $actions,"attach" => $s5);
$divlist->AddEntry(array($f0,$f1,$f2,$f3,$f4,$f5));