changed PDF output

This commit is contained in:
Roland Gruber 2009-02-01 15:56:48 +00:00
parent 7d8eb0406a
commit b8974a6872
1 changed files with 17 additions and 3 deletions

View File

@ -193,6 +193,7 @@ class nisnetgroup extends baseModule {
array('kind' => 'input', 'type' => 'text', 'name' => 'user_' . $i, 'value' => $triple[1]), array('kind' => 'input', 'type' => 'text', 'name' => 'user_' . $i, 'value' => $triple[1]),
array('kind' => 'input', 'type' => 'submit', 'name' => 'form_subpage_nisnetgroup_select_user' . $i, 'image' => 'user.png', 'value' => ' ', 'title' => _('Select user')), array('kind' => 'input', 'type' => 'submit', 'name' => 'form_subpage_nisnetgroup_select_user' . $i, 'image' => 'user.png', 'value' => ' ', 'title' => _('Select user')),
array('kind' => 'input', 'type' => 'text', 'name' => 'domain_' . $i, 'value' => $triple[2]), array('kind' => 'input', 'type' => 'text', 'name' => 'domain_' . $i, 'value' => $triple[2]),
array('kind' => 'text', 'text' => ' '),
array('kind' => 'input', 'type' => 'submit', 'name' => 'del_' . $i, 'image' => 'delete.png', 'value' => ' ', 'title' => _('Delete')) array('kind' => 'input', 'type' => 'submit', 'name' => 'del_' . $i, 'image' => 'delete.png', 'value' => ' ', 'title' => _('Delete'))
); );
} }
@ -214,6 +215,7 @@ class nisnetgroup extends baseModule {
array('kind' => 'input', 'type' => 'text', 'name' => 'user_new', 'value' => $userNew), array('kind' => 'input', 'type' => 'text', 'name' => 'user_new', 'value' => $userNew),
array('kind' => 'input', 'type' => 'submit', 'name' => 'form_subpage_nisnetgroup_select_userNew', 'image' => 'user.png', 'value' => ' ', 'title' => _('Select user')), array('kind' => 'input', 'type' => 'submit', 'name' => 'form_subpage_nisnetgroup_select_userNew', 'image' => 'user.png', 'value' => ' ', 'title' => _('Select user')),
array('kind' => 'input', 'type' => 'text', 'name' => 'domain_new', 'value' => $domainNew), array('kind' => 'input', 'type' => 'text', 'name' => 'domain_new', 'value' => $domainNew),
array('kind' => 'text', 'text' => ' '),
array('kind' => 'input', 'type' => 'submit', 'name' => 'add_new', 'image' => 'add.png', 'value' => ' ', 'title' => _('Add')) array('kind' => 'input', 'type' => 'submit', 'name' => 'add_new', 'image' => 'add.png', 'value' => ' ', 'title' => _('Add'))
); );
$return[] = array( $return[] = array(
@ -514,10 +516,22 @@ class nisnetgroup extends baseModule {
$return[get_class($this) . '_subgroups'] = array('<block><key>' . _('Subgroups') . '</key><value>' . implode(', ', $this->attributes['memberNisNetgroup']) . '</value></block>'); $return[get_class($this) . '_subgroups'] = array('<block><key>' . _('Subgroups') . '</key><value>' . implode(', ', $this->attributes['memberNisNetgroup']) . '</value></block>');
} }
if (sizeof($this->attributes['nisNetgroupTriple']) > 0) { if (sizeof($this->attributes['nisNetgroupTriple']) > 0) {
$return[get_class($this) . '_members'][0] = '<block><key>' . _('Members') . '</key><tr><td align=\"L\">' . $this->attributes['nisNetgroupTriple'][0] . '</td></tr></block>'; $return[get_class($this) . '_subgroups'] = array('<block><key>' . _('Members') . '</key><value> </value></block>');
for ($i = 1; $i < sizeof($this->attributes['nisNetgroupTriple']); $i++) { $return[get_class($this) . '_members'][] = '<block><tr><td width="30%"> </td>' .
$return[get_class($this) . '_members'][] = '<block><tr><td align=\"L\">' . $this->attributes['nisNetgroupTriple'][$i] . '</td></tr></block>'; '<td width="20%"><b>' . _('Host') . '</b></td>' .
'<td width="20%"><b>' . _('User') . '</b></td>' .
'<td width="30%"><b>' . _('Domain') . '</b></td>' .
'</tr></block>';
for ($i = 0; $i < sizeof($this->attributes['nisNetgroupTriple']); $i++) {
$triple = substr($this->attributes['nisNetgroupTriple'][$i], 1, strlen($this->attributes['nisNetgroupTriple'][$i]) - 2);
$triple = explode(',', $triple);
$return[get_class($this) . '_members'][] = '<block><tr><td width="30%"> </td>' .
'<td width="20%" align=\"L\">' . $triple[0] . ' </td>' .
'<td width="20%" align=\"L\">' . $triple[1] . ' </td>' .
'<td width="30%" align=\"L\">' . $triple[2] . ' </td>' .
'</tr></block>';
} }
$return[get_class($this) . '_members'][] = '<block><tr><td width="80%"> </td></tr></block>';
} }
return $return; return $return;
} }