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
c48f7edf
Commit
c48f7edf
authored
Dec 22, 2009
by
Richard Mansfield
Browse files
Add graph for users/groups/views weekly data
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
05fa15f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/index.php
View file @
c48f7edf
...
...
@@ -73,13 +73,22 @@ $closeform = pieform(array(
),
));
$smarty
=
smarty
();
$jsfiles
=
array
();
if
(
empty
(
$upgrades
))
{
$sitedata
=
site_statistics
();
if
(
!
empty
(
$sitedata
[
'weekly'
]))
{
$jsfiles
=
array
(
'js/PlotKit/excanvas.js'
,
'js/PlotKit/PlotKit.js'
);
$sitedata
[
'dataarray'
]
=
json_encode
(
$sitedata
[
'weekly'
]);
}
}
$smarty
=
smarty
(
$jsfiles
);
$smarty
->
assign
(
'PAGEHEADING'
,
hsc
(
get_string
(
'administration'
,
'admin'
)));
// normal admin page starts here
$smarty
->
assign
(
'upgrades'
,
$upgrades
);
if
(
empty
(
$upgrades
))
{
$smarty
->
assign
(
'sitedata'
,
site
_statistics
()
);
if
(
isset
(
$sitedata
))
{
$smarty
->
assign
(
'sitedata'
,
$
site
data
);
}
if
(
isset
(
$register
))
{
...
...
htdocs/theme/raw/static/style/admin.css
View file @
c48f7edf
...
...
@@ -164,6 +164,9 @@ input#register_register {
.site-stats
p
{
margin
:
.1em
;
}
#site-stats-graph
{
margin
:
0
.3em
1em
;
}
.admin-home-column
{
width
:
49%
;
...
...
htdocs/theme/raw/templates/admin/stats.tpl
View file @
c48f7edf
<div
class=
"site-stats"
>
<div
id=
"site-stats-graph"
class=
"fr"
width=
"300"
height=
"200"
>
</div>
{
if
$sitedata.weekly
}
<script
type=
"text/javascript"
>
addLoadEvent
(
function
()
{
literal
}{{/
literal
}
EasyPlot
(
'line'
,
{
literal
}{}{/
literal
}
,
$
(
'site-stats-graph'
),
{
$sitedata.dataarray
}
);
{
literal
}}{/
literal
}
);
</script>
{/
if
}
<div
class=
"site-stats fl"
>
<h5>
{
$sitedata.name
}
:
{
str
tag
=
sitestatistics
section
=
admin
}
</h5>
<p><strong>
{
str
tag
=
users
}
:
</strong>
{
$sitedata.users
}{
if
$sitedata.rank.users
}
(
{
str
tag
=
Rank
section
=
admin
}
: $sitedata.rank.users})
{/
if
}
</p>
<p><strong>
{
str
tag
=
groups
}
:
</strong>
{
$sitedata.groups
}{
if
$sitedata.rank.groups
}
(
{
str
tag
=
Rank
section
=
admin
}
: $sitedata.rank.groups})
{/
if
}
</p>
<p><strong>
{
str
tag
=
views
}
:
</strong>
{
$sitedata.views
}{
if
$sitedata.rank.views
}
(
{
str
tag
=
Rank
section
=
admin
}
: $sitedata.rank.views})
{/
if
}
</p>
</div>
\ No newline at end of file
</div>
<div
class=
"cb"
></div>
\ No newline at end of file
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