# HG changeset patch # User Marcin Kuzminski # Date 2016-09-02 12:52:14 # Node ID 19af1ba936ffd341c7fe71aa497976c9fa7d86d7 # Parent 0147d45dab971f562c2d461eb042fd61e5e409d6 labs: show a text that there are no active labs settings diff --git a/rhodecode/templates/admin/settings/settings_labs.html b/rhodecode/templates/admin/settings/settings_labs.html --- a/rhodecode/templates/admin/settings/settings_labs.html +++ b/rhodecode/templates/admin/settings/settings_labs.html @@ -6,45 +6,49 @@ ${h.secure_form(url('admin_settings_labs'), method='post')}
- % for lab_setting in c.lab_settings: -
-
- -
- % if lab_setting.type == 'bool': -
-
- ${h.checkbox(lab_setting.key, 'True')} - % if lab_setting.label: - - % endif + % if not c.lab_settings: + ${_('There are no Labs settings currently')} + % else: + % for lab_setting in c.lab_settings: +
+
+
- % if lab_setting.help: -

${lab_setting.help}

+ % if lab_setting.type == 'bool': +
+
+ ${h.checkbox(lab_setting.key, 'True')} + % if lab_setting.label: + + % endif +
+ % if lab_setting.help: +

${lab_setting.help}

+ % endif +
+ % else: +
+ ${h.text(lab_setting.key, size=60)} + + ## TODO: johbo: This style does not yet exist for our forms, + ## the lab settings seem not to adhere to the structure which + ## we use in other places. + % if lab_setting.label: + + % endif + + % if lab_setting.help: +

${lab_setting.help}

+ % endif +
% endif
- % else: -
- ${h.text(lab_setting.key, size=60)} - - ## TODO: johbo: This style does not yet exist for our forms, - ## the lab settings seem not to adhere to the structure which - ## we use in other places. - % if lab_setting.label: - - % endif - - % if lab_setting.help: -

${lab_setting.help}

- % endif + % endfor +
+ ${h.submit('save', _('Save settings'), class_='btn')} + ${h.reset('reset', _('Reset'), class_='btn')}
- % endif -
- % endfor -
- ${h.submit('save', _('Save settings'), class_='btn')} - ${h.reset('reset', _('Reset'), class_='btn')} -
+ % endif
${h.end_form()}