Expose db picker for butterball theme

This commit is contained in:
Lance Edgar 2024-05-29 16:33:30 -05:00
parent 4ccdf99a43
commit 9a841ba5e2

View file

@ -715,26 +715,22 @@
% endif
% endif
## % if expose_db_picker is not Undefined and expose_db_picker:
## <div class="level-item">
## <p>DB:</p>
## </div>
## <div class="level-item">
## ${h.form(url('change_db_engine'), ref='dbPickerForm')}
## ${h.csrf_token(request)}
## ${h.hidden('engine_type', value=master.engine_type_key)}
## <b-select name="dbkey"
## value="${db_picker_selected}"
## @input="changeDB()">
## % for option in db_picker_options:
## <option value="${option.value}">
## ${option.label}
## </option>
## % endfor
## </b-select>
## ${h.end_form()}
## </div>
## % endif
% if expose_db_picker is not Undefined and expose_db_picker:
<span>DB:</span>
${h.form(url('change_db_engine'), ref='dbPickerForm')}
${h.csrf_token(request)}
${h.hidden('engine_type', value=master.engine_type_key)}
<b-select name="dbkey"
v-model="dbSelected"
@input="changeDB()">
% for option in db_picker_options:
<option value="${option.value}">
${option.label}
</option>
% endfor
</b-select>
${h.end_form()}
% endif
</div>
@ -1104,6 +1100,10 @@
globalSearchData: ${json.dumps(global_search_data)|n},
mountedHooks: [],
% if expose_db_picker is not Undefined and expose_db_picker:
dbSelected: ${json.dumps(db_picker_selected)|n},
% endif
% if expose_theme_picker and request.has_perm('common.change_app_theme'):
globalTheme: ${json.dumps(theme)|n},
% endif