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
211ccf64
Commit
211ccf64
authored
May 03, 2011
by
Richard Mansfield
Committed by
Gerrit Code Review
May 03, 2011
Browse files
Merge "Alter view theme dropdown to enable no theme selection"
parents
b49922ea
66dd9e40
Changes
4
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/mahara.php
View file @
211ccf64
...
...
@@ -595,6 +595,7 @@ function get_user_accessible_themes() {
}
}
$themes
=
array_merge
(
array
(
'sitedefault'
=>
'- '
.
get_string
(
'sitedefault'
,
'admin'
)
.
' ('
.
$themes
[
get_config
(
'theme'
)]
.
') -'
),
$themes
);
return
$themes
;
}
...
...
htdocs/lib/view.php
View file @
211ccf64
...
...
@@ -1799,6 +1799,9 @@ class View {
if
(
$theme
=
$values
[
'theme'
])
{
$themes
=
get_user_accessible_themes
();
if
(
isset
(
$themes
[
$theme
]))
{
if
(
$theme
==
'sitedefault'
)
{
$theme
=
null
;
}
$this
->
set
(
'theme'
,
$theme
);
$this
->
commit
();
}
...
...
htdocs/theme/raw/templates/view/blocks.tpl
View file @
211ccf64
...
...
@@ -33,7 +33,6 @@
<div
id=
"middle-pane"
class=
"center"
>
<label
for=
"viewtheme-select"
>
{
str
tag
=
theme
}
:
</label>
<select
id=
"viewtheme-select"
name=
"viewtheme"
>
<option
value=
""
>
{
str
tag
=
choosetheme
}
</option>
{
foreach
from
=
$viewthemes
key
=
themeid
item
=
themename
}
<option
value=
"
{
$themeid
}
"
{
if
$themeid
==
$viewtheme
}
selected=
"selected"
style=
"font-weight: bold;"
{/
if
}
>
{
$themename
}
</option>
{/
foreach
}
...
...
htdocs/theme/raw/templates/view/changetheme.tpl
View file @
211ccf64
...
...
@@ -8,7 +8,6 @@
<input
type=
"hidden"
name=
"sesskey"
value=
"
{
$SESSKEY
}
"
>
<label
for=
"viewtheme-select"
>
{
str
tag
=
theme
}
:
</label>
<select
id=
"viewtheme-select"
name=
"viewtheme"
>
<option
value=
""
>
{
str
tag
=
choosetheme
}
</option>
{
foreach
from
=
$viewthemes
key
=
themeid
item
=
themename
}
<option
value=
"
{
$themeid
}
"
{
if
$themeid
==
$viewtheme
}
selected=
"selected"
style=
"font-weight: bold;"
{/
if
}
>
{
$themename
}
</option>
{/
foreach
}
...
...
Write
Preview
Markdown
is supported
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