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
c2a4db8a
Commit
c2a4db8a
authored
Feb 27, 2014
by
Robert Lyon
Committed by
Gerrit Code Review
Feb 27, 2014
Browse files
Merge "Use view theme and skin for artefacts linked in view (Bug #1274083)"
parents
7ccf0af5
e8d6ecfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/view/artefact.php
View file @
c2a4db8a
...
...
@@ -146,8 +146,24 @@ if ($notrudeform = $view->notrude_form()) {
$viewbeingwatched
=
(
int
)
record_exists
(
'usr_watchlist_view'
,
'usr'
,
$USER
->
get
(
'id'
),
'view'
,
$viewid
);
// Set up theme
$viewtheme
=
$view
->
get
(
'theme'
);
if
(
$viewtheme
&&
$THEME
->
basename
!=
$viewtheme
)
{
$THEME
=
new
Theme
(
$viewtheme
);
}
$headers
=
array
(
'<link rel="stylesheet" type="text/css" href="'
.
get_config
(
'wwwroot'
)
.
'theme/views.css?v='
.
get_config
(
'release'
)
.
'">'
,);
// Set up skin, if the page has one
$owner
=
$view
->
get
(
'owner'
);
$viewskin
=
$view
->
get
(
'skin'
);
if
(
$viewskin
&&
get_config
(
'skins'
)
&&
can_use_skins
(
$owner
)
&&
(
!
isset
(
$THEME
->
skins
)
||
$THEME
->
skins
!==
false
))
{
$skin
=
array
(
'skinid'
=>
$viewskin
,
'viewid'
=>
$view
->
get
(
'id'
));
$skindata
=
unserialize
(
get_field
(
'skin'
,
'viewskin'
,
'id'
,
$viewskin
));
}
else
{
$skin
=
false
;
}
$hasfeed
=
false
;
$feedlink
=
''
;
// add a link to the ATOM feed in the header if the view is public
...
...
@@ -165,6 +181,7 @@ $smarty = smarty(
array
(
'stylesheets'
=>
$extrastylesheets
,
'sidebars'
=>
false
,
'skin'
=>
$skin
,
)
);
...
...
@@ -176,6 +193,16 @@ if (get_config('viewmicroheaders')) {
$smarty
->
assign
(
'maharalogofilename'
,
'images/site-logo-small.png'
);
$smarty
->
assign
(
'microheaders'
,
true
);
$smarty
->
assign
(
'microheadertitle'
,
$view
->
display_title
(
true
,
false
));
// Support for normal, light, or dark small Mahara logo - to use with skins
if
(
$skin
)
{
if
(
$skindata
[
'header_logo_image'
]
==
'light'
)
{
$smarty
->
assign
(
'maharalogofilename'
,
'images/site-logo-small-light.png'
);
}
else
if
(
$skindata
[
'header_logo_image'
]
==
'dark'
)
{
$smarty
->
assign
(
'maharalogofilename'
,
'images/site-logo-small-dark.png'
);
}
}
}
$smarty
->
assign
(
'view'
,
$view
);
...
...
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