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
9590a268
Commit
9590a268
authored
Jan 27, 2010
by
Richard Mansfield
Browse files
Add config option to turn off view theme selector
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
b473db7d
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/js/views.js
View file @
9590a268
...
...
@@ -771,6 +771,9 @@ function ViewManager() {
* Wire up the view theme selector
*/
this
.
rewriteViewThemeSelector
=
function
()
{
if
(
!
self
.
viewThemeSelect
)
{
return
;
}
var
currentTheme
=
self
.
viewThemeSelect
.
selectedIndex
;
connect
(
self
.
viewThemeSelect
,
'
onchange
'
,
function
(
e
)
{
var
choice
=
self
.
viewThemeSelect
.
options
[
self
.
viewThemeSelect
.
selectedIndex
];
...
...
htdocs/theme/raw/templates/view/blocks.tpl
View file @
9590a268
...
...
@@ -26,6 +26,7 @@
<td>
<a
id=
"layout-link"
href=
"columns.php?id=
{
$view
}
&c=
{
$category
}
&new=
{
$new
}
"
{
if
!
$can_change_layout
}
class=
"disabled"
{/
if
}
>
{
str
tag
=
'changeviewlayout'
section
=
'view'
}
</a>
{
contextualhelp
plugintype
=
"core"
pluginname
=
"view"
section
=
"changeviewlayout"
}
</td>
{
if
$viewthemes
}
<td
class=
"center"
>
<label
for=
"viewtheme-select"
>
{
str
tag
=
theme
}
:
</label>
<select
id=
"viewtheme-select"
name=
"viewtheme"
>
...
...
@@ -35,6 +36,7 @@
{/
foreach
}
</select>
</td>
{/
if
}
<td
class=
"right"
>
<a
id=
"btn-displaymyview"
href=
"view.php?id=
{
$view
}
&new=
{
$new
}
"
>
{
str
tag
=
displaymyview
section
=
view
}
»
</a></td>
</td>
...
...
htdocs/view/blocks.php
View file @
9590a268
...
...
@@ -237,8 +237,10 @@ $smarty->assign('groupid', $group);
$smarty
->
assign
(
'institution'
,
$institution
);
$smarty
->
assign
(
'can_change_layout'
,
(
!
$USER
->
get_account_preference
(
'addremovecolumns'
)
||
(
$view
->
get
(
'numcolumns'
)
>
1
&&
$view
->
get
(
'numcolumns'
)
<
5
)));
$smarty
->
assign
(
'viewtheme'
,
$viewtheme
);
$smarty
->
assign
(
'viewthemes'
,
$allowedthemes
);
if
(
get_config
(
'userscanchooseviewthemes'
))
{
$smarty
->
assign
(
'viewtheme'
,
$viewtheme
);
$smarty
->
assign
(
'viewthemes'
,
$allowedthemes
);
}
$smarty
->
assign
(
'viewid'
,
$view
->
get
(
'id'
));
$smarty
->
assign
(
'viewtitle'
,
$viewtitle
);
...
...
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