Skip to content
GitLab
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
230c0629
Commit
230c0629
authored
Nov 27, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
Nov 27, 2015
Browse files
Merge "Bug 1515484: The my views block on dashboard had broken pagination"
parents
6ab16288
b86741d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/blog/index.json.php
View file @
230c0629
...
...
@@ -19,9 +19,11 @@ safe_require('artefact', 'blog');
$blogs
=
(
object
)
array
(
'offset'
=>
param_integer
(
'offset'
,
0
),
'limit'
=>
param_integer
(
'limit'
,
10
),
'institution'
=>
param_alpha
(
'institution'
,
null
),
'group'
=>
param_integer
(
'group'
,
null
),
);
list
(
$blogs
->
count
,
$blogs
->
data
)
=
ArtefactTypeBlog
::
get_blog_list
(
$blogs
->
limit
,
$blogs
->
offset
);
list
(
$blogs
->
count
,
$blogs
->
data
)
=
ArtefactTypeBlog
::
get_blog_list
(
$blogs
->
limit
,
$blogs
->
offset
,
$blogs
->
institution
,
$blogs
->
group
);
ArtefactTypeBlog
::
build_blog_list_html
(
$blogs
);
json_reply
(
false
,
array
(
'data'
=>
$blogs
));
htdocs/artefact/blog/lib.php
View file @
230c0629
...
...
@@ -406,6 +406,7 @@ class ArtefactTypeBlog extends ArtefactType {
'count'
=>
$blogs
->
count
,
'limit'
=>
$blogs
->
limit
,
'offset'
=>
$blogs
->
offset
,
'setlimit'
=>
true
,
'firsttext'
=>
''
,
'previoustext'
=>
''
,
'nexttext'
=>
''
,
...
...
htdocs/blocktype/myviews/myviews.json.php
View file @
230c0629
...
...
@@ -31,11 +31,11 @@ $dashboard = new View($viewid);
if
(
!
can_view_view
(
$dashboard
))
{
json_reply
(
true
,
get_string
(
'accessdenied'
,
'error'
));
}
$userid
=
$USER
->
get
(
'id'
);
$views
=
View
::
view_search
(
null
,
// $query
null
,
// $ownerquery
(
object
)
array
(
'owner'
=>
$
userid
),
// $ownedby
(
object
)
array
(
'owner'
=>
$
dashboard
->
get
(
'owner'
)
),
// $ownedby
null
,
// $copyableby
10
,
// $limit
$offset
,
// $offset
...
...
htdocs/theme/raw/plugintype/artefact/blog/templates/index.tpl
View file @
230c0629
...
...
@@ -8,9 +8,11 @@
{
if
!
$blogs
->
data
}
<p
class=
"no-results"
>
{
str
tag
=
youhavenoblogs
section
=
artefact
.
blog
}
</p>
{
else
}
<div
id=
"bloglist"
class=
"rel view-container"
>
<div
class=
"rel view-container"
>
<div
class=
"panel-items js-masonry"
data-masonry-options=
'{ "itemSelector": ".panel" }'
>
{
$blogs
->
tablerows
|
safe
}
<div
id=
"bloglist"
>
{
$blogs
->
tablerows
|
safe
}
</div>
</div>
{
$blogs
->
pagination
|
safe
}
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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