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
3246beeb
Commit
3246beeb
authored
Jan 27, 2010
by
Richard Mansfield
Browse files
Add subtabs to detailed stats page
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
ba016b28
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/statistics.php
View file @
3246beeb
...
...
@@ -27,8 +27,7 @@
define
(
'INTERNAL'
,
1
);
define
(
'ADMIN'
,
1
);
define
(
'SECTION_PLUGINTYPE'
,
'core'
);
define
(
'SECTION_PLUGINNAME'
,
'admin'
);
define
(
'MENUITEM'
,
'adminhome'
);
require
(
dirname
(
dirname
(
__FILE__
))
.
'/init.php'
);
require
(
get_config
(
'libroot'
)
.
'registration.php'
);
...
...
@@ -41,11 +40,19 @@ if (!empty($sitedata['weekly'])) {
$sitedata
[
'dataarray'
]
=
json_encode
(
array
(
$sitedata
[
'weekly'
][
'view-count'
],
$sitedata
[
'weekly'
][
'user-count'
],
$sitedata
[
'weekly'
][
'group-count'
]));
}
$type
=
param_alpha
(
'type'
,
'users'
);
$subpages
=
array
(
'users'
,
'groups'
,
'views'
);
if
(
!
in_array
(
$type
,
$subpages
))
{
$type
=
'users'
;
}
$smarty
=
smarty
(
$jsfiles
);
$smarty
->
assign
(
'PAGEHEADING'
,
hsc
(
TITLE
));
if
(
isset
(
$sitedata
))
{
$smarty
->
assign
(
'sitedata'
,
$sitedata
);
$smarty
->
assign
(
'type'
,
$type
);
$smarty
->
assign
(
'subpages'
,
$subpages
);
}
$smarty
->
display
(
'admin/statistics.tpl'
);
...
...
htdocs/theme/raw/templates/admin/statistics.tpl
View file @
3246beeb
...
...
@@ -4,6 +4,16 @@
<div
class=
"site-stats"
>
{
include
file
=
'admin/stats.tpl'
cron
=
1
}
</div>
<ul
class=
"in-page-tabs"
>
{
foreach
from
=
$subpages
item
=
subpage
}
<li><a
{
if
$subpage
==
$type
}
class=
"current-tab"
{/
if
}
href=
"
{
$WWWROOT
}
admin/statistics.php?type=
{
$subpage
}
"
>
{
str
tag
=
$subpage
}
</a></li>
{/
foreach
}
</ul>
<div
class=
"subpage rel"
>
</div>
{/
if
}
{
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