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
8266dbe2
Commit
8266dbe2
authored
Mar 20, 2015
by
Son Nguyen
Committed by
Gerrit Code Review
Mar 20, 2015
Browse files
Merge "Let blog block attachments expander work again (Bug #1424512)"
parents
6d1bb3d8
150aa10b
Changes
5
Show whitespace changes
Inline
Side-by-side
htdocs/artefact/blog/blocktype/blogpost/lib.php
View file @
8266dbe2
...
@@ -49,6 +49,7 @@ class PluginBlocktypeBlogpost extends PluginBlocktype {
...
@@ -49,6 +49,7 @@ class PluginBlocktypeBlogpost extends PluginBlocktype {
$configdata
[
'hidetitle'
]
=
true
;
$configdata
[
'hidetitle'
]
=
true
;
$configdata
[
'countcomments'
]
=
true
;
$configdata
[
'countcomments'
]
=
true
;
$configdata
[
'viewid'
]
=
$instance
->
get
(
'view'
);
$configdata
[
'viewid'
]
=
$instance
->
get
(
'view'
);
$configdata
[
'blockid'
]
=
$instance
->
get
(
'id'
);
$result
=
$artefact
->
render_self
(
$configdata
);
$result
=
$artefact
->
render_self
(
$configdata
);
$result
=
$result
[
'html'
];
$result
=
$result
[
'html'
];
require_once
(
get_config
(
'docroot'
)
.
'artefact/comment/lib.php'
);
require_once
(
get_config
(
'docroot'
)
.
'artefact/comment/lib.php'
);
...
...
htdocs/artefact/blog/blocktype/taggedposts/lib.php
View file @
8266dbe2
...
@@ -233,7 +233,7 @@ class PluginBlocktypeTaggedposts extends SystemBlocktype {
...
@@ -233,7 +233,7 @@ class PluginBlocktypeTaggedposts extends SystemBlocktype {
$result
->
taglist
[]
=
$t
->
tag
;
$result
->
taglist
[]
=
$t
->
tag
;
}
}
if
(
$full
)
{
if
(
$full
)
{
$rendered
=
$artefact
->
render_self
(
array
(
'viewid'
=>
$view
,
'details'
=>
true
));
$rendered
=
$artefact
->
render_self
(
array
(
'viewid'
=>
$view
,
'details'
=>
true
,
'blockid'
=>
$instance
->
get
(
'id'
)
));
$result
->
html
=
$rendered
[
'html'
];
$result
->
html
=
$rendered
[
'html'
];
if
(
!
empty
(
$rendered
[
'javascript'
]))
{
if
(
!
empty
(
$rendered
[
'javascript'
]))
{
$result
->
html
.
=
'<script type="application/javascript">'
.
$rendered
[
'javascript'
]
.
'</script>'
;
$result
->
html
.
=
'<script type="application/javascript">'
.
$rendered
[
'javascript'
]
.
'</script>'
;
...
...
htdocs/artefact/blog/lib.php
View file @
8266dbe2
...
@@ -686,6 +686,10 @@ class ArtefactTypeBlogPost extends ArtefactType {
...
@@ -686,6 +686,10 @@ class ArtefactTypeBlogPost extends ArtefactType {
}
}
}
}
$smarty
->
assign
(
'attachments'
,
$attachments
);
$smarty
->
assign
(
'attachments'
,
$attachments
);
if
(
isset
(
$options
[
'blockid'
]))
{
$smarty
->
assign
(
'blockid'
,
$options
[
'blockid'
]);
}
$smarty
->
assign
(
'postid'
,
$this
->
get
(
'id'
));
}
}
$smarty
->
assign
(
'postedbyon'
,
get_string
(
'postedbyon'
,
'artefact.blog'
,
$smarty
->
assign
(
'postedbyon'
,
get_string
(
'postedbyon'
,
'artefact.blog'
,
display_name
(
$this
->
owner
),
display_name
(
$this
->
owner
),
...
...
htdocs/theme/raw/artefact/blog/templates/render/blogpost_renderfull.tpl
View file @
8266dbe2
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
{
$artefactdescription
|
clean_html
|
safe
}
{
$artefactdescription
|
clean_html
|
safe
}
{
if
isset
(
$attachments
)
}
{
if
isset
(
$attachments
)
}
{
if
$artefacttags
}
<div
class=
"tags"
>
{
str
tag
=
tags
}
:
{
list_tags
owner
=
$artefactowner
tags
=
$artefacttags
}
</div>
{/
if
}
{
if
$artefacttags
}
<div
class=
"tags"
>
{
str
tag
=
tags
}
:
{
list_tags
owner
=
$artefactowner
tags
=
$artefacttags
}
</div>
{/
if
}
<table
class=
"cb attachments fullwidth"
>
<table
class=
"cb attachments fullwidth"
id=
"blockinstance-attachments-
{
$postid
}{
if
$blockid
}
-
{
$blockid
}{/
if
}
"
>
<thead
class=
"expandable-head"
>
<thead
class=
"expandable-head"
>
<tr>
<tr>
<td
colspan=
"2"
>
<td
colspan=
"2"
>
...
@@ -39,6 +39,9 @@
...
@@ -39,6 +39,9 @@
</div>
</div>
{/
if
}
{/
if
}
</div>
</div>
<script
type=
"application/javascript"
>
setupExpanders
(
$j
(
'
#blockinstance-attachments-
{
$postid
}
-
{
$blockid
}
'
));
</script>
{
else
}
{
else
}
<div>
<div>
{
$notpublishedblogpost
|
safe
}
{
$notpublishedblogpost
|
safe
}
...
...
htdocs/theme/raw/artefact/blog/templates/viewposts.tpl
View file @
8266dbe2
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<div
class=
"tags"
>
{
str
tag
=
tags
}
:
{
list_tags
owner
=
$post
->
owner
tags
=
$post
->
tags
}
</div>
<div
class=
"tags"
>
{
str
tag
=
tags
}
:
{
list_tags
owner
=
$post
->
owner
tags
=
$post
->
tags
}
</div>
{/
if
}
</div>
{/
if
}
</div>
{
if
$post
->
files
}
{
if
$post
->
files
}
<table
class=
"cb attachments fullwidth"
>
<table
class=
"cb attachments fullwidth"
id=
"blockinstance-attachments-
{
$post
->
id
}
-
{
$options.blockid
}
"
>
<thead
class=
"expandable-head"
>
<thead
class=
"expandable-head"
>
<tr>
<tr>
<td
colspan=
"2"
>
<td
colspan=
"2"
>
...
@@ -57,4 +57,7 @@
...
@@ -57,4 +57,7 @@
</div>
</div>
{/
if
}
{/
if
}
</div>
</div>
<script
type=
"application/javascript"
>
setupExpanders
(
$j
(
'
#blockinstance-attachments-
{
$post
->
id
}
-
{
$options.blockid
}
'
));
</script>
{/
foreach
}
{/
foreach
}
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