Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Leif Andersson
ReglerAddress
Commits
09e6dea6
Commit
09e6dea6
authored
Sep 15, 2015
by
Leif Andersson
Browse files
B
parent
f7d48966
Changes
5
Hide whitespace changes
Inline
Side-by-side
action.defaultadmin.php
View file @
09e6dea6
...
...
@@ -55,6 +55,10 @@ if (isset($params['new'])) {
$this
->
Redirect
(
$id
,
'add_edit'
,
$returnid
,
array
());
}
if
(
isset
(
$params
[
'groupChange'
]))
{
$this
->
Redirect
(
$id
,
'editGroups'
,
$returnid
,
array
());
}
foreach
(
$fields
as
$key
=>
$res
)
{
$value
=
''
;
if
(
isset
(
$params
[
$key
]))
{
$value
=
trim
(
$params
[
$key
]);
}
...
...
@@ -70,6 +74,8 @@ $smarty->assign('searchButton',$place);
$place
=
$this
->
CreateInputSubmit
(
$id
,
'new'
,
'Ny post'
);
$smarty
->
assign
(
'newButton'
,
$place
);
$place
=
$this
->
CreateInputSubmit
(
$id
,
'groupChange'
,
'Hantera grupper'
);
$smarty
->
assign
(
'groupButton'
,
$place
);
$name
=
'Grupp'
;
$groupNames
=
array
(
' '
=>
'None'
);
...
...
action.editGroups.php
View file @
09e6dea6
...
...
@@ -8,8 +8,23 @@ if (! $this->CheckPermission('Use ReglerAddress')) {
}
require_once
'lib/class.Group.php'
;
$smarty
=
$this
->
smarty
;
$smarty
->
assign
(
'headline'
,
'Grupphantering'
);
$place
=
$this
->
CreateFormStart
(
$id
,
'editGroups'
,
$returnid
);
$smarty
->
assign
(
'start_form'
,
$place
);
$smarty
->
assign
(
'end_form'
,
$this
->
CreateFormEnd
());
$groups
=
Group
::
GetGroupList
();
foreach
(
$groups
as
$group
)
{
$group
->
change
=
'Change'
;
$group
->
print
=
'Print'
;
}
$smarty
->
assign
(
'Groups'
,
$groups
);
echo
$this
->
ProcessTemplate
(
'groupEditPanel.tpl'
);
...
...
lib/class.Group.php
View file @
09e6dea6
...
...
@@ -28,7 +28,7 @@ EOS;
EOS;
private
static
$groupFields
=
array
(
'ID'
,
'Gruppnamn'
,
'GruppInfo'
);
private
static
$buttonFields
=
array
(
'change'
,
'print'
);
private
static
$instance
;
...
...
@@ -36,6 +36,7 @@ EOS;
private
function
__construct
(
$param
=
NULL
)
{
foreach
(
self
::
$groupFields
as
$field
)
{
$this
->
$field
=
''
;}
foreach
(
self
::
$buttonFields
as
$field
)
{
$this
->
$field
=
''
;}
if
(
is_null
(
$param
))
return
;
if
(
is_array
(
$param
))
{
foreach
(
self
::
$groupFields
as
$field
)
{
...
...
templates/adminpanel.tpl
View file @
09e6dea6
...
...
@@ -12,7 +12,9 @@
<td
style=
"vertical-align:top;"
>
{
$selectgroup
}
</td></tr>
<tr><td
colspan=
"2"
style=
"text-align: center;"
>
{
$searchButton
}
{
$newButton
}
</td>
</tr></tbody></table>
</tr>
<tr><td
colspan=
"2"
style=
"text-align: center;"
>
{
$groupButton
}
</td></tr>
</tbody></table>
{
$end_form
}
{
if
!
empty
(
$Persons
)
}
...
...
templates/groupEditPanel.tpl
0 → 100644
View file @
09e6dea6
{
$start_form
}
<table
CELLPADDING=
"3"
align=
"center"
bgcolor=
"#f0f0ff"
>
<thead><tr><td
bgcolor=
"#000080"
colspan=
"5"
style=
"text-align: center;
font-size: 200%; font-weight:bold; color: white;"
>
{
$headline
}
</td></tr>
<tr><td
colspan=
"3"
><td>
</td></tr>
</thead>
<tbody>
{
if
!
empty
(
$groups
)
}
{
foreach
$groups
as
$group
}
<tr><td>
{
$group
->
ID
}
</td><td>
{
$group
->
Gruppnamn
}
</td>
<td>
{
$group
->
GruppInfo
}
</td><td>
{
$group
->
change
}
</td>
<td>
{
$group
->
print
}
</td></tr>
{/
foreach
}
{/
if
}
</tbody></table>
{
$hidden
}
{
$end_form
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment