Commit 9590a268 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add config option to turn off view theme selector


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent b473db7d
......@@ -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];
......
......@@ -26,6 +26,7 @@
<td>
<a id="layout-link" href="columns.php?id={$view}&amp;c={$category}&amp;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}&amp;new={$new}">{str tag=displaymyview section=view} &raquo;</a></td>
</td>
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment