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
51a0dd57
Commit
51a0dd57
authored
Oct 17, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
Oct 17, 2015
Browse files
Merge "Fix artefact title display (bug: 1465107)"
parents
4a1a5558
94130a88
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/artefact.php
View file @
51a0dd57
...
@@ -38,6 +38,7 @@ if (!$artefact->in_view_list()) {
...
@@ -38,6 +38,7 @@ if (!$artefact->in_view_list()) {
// Build the path to the artefact through its parents.
// Build the path to the artefact through its parents.
$artefactpath
=
array
();
$artefactpath
=
array
();
// Reverse the order of ancestors so we can get $baseobject by working backwards through the ancestors
$ancestors
=
array_reverse
(
$artefact
->
get_item_ancestors
());
$ancestors
=
array_reverse
(
$artefact
->
get_item_ancestors
());
$artefactok
=
false
;
$artefactok
=
false
;
...
@@ -61,6 +62,8 @@ if (!empty($ancestors)) {
...
@@ -61,6 +62,8 @@ if (!empty($ancestors)) {
}
}
}
}
}
}
// Reverse the order back again so $artefactpath can display the paths from highest ancestor first
$artefactpath
=
array_reverse
(
$artefactpath
);
if
(
$artefactok
==
false
)
{
if
(
$artefactok
==
false
)
{
throw
new
AccessDeniedException
(
get_string
(
'artefactnotinview'
,
'error'
,
$artefactid
,
$viewid
));
throw
new
AccessDeniedException
(
get_string
(
'artefactnotinview'
,
'error'
,
$artefactid
,
$viewid
));
...
@@ -195,6 +198,7 @@ $smarty = smarty(
...
@@ -195,6 +198,7 @@ $smarty = smarty(
)
)
);
);
$smarty
->
assign
(
'artefacttitle'
,
$title
);
$smarty
->
assign
(
'artefact'
,
$content
);
$smarty
->
assign
(
'artefact'
,
$content
);
$smarty
->
assign
(
'artefactpath'
,
$artefactpath
);
$smarty
->
assign
(
'artefactpath'
,
$artefactpath
);
$smarty
->
assign
(
'INLINEJAVASCRIPT'
,
$inlinejavascript
);
$smarty
->
assign
(
'INLINEJAVASCRIPT'
,
$inlinejavascript
);
...
...
htdocs/theme/raw/templates/artefact/artefact.tpl
View file @
51a0dd57
...
@@ -9,27 +9,20 @@
...
@@ -9,27 +9,20 @@
</div>
</div>
{/
if
}
{/
if
}
<h1
class=
"page-header ptl"
>
<h1
class=
"page-header"
>
{
foreach
from
=
$artefactpath
item
=
a
name
=
'path'
}
{
if
count
(
$artefactpath
)
==
0
}
{
if
$a.url
}
{
$artefacttitle
}
{
if
$
.
foreach
.
path
.
total
==
1
}
{
else
}
{
$a.title
}
{
foreach
from
=
$artefactpath
item
=
a
name
=
'path'
}
{
elseif
$
.
foreach
.
path
.
last
}
<span
class=
"lead text-small"
>
<br
/>
<a
href=
"
{
$a.url
}
"
>
<span
class=
"subsection-heading"
>
{
$a.title
}
{
$a.title
}
</span>
</a>
/
{
else
}
</span>
<span
class=
"lead text-small ptl"
>
{/
foreach
}
<a
href=
"
{
$a.url
}
"
>
<br>
{
$a.title
}
<span
class=
"subsection-heading"
>
{
$artefacttitle
}
</span>
</a>
/
{/
if
}
</span>
{/
if
}
{
else
}
{
$a.title
}
{/
if
}
{/
foreach
}
<span
class=
"metadata"
>
<span
class=
"metadata"
>
|
{
$view
->
display_title
()|
safe
}
|
{
$view
->
display_title
()|
safe
}
{
if
$hasfeed
}
{
if
$hasfeed
}
...
...
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