##// END OF EJS Templates
vcs: Minimal change to expose the shadow repository...
vcs: Minimal change to expose the shadow repository Based on my original research, this was the "minimal" starting point. It shows that three concepts are needed for the "repo_name": * From the security standpoint we think of the shadow repository having the same ACL as the target repository of the pull request. This is because the pull request itself is considered to be a part of the target repository. Out of this thought, the variable "acl_repo_name" is used whenever we want to check permissions or when we need the database configuration of the repository. An alternative name would have been "db_repo_name", but the usage for ACL checking is the most important one. * From the web interaction perspective, we need the URL which was originally used to get to the repository. This is because based on this base URL commands can be identified. Especially for Git this is important, so that the commands are correctly recognized. Since the URL is in the focus, this is called "url_repo_name". * Finally we have to deal with the repository on the file system. This is what the VCS layer deal with normally, so this name is called "vcs_repo_name". The original repository interaction is a special case where all three names are the same. When interacting with a pull request, these three names are typically all different. This change is minimal in a sense that it just makes the interaction with a shadow repository barely work, without checking any special constraints yet. This was the starting point for further work on this topic.

File last commit:

r1:854a839a default
r887:175782be default
Show More
form-elements-small.html
295 lines | 10.8 KiB | text/html | HtmlLexer
## -*- coding: utf-8 -*-
<%inherit file="/debug_style/index.html"/>
<%def name="breadcrumbs_links()">
${h.link_to(_('Style'), h.url('debug_style_home'))}
&raquo;
${c.active}
</%def>
<%def name="real_main()">
<div class="box">
<div class="title">
${self.breadcrumbs()}
</div>
<div class='sidebar-col-wrapper'>
${self.sidebar()}
<div class="main-content">
<h2>Simple form elements (Depreciated)</h2>
<p>The wrapping <code>.field</code> also gets the class
<code>.field-sm</code>.</p>
<p>Buttons get additional the class <code>.btn-sm</code>.</p>
<div class="bs-example">
<form method='post' action='none'>
<div class='form'>
<div class='fields'>
<div class='field field-sm'>
<div class='label'>
<label for='example_input'>Example input label:</label>
</div>
<div class='input'>
<input id="example_input" type="text" placeholder="Example input">
</div>
</div>
<div class='field field-sm'>
<div class='label'>
<label for='example_input_ro'>Example input readonly:</label>
</div>
<div class='input'>
<input id="example_input_ro" type="text" readonly="readonly" placeholder="Example input">
</div>
</div>
<div class='field field-sm'>
<div class='label'>
<label for='example_select'>Example select input:</label>
</div>
<div class="select">
<select id="example_select" >
<option value="#">${_('Templates...')}</option>
<option value="ga">Google Analytics</option>
<option value="clicky">Clicky</option>
<option value="server_announce">${_('Server Announcement')}</option>
</select>
</div>
</div>
<script>
$(document).ready(function() {
$('#example_select').select2({
containerCssClass: 'drop-menu',
dropdownCssClass: 'drop-menu-dropdown',
dropdownAutoWidth: true,
minimumResultsForSearch: -1
});
});
</script>
<div class='field field-sm'>
<div class='label'>
<label for='example_checkbox'>Example checkbox:</label>
</div>
<div class="checkboxes">
<div class="checkbox">
<input id="example_checkbox" type="checkbox">
<label for="example_checkbox">Label of the checkbox</label>
</div>
</div>
</div>
<div class='field field-sm'>
<div class='label'>
<label for='example_checkboxes'>Example multiple checkboxes:</label>
</div>
<div class="checkboxes">
<div class="checkbox">
<input id="example_checkboxes_01" type="checkbox">
<label for="example_checkboxes_01">Label of the first checkbox</label>
</div>
<div class="checkbox">
<input id="example_checkboxes_02" type="checkbox">
<label for="example_checkboxes_02">Label of the first checkbox</label>
</div>
<div class="checkbox">
<input id="example_checkboxes_03" type="checkbox">
<label for="example_checkboxes_03">Label of the first checkbox</label>
</div>
</div>
</div>
<div class='field field-sm'>
<div class='label'>
<label for='example_checkboxes'>Example multiple checkboxes:</label>
</div>
## TODO: johbo: This is off compared to the checkboxes
<div class="radios">
<label><input type="radio" checked="checked" value="hg.create.repository" name="default_repo_create" id="default_repo_create_hgcreaterepository">Enabled</label>
<label><input type="radio" value="hg.create.none" name="default_repo_create" id="default_repo_create_hgcreatenone">Disabled</label>
<span class="help-block">
Permission to allow repository creation. This includes ability to create
repositories in root level. If this option is disabled admin of
repository group can still create repositories inside that
repository group.
</span>
</div>
</div>
<div class="buttons">
<input type="submit" value="Save" id="example_save" class="btn btn-sm">
<input type="reset" value="Reset" id="example_reset" class="btn btn-sm">
</div>
</div>
</div>
</form>
</div>
<h2>Help text in form elements</h2>
<div class="bs-example">
<form method='post' action=''>
<div class='form'>
<div class='fields'>
<div class='field field-sm'>
<div class='label'>
<label for='02_example_input'>Example input label:</label>
</div>
<div class='input'>
<input id="02_example_input" type="text" placeholder="Placeholder text">
<span class="help-block">
Example help text for this input element. This help text
will be shown under the input element itself. It can be
so long that it will span multiple lines.
</span>
</div>
</div>
<div class='field field-sm'>
<div class='label'>
<label for='02_example_checkbox'>Example checkbox with help block:</label>
</div>
<div class="checkboxes">
<div class="checkbox">
<input id="02_example_checkbox" type="checkbox">
<label for="02_example_checkbox">Label of the checkbox</label>
</div>
<span class="help-block">
Example help text for this checkbox element. This help text
will be shown under the checkbox element itself. It can be
so long that it will span multiple lines.
</span>
</div>
</div>
<div class='field field-sm'>
<div class='label'>
<label>Multiple checkboxes:</label>
</div>
<div class="checkboxes">
<div class="checkbox">
<input id="02_example_checkboxes_01" type="checkbox">
<label for="02_example_checkboxes_01">Label of the first checkbox</label>
</div>
<div class="checkbox">
<input id="02_example_checkboxes_02" type="checkbox">
<label for="02_example_checkboxes_02">Label of the first checkbox</label>
</div>
<div class="checkbox">
<input id="02_example_checkboxes_03" type="checkbox">
<label for="02_example_checkboxes_03">Label of the first checkbox</label>
</div>
<span class="help-block">
Example help text for this checkbox element. This help text
will be shown under the checkbox element itself. It can be
so long that it will span multiple lines.
</span>
</div>
</div>
</div>
</div>
</form>
</div>
<h2>Error messages</h2>
<div class="bs-example">
<form method='post' action=''>
<div class='form'>
<div class='fields'>
<div class='field field-sm'>
<div class='label'>
<label for='04_example_input'>Example input label:</label>
</div>
<div class='input'>
<input id="04_example_input" type="text" placeholder="Example input"/>
<span class="error-message">
If form validation fails, some input fields can show an
error message close to the field.
</span>
</div>
</div>
</div>
</div>
</form>
</div>
<h2>Fields with buttons</h2>
<div class="bs-example">
<form method='post' action=''>
<div class='form'>
<div class='fields'>
<div class='field field-sm'>
<div class='label'>
<label for='05_example_input'>Example input label:</label>
</div>
<div class='input'>
<input id="05_example_input" type="text" readonly="readonly" placeholder="Example input">
<span class="btn action_button btn-x">
<i class="icon-remove-sign"></i>
delete
</span>
<span class="help-block">
Used if there is a list of values and the user can remove
single entries.
</span>
</div>
</div>
<div class='field field-sm'>
<div class='label'>
<label for='05_example_input'>Example input label:</label>
</div>
<div class='input'>
<input id="05_example_input" type="text" readonly="readonly" placeholder="Example input">
<span title="Click to unlock. You must restart RhodeCode in order to make this setting take effect."
class="tooltip" id="path_unlock"
tt_title="Click to unlock. You must restart RhodeCode in order to make this setting take effect.">
<div class="btn btn-default">
<span><i class="icon-lock" id="path_unlock_icon"></i></span>
</div>
</span>
<span class="help-block">
Used together with locked fields, the user has to first
unlock and afterwards it is possible to change the value.
</span>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div> <!-- .main-content -->
</div> <!-- .box -->
</%def>