##// END OF EJS Templates
ui: new commits page....
ui: new commits page. - changes according to design - consistency, space saving etc

File last commit:

r3584:ed59d605 new-ui
r3882:74da9073 default
Show More
plugin_settings.mako
135 lines | 4.7 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 ## -*- coding: utf-8 -*-
<%inherit file="/base/base.mako"/>
<%def name="title()">
auth: fixed missing upper context navigation in plugin view
r3584 ${_('Authentication Settings')}
%if c.rhodecode_name:
templating: use .mako as extensions for template files.
r1282 &middot; ${h.branding(c.rhodecode_name)}}
auth: fixed missing upper context navigation in plugin view
r3584 %endif
templating: use .mako as extensions for template files.
r1282 </%def>
<%def name="breadcrumbs_links()">
audit-logs: introduced new view to replace admin journal....
r1758 ${h.link_to(_('Admin'),h.route_path('admin_home'))}
templating: use .mako as extensions for template files.
r1282 &raquo;
${h.link_to(_('Authentication Plugins'),request.resource_path(resource.__parent__, route_name='auth_home'))}
&raquo;
${resource.display_name}
</%def>
<%def name="menu_bar_nav()">
auth: fixed missing upper context navigation in plugin view
r3584 ${self.menu_items(active='admin')}
</%def>
<%def name="menu_bar_subnav()">
${self.admin_menu(active='authentication')}
templating: use .mako as extensions for template files.
r1282 </%def>
<%def name="main()">
auth: fixed missing upper context navigation in plugin view
r3584
templating: use .mako as extensions for template files.
r1282 <div class="box">
auth: fixed missing upper context navigation in plugin view
r3584
templating: use .mako as extensions for template files.
r1282 <div class='sidebar-col-wrapper'>
<div class="sidebar">
<ul class="nav nav-pills nav-stacked">
% for item in resource.get_root().get_nav_list():
auth: fixed missing upper context navigation in plugin view
r3584 <li ${('class=active' if item == resource else '')}>
templating: use .mako as extensions for template files.
r1282 <a href="${request.resource_path(item, route_name='auth_home')}">${item.display_name}</a>
</li>
% endfor
</ul>
</div>
<div class="main-content-full-width">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('Plugin')}: ${resource.display_name}</h3>
</div>
<div class="panel-body">
<div class="plugin_form">
<div class="fields">
pyramid: if possible fetch csrf tokens from pyramid session....
r1918 ${h.secure_form(request.resource_path(resource, route_name='auth_home'), request=request)}
templating: use .mako as extensions for template files.
r1282 <div class="form">
%for node in plugin.get_settings_schema():
auth-plugins: use large fields, and add support for textarea type.
r3245 <%
label_to_type = {'label-checkbox': 'bool', 'label-textarea': 'textarea'}
%>
templating: use .mako as extensions for template files.
r1282 <div class="field">
auth-plugins: use large fields, and add support for textarea type.
r3245 <div class="label ${label_to_type.get(node.widget)}"><label for="${node.name}">${node.title}</label></div>
templating: use .mako as extensions for template files.
r1282 <div class="input">
%if node.widget in ["string", "int", "unicode"]:
auth-plugins: use large fields, and add support for textarea type.
r3245 ${h.text(node.name, defaults.get(node.name), class_="large")}
templating: use .mako as extensions for template files.
r1282 %elif node.widget == "password":
auth-plugins: use large fields, and add support for textarea type.
r3245 ${h.password(node.name, defaults.get(node.name), class_="large")}
templating: use .mako as extensions for template files.
r1282 %elif node.widget == "bool":
<div class="checkbox">${h.checkbox(node.name, True, checked=defaults.get(node.name))}</div>
%elif node.widget == "select":
auth-plugins, ui: added some tweeks to the ui...
r3252 ${h.select(node.name, defaults.get(node.name), node.validator.choices, class_="select2AuthSetting")}
authentication: introduce login restriction option for builtin rhodecode plugin.
r3387 %elif node.widget == "select_with_labels":
${h.select(node.name, defaults.get(node.name), node.choices, class_="select2AuthSetting")}
auth-plugins: use large fields, and add support for textarea type.
r3245 %elif node.widget == "textarea":
<div class="textarea" style="margin-left: 0px">${h.textarea(node.name, defaults.get(node.name), rows=10)}</div>
templating: use .mako as extensions for template files.
r1282 %elif node.widget == "readonly":
${node.default}
%else:
This field is of type ${node.typ}, which cannot be displayed. Must be one of [string|int|bool|select].
%endif
auth-plugins: use large fields, and add support for textarea type.
r3245
templating: use .mako as extensions for template files.
r1282 %if node.name in errors:
<span class="error-message">${errors.get(node.name)}</span>
<br />
%endif
helper-blocks: fix pre formatting only for auth plugin helper texts....
r1470 <p class="help-block pre-formatting">${node.description}</p>
templating: use .mako as extensions for template files.
r1282 </div>
</div>
%endfor
## Allow derived templates to add something below the form
## input fields
%if hasattr(next, 'below_form_fields'):
${next.below_form_fields()}
%endif
<div class="buttons">
${h.submit('save',_('Save'),class_="btn")}
</div>
</div>
${h.end_form()}
</div>
</div>
docs: added SAML documentation....
r3290
% if request.GET.get('schema'):
## this is for development and creation of example configurations for documentation
<pre>
% for node in plugin.get_settings_schema():
*option*: `${node.name}` => `${defaults.get(node.name)}`${'\n # '.join(['']+node.description.splitlines())}
% endfor
</pre>
% endif
templating: use .mako as extensions for template files.
r1282 </div>
</div>
</div>
</div>
</div>
docs: added SAML documentation....
r3290
templating: use .mako as extensions for template files.
r1282 <script>
$(document).ready(function() {
var select2Options = {
containerCssClass: 'drop-menu',
dropdownCssClass: 'drop-menu-dropdown',
dropdownAutoWidth: true,
minimumResultsForSearch: -1
auth-plugins, ui: added some tweeks to the ui...
r3252 };
$('.select2AuthSetting').select2(select2Options);
templating: use .mako as extensions for template files.
r1282 });
</script>
</%def>