Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
23c30e08
Commit
23c30e08
authored
Aug 29, 2008
by
Richard Mansfield
Browse files
Add group menu to more group pages
parent
81f9f076
Changes
11
Show whitespace changes
Inline
Side-by-side
htdocs/group/delete.php
View file @
23c30e08
...
...
@@ -30,6 +30,7 @@ require(dirname(dirname(__FILE__)) . '/init.php');
require_once
(
'pieforms/pieform.php'
);
require
(
'group.php'
);
$groupid
=
param_integer
(
'id'
);
define
(
'GROUP'
,
$groupid
);
$group
=
get_record_sql
(
"SELECT g.name
FROM
{
group
}
g
...
...
htdocs/group/edit.php
View file @
23c30e08
...
...
@@ -32,6 +32,7 @@ require_once('group.php');
define
(
'TITLE'
,
get_string
(
'editgroup'
,
'group'
));
$id
=
param_integer
(
'id'
);
define
(
'GROUP'
,
$id
);
$group_data
=
get_record_sql
(
"SELECT g.name, g.description, g.grouptype, g.jointype
FROM
{
group
}
g
...
...
htdocs/group/invite.php
View file @
23c30e08
...
...
@@ -32,10 +32,8 @@ require('group.php');
$groupid
=
param_integer
(
'id'
);
$userid
=
param_integer
(
'user'
);
$group
=
get_record
(
'group'
,
'id'
,
$groupid
,
'deleted'
,
0
);
if
(
!
$group
)
{
throw
new
GroupNotFoundException
(
get_string
(
'groupnotfound'
,
'group'
,
$groupid
));
}
define
(
'GROUP'
,
$groupid
);
$group
=
group_current_group
();
$user
=
get_record
(
'usr'
,
'id'
,
$userid
,
'deleted'
,
0
);
if
(
!
$user
)
{
...
...
@@ -83,7 +81,6 @@ $form = pieform(array(
$smarty
=
smarty
();
$smarty
->
assign
(
'heading'
,
TITLE
);
$smarty
->
assign
(
'form'
,
$form
);
$smarty
->
assign
(
'group'
,
$group
);
$smarty
->
display
(
'group/invite.tpl'
);
function
invitetogroup_submit
(
Pieform
$form
,
$values
)
{
...
...
htdocs/group/leave.php
View file @
23c30e08
...
...
@@ -32,10 +32,8 @@ require('group.php');
$groupid
=
param_integer
(
'id'
);
$returnto
=
param_alpha
(
'returnto'
,
'mygroups'
);
$group
=
get_record
(
'group'
,
'id'
,
$groupid
,
'deleted'
,
0
);
if
(
!
$group
)
{
throw
new
GroupNotFoundException
(
get_string
(
'groupnotfound'
,
'group'
,
$groupid
));
}
define
(
'GROUP'
,
$groupid
);
$group
=
group_current_group
();
define
(
'TITLE'
,
get_string
(
'leavespecifiedgroup'
,
'group'
,
$group
->
name
));
...
...
htdocs/group/requestjoin.php
View file @
23c30e08
...
...
@@ -32,10 +32,8 @@ require('group.php');
$groupid
=
param_integer
(
'id'
);
$returnto
=
param_alpha
(
'returnto'
,
'mygroups'
);
$group
=
get_record
(
'group'
,
'id'
,
$groupid
,
'deleted'
,
0
);
if
(
!
$group
)
{
throw
new
GroupNotFoundException
(
get_string
(
'groupnotfound'
,
'group'
,
$groupid
));
}
define
(
'GROUP'
,
$groupid
);
$group
=
group_current_group
();
if
(
$group
->
jointype
!=
'request'
||
record_exists
(
'group_member'
,
'group'
,
$groupid
,
'member'
,
$USER
->
get
(
'id'
))
...
...
@@ -73,7 +71,6 @@ $form = pieform(array(
$smarty
=
smarty
();
$smarty
->
assign
(
'heading'
,
TITLE
);
$smarty
->
assign
(
'form'
,
$form
);
$smarty
->
assign
(
'group'
,
$group
);
$smarty
->
display
(
'group/requestjoin.tpl'
);
function
requestjoingroup_submit
(
Pieform
$form
,
$values
)
{
...
...
htdocs/interaction/delete.php
View file @
23c30e08
...
...
@@ -36,10 +36,8 @@ require_once('group.php');
$id
=
param_integer
(
'id'
);
$instance
=
interaction_instance_from_id
(
$id
);
if
(
!
$group
=
get_record
(
'group'
,
'id'
,
$instance
->
get
(
'group'
),
'deleted'
,
0
))
{
throw
new
GroupNotFoundException
(
get_string
(
'groupnotfound'
,
'group'
,
$id
));
}
define
(
'GROUP'
,
$instance
->
get
(
'group'
));
$group
=
group_current_group
();
$membership
=
group_user_access
((
int
)
$group
->
id
);
if
(
$membership
!=
'admin'
)
{
...
...
@@ -72,7 +70,6 @@ $smarty = smarty(array('tablerenderer'), array(), array(), array('sideblocks' =>
$smarty
->
assign
(
'form'
,
$form
);
$smarty
->
assign
(
'heading'
,
TITLE
);
$smarty
->
assign
(
'message'
,
get_string
(
'deleteinteractionsure'
,
'group'
));
$smarty
->
assign
(
'group'
,
$group
);
$smarty
->
display
(
'interaction/delete.tpl'
);
?>
htdocs/interaction/edit.php
View file @
23c30e08
...
...
@@ -49,11 +49,10 @@ else {
define
(
'TITLE'
,
get_string
(
'addtitle'
,
'interaction.'
.
$plugin
));
}
define
(
'GROUP'
,
$groupid
);
$group
=
group_current_group
();
safe_require
(
'interaction'
,
$plugin
);
if
(
!
$group
=
get_record
(
'group'
,
'id'
,
$groupid
,
'deleted'
,
0
))
{
throw
new
GroupNotFoundException
(
get_string
(
'groupnotfound'
,
'group'
,
$groupid
));
}
$membership
=
group_user_access
(
$groupid
);
if
(
$membership
!=
'admin'
)
{
throw
new
AccessDeniedException
(
get_string
(
'notallowedtoeditinteractions'
,
'group'
));
...
...
@@ -84,7 +83,6 @@ $form = pieform(array(
$smarty
=
smarty
(
array
(
'tablerenderer'
),
array
(),
array
(),
array
(
'sideblocks'
=>
array
(
interaction_sideblock
(
$groupid
))));
$smarty
->
assign
(
'form'
,
$form
);
$smarty
->
assign
(
'heading'
,
TITLE
);
$smarty
->
assign
(
'group'
,
$group
);
$smarty
->
display
(
'interaction/edit.tpl'
);
?>
htdocs/theme/default/templates/group/invite.tpl
View file @
23c30e08
...
...
@@ -3,7 +3,7 @@
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
$heading
|
escape
}
</h2>
{
include
file
=
"group/simplegroup.tpl"
group
=
$
group
}
{
include
file
=
"group/simplegroup.tpl"
group
=
$
GROUP
}
{
$form
}
{
include
file
=
"columnleftend.tpl"
}
{
include
file
=
"footer.tpl"
}
htdocs/theme/default/templates/group/requestjoin.tpl
View file @
23c30e08
...
...
@@ -3,7 +3,7 @@
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
$heading
|
escape
}
</h2>
{
include
file
=
"group/simplegroup.tpl"
group
=
$
group
}
{
include
file
=
"group/simplegroup.tpl"
group
=
$
GROUP
}
{
$form
}
{
include
file
=
"columnleftend.tpl"
}
{
include
file
=
"footer.tpl"
}
htdocs/theme/default/templates/interaction/delete.tpl
View file @
23c30e08
...
...
@@ -2,7 +2,7 @@
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
$
group
->
name
|
escape
}
</h2>
<h2>
{
$
GROUP
->
name
|
escape
}
</h2>
<div
class=
"message"
>
<h3>
{
$heading
|
escape
}
</h3>
<p>
{
$message
}
</p>
...
...
htdocs/theme/default/templates/interaction/edit.tpl
View file @
23c30e08
...
...
@@ -2,7 +2,7 @@
{
include
file
=
"sidebar.tpl"
}
{
include
file
=
"columnleftstart.tpl"
}
<h2>
{
$
group
->
name
|
escape
}
-
{
$heading
|
escape
}
</h2>
<h2>
{
$
GROUP
->
name
|
escape
}
-
{
$heading
|
escape
}
</h2>
{
$form
}
{
include
file
=
"columnleftend.tpl"
}
{
include
file
=
"footer.tpl"
}
...
...
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