Changeset - a79e651306e2
[Not reviewed]
default
0 24 0
Mads Kiilerich - 9 years ago 2016-12-04 22:53:37
mads@kiilerich.com
style: add missing 'form-control' markup

Based on work by Dominik Ruf.
24 files changed with 51 insertions and 50 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/admin/admin.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Admin Journal')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    <form id="filter_form" class="form-inline">
 
    <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('journal filter...')}"/>
 
    <input class="form-control q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('journal filter...')}"/>
 
    <span data-toggle="tooltip" title="${h.journal_filter_help()}">?</span>
 
    <input type='submit' value="${_('Filter')}" class="btn btn-default btn-xs"/>
 
    ${_('Admin Journal')} - ${ungettext('%s Entry', '%s Entries', c.users_log.item_count) % (c.users_log.item_count)}
 
    </form>
 
    ${h.end_form()}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading clearfix">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    <div class="table">
 
        <div id="user_log">
 
            <%include file='admin_log.html'/>
 
        </div>
 
    </div>
 
</div>
 

	
 
<script>
 
$(document).ready(function() {
 
  $('#j_filter').click(function(){
 
    var $jfilter = $('#j_filter');
 
    if($jfilter.hasClass('initial')){
 
        $jfilter.val('');
 
    }
 
  });
 
  var fix_j_filter_width = function(len){
 
      $('#j_filter').css('width', Math.max(80, len*6.50)+'px');
 
  };
 
  $('#j_filter').keyup(function () {
 
    fix_j_filter_width($('#j_filter').val().length);
 
  });
 
  $('#filter_form').submit(function (e) {
 
      e.preventDefault();
 
      var val = $('#j_filter').val();
 
      window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val);
 
  });
 
  fix_j_filter_width($('#j_filter').val().length);
 
});
 
</script>
 
</%def>
kallithea/templates/admin/permissions/permissions_globals.html
Show inline comments
 
${h.form(url('admin_permissions'), method='post')}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="form-horizontal">
 
            <div class="form-group">
 
                <label class="control-label" for="anonymous">${_('Anonymous access')}:</label>
 
                <div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('anonymous',True)}
 
                    </div>
 
                     <span class="help-block">${h.literal(_('Allow access to Kallithea without needing to log in. Anonymous users use %s user permissions.' % (h.link_to('*default*',h.url('admin_permissions_perms')))))}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="default_repo_perm">${_('Repository')}:</label>
 
                <div class="form-inline">
 
                    ${h.select('default_repo_perm','',c.repo_perms_choices)}
 
                    ${h.select('default_repo_perm','',c.repo_perms_choices,class_='form-control')}
 
                    ${h.checkbox('overwrite_default_repo','true')}
 
                    <label for="overwrite_default_repo">
 
                    <span data-toggle="tooltip"
 
                        title="${_('All default permissions on each repository will be reset to chosen permission, note that all custom default permission on repositories will be lost')}">
 
                    ${_('Apply to all existing repositories')}</span> </label>
 
                    <span class="help-block">${_('Permissions for the Default user on new repositories.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="default_group_perm">${_('Repository group')}:</label>
 
                <div class="form-inline">
 
                    ${h.select('default_group_perm','',c.group_perms_choices)}
 
                    ${h.select('default_group_perm','',c.group_perms_choices,class_='form-control')}
 
                    ${h.checkbox('overwrite_default_group','true')}
 
                    <label for="overwrite_default_group">
 
                    <span data-toggle="tooltip"
 
                        title="${_('All default permissions on each repository group will be reset to chosen permission, note that all custom default permission on repository groups will be lost')}">
 
                    ${_('Apply to all existing repository groups')}</span> </label>
 
                    <span class="help-block">${_('Permissions for the Default user on new repository groups.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="default_user_group_perm">${_('User group')}:</label>
 
                <div class="form-inline">
 
                    ${h.select('default_user_group_perm','',c.user_group_perms_choices)}
 
                    ${h.select('default_user_group_perm','',c.user_group_perms_choices,class_='form-control')}
 
                    ${h.checkbox('overwrite_default_user_group','true')}
 
                    <label for="overwrite_default_user_group">
 
                    <span data-toggle="tooltip"
 
                        title="${_('All default permissions on each user group will be reset to chosen permission, note that all custom default permission on user groups will be lost')}">
 
                    ${_('Apply to all existing user groups')}</span></label>
 
                    <span class="help-block">${_('Permissions for the Default user on new user groups.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="default_repo_create">${_('Top level repository creation')}:</label>
 
                <div>
 
                    ${h.select('default_repo_create','',c.repo_create_choices)}
 
                    ${h.select('default_repo_create','',c.repo_create_choices,class_='form-control')}
 
                    <span class="help-block">${_('Enable this to allow non-admins to create repositories at the top level.')}</span>
 
                    <span class="help-block">${_('Note: This will also give all users API access to create repositories everywhere. That might change in future versions.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="create_on_write">${_('Repository creation with group write access')}:</label>
 
                <div>
 
                    ${h.select('create_on_write','',c.repo_create_on_write_choices)}
 
                    ${h.select('create_on_write','',c.repo_create_on_write_choices,class_='form-control')}
 
                    <span class="help-block">${_('With this, write permission to a repository group allows creating repositories inside that group. Without this, group write permissions mean nothing.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="default_user_group_create">${_('User group creation')}:</label>
 
                <div>
 
                    ${h.select('default_user_group_create','',c.user_group_create_choices)}
 
                    ${h.select('default_user_group_create','',c.user_group_create_choices,class_='form-control')}
 
                    <span class="help-block">${_('Enable this to allow non-admins to create user groups.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="default_fork">${_('Repository forking')}:</label>
 
                <div>
 
                    ${h.select('default_fork','',c.fork_choices)}
 
                    ${h.select('default_fork','',c.fork_choices,class_='form-control')}
 
                    <span class="help-block">${_('Enable this to allow non-admins to fork repositories.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="default_register">${_('Registration')}:</label>
 
                <div>
 
                    ${h.select('default_register','',c.register_choices)}
 
                    ${h.select('default_register','',c.register_choices,class_='form-control')}
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="default_extern_activate">${_('External auth account activation')}:</label>
 
                <div>
 
                    ${h.select('default_extern_activate','',c.extern_activate_choices)}
 
                    ${h.select('default_extern_activate','',c.extern_activate_choices,class_='form-control')}
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <div class="buttons">
 
                    ${h.submit('save',_('Save'),class_="btn btn-default")}
 
                    ${h.reset('reset',_('Reset'),class_="btn btn-default")}
 
                </div>
 
            </div>
 
        </div>
 
    </div>
 
${h.end_form()}
kallithea/templates/admin/repo_groups/repo_group_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Add Repository Group')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('Repository Groups'),h.url('repos_groups'))}
 
    &raquo;
 
    ${_('Add Repository Group')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    ${h.form(url('repos_groups'))}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="form-horizontal">
 
            <div class="form-group">
 
                <label class="control-label" for="group_name">${_('Group name')}:</label>
 
                <div>
 
                    ${h.text('group_name',class_='form-control')}
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="group_description">${_('Description')}:</label>
 
                <div>
 
                    ${h.textarea('group_description',cols=23,rows=5)}
 
                    ${h.textarea('group_description',cols=23,rows=5,class_='form-control')}
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="parent_group_id">${_('Group parent')}:</label>
 
                <div>
 
                    ${h.select('parent_group_id',request.GET.get('parent_group'),c.repo_groups,class_='form-control')}
 
                </div>
 
            </div>
 

	
 
            <div id="copy_perms" class="form-group">
 
                <label class="control-label" for="group_copy_permissions">${_('Copy parent group permissions')}:</label>
 
                <div>
 
                    ${h.checkbox('group_copy_permissions',value="True")}
 
                    <span class="help-block">${_('Copy permission set from parent repository group.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <div class="buttons">
 
                    ${h.submit('save',_('Save'),class_="btn btn-default")}
 
                </div>
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
</div>
 
<script>
 
    $(document).ready(function(){
 
        var setCopyPermsOption = function(group_val){
 
            if(group_val != "-1"){
 
                $('#copy_perms').show();
 
            }
 
            else{
 
                $('#copy_perms').hide();
 
            }
 
        }
 
        $("#parent_group_id").select2({
 
            'dropdownAutoWidth': true
 
        });
 
        setCopyPermsOption($('#parent_group_id').val());
 
        $("#parent_group_id").on("change", function(e) {
 
            setCopyPermsOption(e.val);
 
        });
 
        $('#group_name').focus();
 
    });
 
</script>
 
</%def>
kallithea/templates/admin/repo_groups/repo_group_edit_settings.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
${h.form(url('update_repos_group',group_name=c.repo_group.group_name))}
 
<div class="form">
 
    <!-- fields -->
 
    <div class="form-horizontal">
 
        <div class="form-group">
 
            <label class="control-label" for="group_name">${_('Group name')}:</label>
 
            <div>
 
                ${h.text('group_name',class_='form-control')}
 
            </div>
 
        </div>
 

	
 
        <div class="form-group">
 
            <label class="control-label" for="group_description">${_('Description')}:</label>
 
            <div>
 
                ${h.textarea('group_description',cols=23,rows=5)}
 
                ${h.textarea('group_description',cols=23,rows=5,class_='form-control')}
 
            </div>
 
        </div>
 

	
 
        <div class="form-group">
 
            <label class="control-label" for="parent_group_id">${_('Group parent')}:</label>
 
            <div>
 
                ${h.select('parent_group_id','',c.repo_groups,class_='form-control')}
 
            </div>
 
        </div>
 

	
 
        <div class="form-group">
 
            <label class="control-label" for="enable_locking">${_('Enable locking')}:</label>
 
            <div>
 
                ${h.checkbox('enable_locking',value="True")}
 
                <span class="help-block">${_('Enable lock-by-pulling on group. This option will be applied to all other groups and repositories inside')}</span>
 
            </div>
 
        </div>
 

	
 
        <div class="form-group">
 
            <div class="buttons">
 
                ${h.submit('save',_('Save'),class_="btn btn-default")}
 
                ${h.reset('reset',_('Reset'),class_="btn btn-default")}
 
            </div>
 
        </div>
 
    </div>
 
</div>
 
${h.end_form()}
 

	
 
${h.form(url('delete_repo_group', group_name=c.repo_group.group_name))}
 
<div class="form">
 
    <div class="form-horizontal">
 
        <div class="form-group">
 
            <div class="buttons">
 
                ${h.submit('remove_%s' % c.repo_group.group_name,_('Remove this group'),class_="btn btn-danger",onclick="return confirm('"+_('Confirm to delete this group')+"');")}
 
            </div>
 
        </div>
 
    </div>
 
</div>
 
${h.end_form()}
 

	
 
<script>
 
    $(document).ready(function(){
 
        $("#parent_group_id").select2({
 
            'dropdownAutoWidth': true
 
        });
 
    });
 
</script>
kallithea/templates/admin/repos/repo_add_base.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
${h.form(url('repos'))}
 
<div class="form">
 
    <!-- fields -->
 
    <div class="form-horizontal">
 
        <div class="form-group">
 
            <label class="control-label" for="repo_name">${_('Name')}:</label>
 
            <div>
 
                ${h.text('repo_name',class_='form-control')}
 
            </div>
 
         </div>
 
        <div id="remote_clone" class="form-group">
 
            <label class="control-label" for="clone_uri">${_('Clone remote repository')}:</label>
 
            <div>
 
                ${h.text('clone_uri',class_='form-control')}
 
                <span class="help-block">
 
                    ${_('Optional: URL of a remote repository. If set, the repository will be created as a clone from this URL.')}
 
                </span>
 
            </div>
 
        </div>
 
        <div class="form-group">
 
            <label class="control-label" for="repo_description">${_('Description')}:</label>
 
            <div>
 
                ${h.textarea('repo_description')}
 
                ${h.textarea('repo_description',class_='form-control')}
 
                <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
 
            </div>
 
        </div>
 
        <div class="form-group">
 
            <label class="control-label" for="repo_group">${_('Repository group')}:</label>
 
            <div>
 
                ${h.select('repo_group',request.GET.get('parent_group'),c.repo_groups,class_='form-control')}
 
                <span class="help-block">${_('Optionally select a group to put this repository into.')}</span>
 
            </div>
 
        </div>
 
        <div id="copy_perms" class="form-group">
 
            <label class="control-label" for="repo_copy_permissions">${_('Copy parent group permissions')}:</label>
 
            <div>
 
                ${h.checkbox('repo_copy_permissions',value="True")}
 
                <span class="help-block">${_('Copy permission set from parent repository group.')}</span>
 
            </div>
 
        </div>
 
        <div class="form-group">
 
            <label class="control-label" for="repo_type">${_('Type')}:</label>
 
            <div>
 
                ${h.select('repo_type','hg',c.backends,class_='form-control')}
 
                <span class="help-block">${_('Type of repository to create.')}</span>
 
            </div>
 
        </div>
 
        <div class="form-group">
 
            <label class="control-label" for="repo_landing_rev">${_('Landing revision')}:</label>
 
            <div>
 
                ${h.select('repo_landing_rev','',c.landing_revs,class_='form-control')}
 
                <span class="help-block">${_('Default revision for files page, downloads, full text search index and readme generation')}</span>
 
            </div>
 
        </div>
 
        <div class="form-group">
 
            <label class="control-label" for="repo_private">${_('Private repository')}:</label>
 
            <div>
 
                ${h.checkbox('repo_private',value="True")}
 
                <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
 
            </div>
 
        </div>
 
        <div class="form-group">
 
            <div class="buttons">
 
                ${h.submit('add',_('Add'),class_="btn btn-default")}
 
            </div>
 
        </div>
 
    </div>
 
</div>
 
<script>
 
    $(document).ready(function(){
 
        var setCopyPermsOption = function(group_val){
kallithea/templates/admin/repos/repo_edit_settings.html
Show inline comments
 
${h.form(url('update_repo', repo_name=c.repo_info.repo_name))}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="form-horizontal">
 
            <div class="form-group">
 
                <label class="control-label" for="repo_name">${_('Name')}:</label>
 
                <div>
 
                    ${h.text('repo_name',class_='form-control')}
 
                    <span class="help-block">${_('Permanent Repository ID')}: `_${c.repo_info.repo_id}` <span><a id="show_more_clone_id" href="#">${_('What is that?')}</a></span></span>
 
                    <span id="clone_id" class="help-block" style="display: none">
 
                        ${_('URL by id')}: `${c.repo_info.clone_url(with_id=True)}` </br>
 
                        ${_('''In case this repository is renamed or moved into another group the repository URL changes.
 
                               Using the above permanent URL guarantees that this repository always will be accessible on that URL.
 
                               This is useful for CI systems, or any other cases that you need to hardcode the URL into a 3rd party service.''')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="clone_uri">${_('Remote repository')}:</label>
 
                <div>
 
                  <div id="alter_clone_uri">
 
                        ${h.text('clone_uri',class_='form-control', placeholder=_('Repository URL'))}
 
                        ${h.hidden('clone_uri_hidden', c.repo_info.clone_uri_hidden)}
 
                  </div>
 
                  <span id="alter_clone_uri_help_block" class="help-block">
 
                    ${_('Optional: URL of a remote repository. If set, the repository can be pulled from this URL.')}
 
                  </span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="repo_group">${_('Repository group')}:</label>
 
                <div>
 
                    ${h.select('repo_group','',c.repo_groups,class_='form-control')}
 
                    <span class="help-block">${_('Optionally select a group to put this repository into.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="repo_landing_rev">${_('Landing revision')}:</label>
 
                <div>
 
                    ${h.select('repo_landing_rev','',c.landing_revs,class_='form-control')}
 
                    <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="owner">${_('Owner')}:</label>
 
                <div class="ac">
 
                    <div class="perm_ac">
 
                       ${h.text('owner',class_='yui-ac-input')}
 
                       ${h.text('owner',class_='yui-ac-input form-control')}
 
                       <span class="help-block">${_('Change owner of this repository.')}</span>
 
                       <div id="owner_container"></div>
 
                    </div>
 
                </div>
 
             </div>
 
            <div class="form-group">
 
                <label class="control-label" for="repo_description">${_('Description')}:</label>
 
                <div>
 
                    ${h.textarea('repo_description', style="height:165px")}
 
                    ${h.textarea('repo_description',class_='form-control',style="height:165px")}
 
                    <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="repo_private">${_('Private repository')}:</label>
 
                <div>
 
                    ${h.checkbox('repo_private',value="True")}
 
                    <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="repo_enable_statistics">${_('Enable statistics')}:</label>
 
                <div>
 
                    ${h.checkbox('repo_enable_statistics',value="True")}
 
                    <span class="help-block">${_('Enable statistics window on summary page.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="repo_enable_downloads">${_('Enable downloads')}:</label>
 
                <div>
 
                    ${h.checkbox('repo_enable_downloads',value="True")}
 
                    <span class="help-block">${_('Enable download menu on summary page.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="repo_enable_locking">${_('Enable locking')}:</label>
 
                <div>
 
                    ${h.checkbox('repo_enable_locking',value="True")}
 
                    <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span>
 
                </div>
 
            </div>
 

	
 
            %if c.visual.repository_fields:
 
              ## EXTRA FIELDS
 
              %for field in c.repo_fields:
 
                <div class="form-group">
 
                    <label class="control-label" for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
 
                    <div>
 
                        ${h.text(field.field_key_prefixed, field.field_value, class_='form-control')}
 
                        %if field.field_desc:
 
                          <span class="help-block">${field.field_desc}</span>
 
                        %endif
 
                    </div>
 
                 </div>
 
              %endfor
 
            %endif
 
            <div class="form-group">
kallithea/templates/admin/settings/settings_email.html
Show inline comments
 
${h.form(url('admin_settings_email'), method='post')}
 
    <div class="form">
 

	
 
        <div class="form-horizontal">
 
            <div class="form-group">
 
                <label class="control-label" for="test_email">${_('Send test email to')}:</label>
 
                <div>
 
                    ${h.text('test_email',size=30)}
 
                    ${h.text('test_email',size=30,class_='form-control')}
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <div class="buttons">
 
                    ${h.submit('send',_('Send'),class_="btn btn-default")}
 
                </div>
 
            </div>
 
        </div>
 
    </div>
 
${h.end_form()}
kallithea/templates/admin/settings/settings_global.html
Show inline comments
 
${h.form(url('admin_settings_global'), method='post')}
 
    <div class="form">
 

	
 
        <div class="form-horizontal">
 

	
 
             <div class="form-group">
 
                <label class="control-label" for="title">${_('Site branding')}:</label>
 
                <div>
 
                    ${h.text('title',size=30)}
 
                    ${h.text('title',size=30,class_='form-control')}
 
                    <span class="help-block">${_('Set a custom title for your Kallithea Service.')}</span>
 
                </div>
 
             </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="realm">${_('HTTP authentication realm')}:</label>
 
                <div>
 
                    ${h.text('realm',size=30)}
 
                    ${h.text('realm',size=30,class_='form-control')}
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="ga_code">${_('HTML/JavaScript/CSS customization block')}:</label>
 
                <div>
 
                    ${h.textarea('ga_code', cols=80, rows=10)}
 
                    ${h.textarea('ga_code', cols=80, rows=10,class_='form-control')}
 
                    <span class="help-block">${_('HTML (possibly with \
 
                        JavaScript and/or CSS) that will be added to the bottom \
 
                        of every page. This can be used for web analytics \
 
                        systems like Google Analytics or Piwik, but also to \
 
                        perform instance-specific customizations like adding a \
 
                        project banner at the top of every page.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="captcha_public_key">${_('ReCaptcha public key')}:</label>
 
                <div>
 
                    ${h.text('captcha_public_key',size=60)}
 
                    ${h.text('captcha_public_key',size=60,class_='form-control')}
 
                    <span class="help-block">${_('Public key for reCaptcha system.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="captcha_private_key">${_('ReCaptcha private key')}:</label>
 
                <div>
 
                    ${h.text('captcha_private_key',size=60)}
 
                    ${h.text('captcha_private_key',size=60,class_='form-control')}
 
                    <span class="help-block">${_('Private key for reCaptcha system. Setting this value will enable captcha on registration.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <div class="buttons">
 
                    ${h.submit('save',_('Save Settings'),class_="btn btn-default")}
 
                    ${h.reset('reset',_('Reset'),class_="btn btn-default")}
 
                </div>
 
           </div>
 
        </div>
 
    </div>
 
${h.end_form()}
kallithea/templates/admin/settings/settings_hooks.html
Show inline comments
 
<h4>${_('Built-in Mercurial Hooks (Read-Only)')}</h4>
 
<div class="form">
 
    <div class="form-horizontal">
 
      % for hook in c.hooks:
 
        <div class="form-group">
 
            <label class="control-label" for="${hook.ui_key}">${hook.ui_key}</label>
 
            <div style="margin-left:280px">
 
              ${h.text(hook.ui_key,hook.ui_value,size=60,readonly="readonly")}
 
              ${h.text(hook.ui_key,hook.ui_value,size=60,readonly="readonly",class_='form-control')}
 
            </div>
 
        </div>
 
      % endfor
 
    </div>
 
    <span class="help-block">${_('Hooks can be used to trigger actions on certain events such as push / pull. They can trigger Python functions or external applications.')}</span>
 
</div>
 

	
 
% if c.visual.allow_custom_hooks_settings:
 
<h4>${_('Custom Hooks')}</h4>
 
${h.form(url('admin_settings_hooks'), method='post')}
 
<div class="form">
 
    <div class="form-horizontal">
 

	
 
        %for hook in c.custom_hooks:
 
            <div class="form-group form-inline" id="${'id%s' % hook.ui_id }">
 
                <label class="control-label" for="${hook.ui_key}">${hook.ui_key}</label>
 
                <div style="margin-left:280px">
 
                    ${h.hidden('hook_ui_key',hook.ui_key)}
 
                    ${h.hidden('hook_ui_value',hook.ui_value)}
 
                    ${h.text('hook_ui_value_new',hook.ui_value,size=60)}
 
                    ${h.text('hook_ui_value_new',hook.ui_value,size=60,class_='form-control')}
 
                    <span class="btn btn-default btn-xs"
 
                        onclick="delete_hook(${hook.ui_id},'${'id%s' % hook.ui_id }')">
 
                        <i class="icon-minus-circled" style="color:#FF4444"></i>
 
                        ${_('Delete')}
 
                    </span>
 
                </div>
 
            </div>
 
        %endfor
 

	
 
        <div class="form-group form-inline">
 
            <label>
 
                ${h.text('new_hook_ui_key',size=20)}
 
                ${h.text('new_hook_ui_key',size=20,class_='form-control')}
 
            </label>
 
            <div style="margin-left:280px">
 
                ${h.text('new_hook_ui_value',size=60)}
 
                ${h.text('new_hook_ui_value',size=60,class_='form-control')}
 
            </div>
 
        </div>
 
        <div class="form-group">
 
            <div class="buttons" style="margin-left:280px">
 
                ${h.submit('save',_('Save'),class_="btn btn-default")}
 
            </div>
 
        </div>
 
    </div>
 
</div>
 
${h.end_form()}
 
% endif
 

	
 
<script type="text/javascript">
 
function delete_hook(hook_id, field_id) {
 
    var sUrl = "${h.url('admin_settings_hooks_delete')}";
 
    var success = function (o) {
 
            $('#' + field_id).remove();
 
        };
 
    var failure = function (o) {
 
            alert("${_('Failed to remove hook')}");
 
        };
 
    var postData = {'hook_id': hook_id};
 
    ajaxPOST(sUrl, postData, success, failure);
 
};
 
</script>
kallithea/templates/admin/settings/settings_vcs.html
Show inline comments
 
${h.form(url('admin_settings'), method='post')}
 
    <div class="form">
 
        <div class="form-horizontal">
 
            <div class="form-group">
 
                <label>${_('Hooks')}:</label>
 
                <div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('hooks_changegroup_repo_size','True')}
 
                        <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label>
 
                    </div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('hooks_changegroup_push_logger','True')}
 
                        <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label>
 
                    </div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('hooks_outgoing_pull_logger','True')}
 
                        <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label>
 
                    </div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('hooks_changegroup_update','True')}
 
                        <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label>
 
                    </div>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label>${_('Mercurial extensions')}:</label>
 
                <div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('extensions_largefiles','True')}
 
                        <label for="extensions_largefiles">${_('Enable largefiles extension')}</label>
 
                    </div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('extensions_hgsubversion','True')}
 
                        <label for="extensions_hgsubversion">${_('Enable hgsubversion extension')}</label>
 
                    </div>
 
                    <span class="help-block">${_('Requires hgsubversion library to be installed. Enables cloning of remote Subversion repositories while converting them to Mercurial.')}</span>
 
                    ##<div class="checkbox">
 
                    ##    ${h.checkbox('extensions_hggit','True')}
 
                    ##    <label for="extensions_hggit">${_('Enable hg-git extension')}</label>
 
                    ##</div>
 
                    ##<span class="help-block">${_('Requires hg-git library to be installed. Enables cloning of remote Git repositories while converting them to Mercurial.')}</span>
 
                </div>
 
            </div>
 
            %if c.visual.allow_repo_location_change:
 
            <div class="form-group">
 
                <label class="control-label" for="paths_root_path">${_('Location of repositories')}:</label>
 
                <div>
 
                    ${h.text('paths_root_path',size=60,readonly="readonly")}
 
                    ${h.text('paths_root_path',size=60,readonly="readonly",class_='form-control')}
 
                    <span id="path_unlock" data-toggle="tooltip" style="cursor: pointer"
 
                            title="${_('Click to unlock. You must restart Kallithea in order to make this setting take effect.')}">
 
                        <div class="btn btn-default btn-sm"><i id="path_unlock_icon" class="icon-lock"></i></div>
 
                    </span>
 
                    <span class="help-block">${_('Filesystem location where repositories are stored. After changing this value, a restart and rescan of the repository folder are both required.')}</span>
 
                </div>
 
            </div>
 
            %else:
 
            ## form still requires this but we cannot internally change it anyway
 
            ${h.hidden('paths_root_path',size=30,readonly="readonly")}
 
            %endif
 
            <div class="form-group">
 
                <div class="buttons">
 
                    ${h.submit('save',_('Save Settings'),class_="btn btn-default")}
 
                    ${h.reset('reset',_('Reset'),class_="btn btn-default")}
 
                </div>
 
           </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 

	
 
    <script type="text/javascript">
 
        $(document).ready(function(){
 
            $('#path_unlock').on('click', function(e){
 
                $('#path_unlock_icon').removeClass('icon-lock');
 
                $('#path_unlock_icon').addClass('icon-lock-open-alt');
 
                $('#paths_root_path').removeAttr('readonly');
 
            });
 
        });
 
    </script>
kallithea/templates/admin/settings/settings_visual.html
Show inline comments
 
${h.form(url('admin_settings_visual'), method='post')}
 
    <div class="form">
 

	
 
        <div class="form-horizontal">
 

	
 
            <div class="form-group">
 
                <label>${_('General')}:</label>
 
                <div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('repository_fields','True')}
 
                        <label for="repository_fields">${_('Use repository extra fields')}</label>
 
                    </div>
 
                    <span class="help-block">${_('Allows storing additional customized fields per repository.')}</span>
 

	
 
                    <div class="checkbox">
 
                        ${h.checkbox('show_version','True')}
 
                        <label for="show_version">${_('Show Kallithea version')}</label>
 
                    </div>
 
                    <span class="help-block">${_('Shows or hides a version number of Kallithea displayed in the footer.')}</span>
 

	
 
                    <div class="checkbox">
 
                        ${h.checkbox('use_gravatar','True')}
 
                        <label for="use_gravatar">${_('Use Gravatars in Kallithea')}</label>
 
                    </div>
 
                </div>
 
                <div>
 
                        ${h.text('gravatar_url', size=80)}
 
                        ${h.text('gravatar_url', size=80, class_='form-control')}
 
                        <span class="help-block">${_('''Gravatar URL allows you to use another avatar server application.
 
                                                        The following variables of the URL will be replaced accordingly.
 
                                                        {scheme}    'http' or 'https' sent from running Kallithea server,
 
                                                        {email}     user email,
 
                                                        {md5email}  md5 hash of the user email (like at gravatar.com),
 
                                                        {size}      size of the image that is expected from the server application,
 
                                                        {netloc}    network location/server host of running Kallithea server''')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label>${_('Clone URL')}:</label>
 
                <div>
 
                        ${h.text('clone_uri_tmpl', size=80)}
 
                    ${h.text('clone_uri_tmpl', size=80, class_='form-control')}
 
                        <span class="help-block">${_('''Schema of clone URL construction eg. '{scheme}://{user}@{netloc}/{repo}'.
 
                                                        The following variables are available:
 
                                                        {scheme} 'http' or 'https' sent from running Kallithea server,
 
                                                        {user}   current user username,
 
                                                        {netloc} network location/server host of running Kallithea server,
 
                                                        {repo}   full repository name,
 
                                                        {repoid} ID of repository, can be used to construct clone-by-id''')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="page_size">${_('Repository page size')}:</label>
 
                <div>
 
                    ${h.text('page_size',size=5)}
 
                    ${h.text('page_size',size=5,class_='form-control')}
 
                    <span class="help-block">${_('Number of items displayed in the repository pages before pagination is shown.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="admin_grid_items">${_('Admin page size')}:</label>
 
                <div>
 
                    ${h.text('admin_grid_items',size=5)}
 
                    ${h.text('admin_grid_items',size=5,class_='form-control')}
 
                    <span class="help-block">${_('Number of items displayed in the admin pages grids before pagination is shown.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label>${_('Icons')}:</label>
 
                <div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('show_public_icon','True')}
 
                        <label for="show_public_icon">${_('Show public repository icon on repositories')}</label>
 
                    </div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('show_private_icon','True')}
 
                        <label for="show_private_icon">${_('Show private repository icon on repositories')}</label>
 
                    </div>
 
                    <span class="help-block">${_('Show public/private icons next to repository names.')}</span>
 
                 </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label>${_('Meta Tagging')}:</label>
 
                <div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('stylify_metatags','True')}
 
                        <label for="stylify_metatags">${_('Stylify recognised meta tags:')}</label>
 
                    </div>
 
                    <div style="padding-left: 20px;">
 
                        <ul> <!-- Fix style here -->
 
                            <li>[featured] <span class="metatag" tag="featured">featured</span></li>
 
                            <li>[stale] <span class="metatag" tag="stale">stale</span></li>
 
                            <li>[dead] <span class="metatag" tag="dead">dead</span></li>
 
                            <li>[lang =&gt; lang] <span class="metatag" tag="lang" >lang</span></li>
 
                            <li>[license =&gt; License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li>
 
                            <li>[requires =&gt; Repo] <span class="metatag" tag="requires" >requires =&gt; <a href="#" >Repo</a></span></li>
 
                            <li>[recommends =&gt; Repo] <span class="metatag" tag="recommends" >recommends =&gt; <a href="#" >Repo</a></span></li>
 
                            <li>[see =&gt; URI] <span class="metatag" tag="see">see =&gt; <a href="#">URI</a> </span></li>
 
                        </ul>
 
                    </div>
 
                    <span class="help-block">${_('Parses meta tags from the repository description field and turns them into colored tags.')}</span>
 
                 </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <div class="buttons">
 
                    ${h.submit('save',_('Save Settings'),class_="btn btn-default")}
 
                    ${h.reset('reset',_('Reset'),class_="btn btn-default")}
 
                </div>
 
            </div>
kallithea/templates/admin/user_groups/user_group_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Add user group')}
 
</%block>
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('User Groups'),h.url('users_groups'))}
 
    &raquo;
 
    ${_('Add User Group')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading clearfix">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    ${h.form(url('users_groups'))}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="form-horizontal">
 
            <div class="form-group">
 
                <label class="control-label" for="users_group_name">${_('Group name')}:</label>
 
                <div>
 
                    ${h.text('users_group_name',class_='form-control')}
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="user_group_description">${_('Description')}:</label>
 
                <div>
 
                    ${h.textarea('user_group_description')}
 
                    ${h.textarea('user_group_description',class_='form-control')}
 
                    <span class="help-block">${_('Short, optional description for this user group.')}</span>
 
                </div>
 
            </div>
 
            <div class="form-group">
 
                <label class="control-label" for="users_group_active">${_('Active')}:</label>
 
                <div>
 
                    ${h.checkbox('users_group_active',value=True, checked='checked')}
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <div class="buttons">
 
                    ${h.submit('save',_('Save'),class_="btn btn-default")}
 
                </div>
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
</div>
 

	
 
<script>
 
    $(document).ready(function(){
 
        $('#users_group_name').focus();
 
    });
 
</script>
 
</%def>
kallithea/templates/admin/user_groups/user_group_edit_settings.html
Show inline comments
 
${h.form(url('update_users_group', id=c.user_group.users_group_id), id='edit_users_group')}
 
    <div class="form">
 
        <!-- fields -->
 
            <div class="form-horizontal">
 
                <div class="form-group">
 
                    <label class="control-label" for="users_group_name">${_('Group name')}:</label>
 
                    <div>
 
                        ${h.text('users_group_name',class_='form-control')}
 
                    </div>
 
                </div>
 
                <div class="form-group">
 
                    <label class="control-label" for="user_group_description">${_('Description')}:</label>
 
                    <div>
 
                        ${h.textarea('user_group_description')}
 
                        ${h.textarea('user_group_description',class_='form-control')}
 
                        <span class="help-block">${_('Short, optional description for this user group.')}</span>
 
                    </div>
 
                </div>
 
                <div class="form-group">
 
                    <label class="control-label" for="users_group_active">${_('Active')}:</label>
 
                    <div>
 
                        ${h.checkbox('users_group_active',value=True)}
 
                    </div>
 
                </div>
 
                <div class="form-group">
 
                    <label class="control-label">${_('Members')}:</label>
 
                    <div>
 
                        <table class="table">
 
                                <tr>
 
                                    <td>
 
                                        <div>
 
                                            <div style="float:left">
 
                                                <div class="text" style="padding: 0px 0px 6px;">${_('Chosen group members')}</div>
 
                                                ${h.select('users_group_members',[],c.group_members,multiple=True,size=8,style="min-width:210px")}
 
                                                ${h.select('users_group_members',[],c.group_members,multiple=True,size=8,style="min-width:210px",class_='form-control')}
 
                                            </div>
 
                                            <div style="float:left;width:20px;padding-top:50px">
 
                                                <i style="cursor:pointer; font-size: 16px" id="add_element" class="icon-left-open" title="Choose selected available"></i>
 
                                                <div style="height:50px"></div>
 
                                                <i style="cursor:pointer; font-size: 16px" id="remove_element" class="icon-right-open" title="Remove selected chosen"></i>
 
                                            </div>
 
                                            <div style="float:left">
 
                                                 <div class="text" style="padding: 0px 0px 6px;">${_('Available members')}</div>
 
                                                 ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")}
 
                                                 ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px",class_='form-control')}
 
                                            </div>
 
                                        </div>
 
                                    </td>
 
                                </tr>
 
                        </table>
 
                    </div>
 
                </div>
 
                <div class="form-group">
 
                    <div class="buttons">
 
                        ${h.submit('Save',_('Save'),class_="btn btn-default")}
 
                    </div>
 
                </div>
 
            </div>
 
    </div>
 
${h.end_form()}
 
<script type="text/javascript">
 
  MultiSelectWidget('users_group_members','available_members','edit_users_group');
 
</script>
kallithea/templates/changelog/changelog.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Changelog') % c.repo_name}
 
    %if c.changelog_for_path:
 
      /${c.changelog_for_path}
 
    %endif
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    <% size = c.size if c.size <= c.total_cs else c.total_cs %>
 
    ${_('Changelog')}
 
    %if c.changelog_for_path:
 
     - /${c.changelog_for_path}
 
    %endif
 
    %if c.revision:
 
    @ ${h.short_id(c.first_revision.raw_id)}
 
    %endif
 
    - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog', c.first_revision.raw_id if c.first_revision else None)}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading clearfix">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div class="table">
 
        %if c.pagination:
 
            <div>
 
                <div style="overflow:auto; ${'display:none' if c.changelog_for_path else ''}">
 
                    <div class="container_header">
 
                        <div style="float:left; margin-left:20px;">
 
                            ${h.form(h.url.current(),method='get',class_="form-inline")}
 
                                ${h.submit('set',_('Show'),class_="btn btn-default btn-sm")}
 
                                ${h.text('size',size=3,value=c.size)}
 
                                ${h.text('size',size=3,value=c.size,class_='form-control')}
 
                                ${_('revisions')}
 
                                %if c.branch_name:
 
                                    ${h.hidden('branch', c.branch_name)}
 
                                %endif
 
                            ${h.end_form()}
 
                            <a href="#" class="btn btn-default btn-sm" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
 
                        </div>
 
                        <div style="float: right; margin: 0px 0px 0px 4px">
 
                            <a href="#" class="btn btn-default btn-sm" id="rev_range_container" style="display:none"></a>
 
                            %if c.revision:
 
                                <a class="btn btn-default btn-sm" href="${h.url('changelog_home', repo_name=c.repo_name)}">
 
                                    ${_('Go to tip of repository')}
 
                                </a>
 
                            %endif
 
                            %if c.db_repo.fork:
 
                                <a id="compare_fork"
 
                                   title="${_('Compare fork with %s' % c.db_repo.fork.repo_name)}"
 
                                   href="${h.url('compare_url',repo_name=c.db_repo.fork.repo_name,org_ref_type=c.db_repo.landing_rev[0],org_ref_name=c.db_repo.landing_rev[1],other_repo=c.repo_name,other_ref_type='branch' if request.GET.get('branch') else c.db_repo.landing_rev[0],other_ref_name=request.GET.get('branch') or c.db_repo.landing_rev[1], merge=1)}"
 
                                   class="btn btn-default btn-sm"><i class="icon-git-compare"></i> ${_('Compare fork with parent repository (%s)' % c.db_repo.fork.repo_name)}</a>
 
                            %endif
 
                            ## text and href of open_new_pr is controlled from javascript
 
                            <a id="open_new_pr" class="btn btn-default btn-sm"></a>
 
                            ${_("Branch filter:")} ${h.select('branch_filter',c.branch_name,c.branch_filters)}
 
                        </div>
 
                    </div>
 
                </div>
 

	
 
                <div id="changelog" style="clear:both">
 

	
 
                <div id="graph_nodes">
 
                    <canvas id="graph_canvas" style="width:0"></canvas>
 
                </div>
 
                <div id="graph_content" style="${'margin: 0px' if c.changelog_for_path else ''}">
 

	
 
                <table id="changesets">
 
                <tbody>
 
                %for cnt,cs in enumerate(c.pagination):
 
                    <tr id="chg_${cnt+1}" class="container ${'mergerow' if len(cs.parents) > 1 else ''}">
 
                        <td class="checkbox">
 
                            %if c.changelog_for_path:
 
                                ${h.checkbox(cs.raw_id,class_="changeset_range", disabled="disabled")}
 
                            %else:
 
                                ${h.checkbox(cs.raw_id,class_="changeset_range")}
 
                            %endif
 
                        <td class="status">
 
                          %if c.statuses.get(cs.raw_id):
 
                            <div class="changeset-status-ico">
 
                            %if c.statuses.get(cs.raw_id)[2]:
kallithea/templates/changeset/changeset_file_comment.html
Show inline comments
 
@@ -13,97 +13,97 @@
 
              ${co.author.full_name_and_username}
 
          </div>
 

	
 
          <span>
 
              ${h.age(co.modified_at)}
 
              %if co.pull_request:
 
                ${_('on pull request')}
 
                <a href="${co.pull_request.url()}">"${co.pull_request.title or _("No title")}"</a>
 
              %else:
 
                ${_('on this changeset')}
 
              %endif
 
              <a class="permalink" href="${co.url()}">&para;</a>
 
          </span>
 

	
 
          %if co.author_id == c.authuser.user_id or h.HasRepoPermissionAny('repository.admin')(c.repo_name):
 
            %if co.deletable():
 
              <div onClick="confirm('${_("Delete comment?")}') && deleteComment(${co.comment_id})" class="buttons delete-comment btn btn-default btn-xs" style="margin:0 5px">${_('Delete')}</div>
 
            %endif
 
          %endif
 
      </div>
 
      <div class="text">
 
        %if co.status_change:
 
           <div class="automatic-comment">
 
             <p>
 
               <span title="${_('Changeset status')}" class="changeset-status-lbl">${_("Status change")}: ${co.status_change[0].status_lbl}</span>
 
               <span class="changeset-status-ico"><i class="icon-circle changeset-status-${co.status_change[0].status}"></i></span>
 
             </p>
 
           </div>
 
        %endif
 
        %if co.text:
 
          ${h.render_w_mentions(co.text, c.repo_name)|n}
 
        %endif
 
      </div>
 
    </div>
 
  </div>
 
</%def>
 

	
 

	
 
<%def name="comment_inline_form()">
 
<div id='comment-inline-form-template' style="display:none">
 
  <div class="ac">
 
  %if c.authuser.username != 'default':
 
    ${h.form('#', class_='inline-form')}
 
      <div class="well well-sm clearfix">
 
        <div class="comment-help">${_('Commenting on line.')}
 
          <span class="text-muted">${_('Comments are in plain text. Use @username inside this text to notify another user.')|n}</span>
 
        </div>
 
        <div class="mentions-container"></div>
 
        <textarea name="text" class="comment-block-ta yui-ac-input"></textarea>
 
        <textarea name="text" class="form-control comment-block-ta yui-ac-input"></textarea>
 

	
 
        <div id="status_block_container" class="status-block general-only hidden">
 
                %if c.pull_request is None:
 
                  ${_('Set changeset status')}:
 
                %else:
 
                  ${_('Vote for pull request status')}:
 
                %endif
 
                <span class="general-only cs-only">
 
                </span>
 
                <label class="radio-inline">
 
                    <input type="radio" class="status_change_radio" name="changeset_status" id="changeset_status_unchanged" value="" checked="checked" />
 
                    ${_('No change')}
 
                </label>
 
                %for status, lbl in c.changeset_statuses:
 
                    <label class="radio-inline">
 
                        <input type="radio" class="status_change_radio" name="changeset_status" id="${status}" value="${status}">
 
                        ${lbl}<i class="icon-circle changeset-status-${status}" /></i>
 
                    </label>
 
                %endfor
 

	
 
                %if c.pull_request is not None and ( \
 
                    h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) \
 
                    or c.pull_request.owner_id == c.authuser.user_id):
 
                <div>
 
                  ${_('Finish pull request')}:
 
                  <label class="checkbox-inline">
 
                    <input id="save_close" type="checkbox" name="save_close">
 
                    ${_("Close")}
 
                  </label>
 
                  <label class="checkbox-inline">
 
                    <input id="save_delete" type="checkbox" name="save_delete" value="delete">
 
                    ${_("Delete")}
 
                  </label>
 
                </div>
 
                %endif
 
        </div>
 

	
 
      </div>
 
      <div class="comment-button">
 
        <div class="submitting-overlay">${_('Submitting ...')}</div>
 
        ${h.submit('save', _('Comment'), class_='btn btn-default btn-sm save-inline-form')}
 
        ${h.reset('hide-inline-form', _('Cancel'), class_='btn btn-default btn-sm hide-inline-form')}
 
      </div>
 
    ${h.end_form()}
 
  %else:
 
      ${h.form('')}
 
      <div class="clearfix">
 
          <div class="comment-help">
kallithea/templates/files/files_add.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Files Add') % c.repo_name}
 
</%block>
 

	
 
<%block name="js_extra">
 
  <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
 
</%block>
 
<%block name="css_extra">
 
  <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
 
</%block>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Add New File')} @ ${h.show_id(c.cs)}
 
</%def>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('files')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading clearfix">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
            <li>
 
              <span><a href="#">${_('Branch')}: ${c.cs.branch}</a></span>
 
            </li>
 
        </ul>
 
    </div>
 
    <div class="table" id="edit">
 
        <div id="files_data">
 
          ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data", class_="form-horizontal form-inline")}
 
          <h3 class="files_location">
 
            ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.f_path)} /
 
              <span id="filename_container" class="file reviewer_ac">
 
                  <input class="input-small" type="text" value="" size="30" name="filename" id="filename" placeholder="${_('Enter filename...')}">
 
                  <input class="form-control input-small" type="text" value="" size="30" name="filename" id="filename" placeholder="${_('Enter filename...')}">
 
                  <input type="hidden" value="${c.f_path}" size="30" name="location" id="location">
 
                  ${_('or')} <div class="btn btn-default btn-sm" id="upload_file_enable">${_('Upload File')}</div>
 
              </span>
 
              <span id="upload_file_container" class="reviewer_ac" style="display:none">
 
                  <input type="file" size="20" name="upload_file" id="upload_file">
 
                  <input class="form-control" type="file" size="20" name="upload_file" id="upload_file">
 
                  ${_('or')} <div class="btn btn-default btn-sm" id="file_enable">${_('Create New File')}</div>
 
              </span>
 
          </h3>
 
            <div id="body" class="codeblock">
 
            <div class="code-header" id="mimetype_header">
 
                <label class="commit" for="mimetype">${_('New file type')}</label>
 
                <select id="mimetype" name="mimetype"/>
 
                <select class="form-control" id="mimetype" name="mimetype"/>
 
            </div>
 
                <div id="editor_container">
 
                    <pre id="editor_pre"></pre>
 
                    <textarea id="editor" name="content" style="display:none"></textarea>
 
                </div>
 
                <div style="padding: 10px;color:#666666">${_('Commit Message')}</div>
 
                <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
 
                <textarea class="form-control" id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
 
            </div>
 
            <div style="text-align: left;padding-top: 5px">
 
            ${h.submit('commit',_('Commit Changes'),class_="btn btn-success btn-sm")}
 
            ${h.reset('reset',_('Reset'),class_="btn btn-default btn-sm")}
 
            </div>
 
            ${h.end_form()}
 
            <script type="text/javascript">
 
                $(document).ready(function(){
 
                    var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}";
 
                    var myCodeMirror = initCodeMirror('editor', "${request.script_name}", reset_url);
 

	
 
                    //inject new modes, based on codeMirrors modeInfo object
 
                    var $mimetype_select = $('#mimetype');
 
                    $mimetype_select.each(function(){
 
                        var modes_select = this;
 
                        var index = 1;
 
                        for(var i=0;i<CodeMirror.modeInfo.length;i++){
 
                            var m = CodeMirror.modeInfo[i];
 
                            var opt = new Option(m.name, m.mime);
 
                            $(opt).attr('mode', m.mode);
 
                            if (m.mime == 'text/plain') {
 
                                // default plain text
 
                                $(opt).prop('selected', true);
 
                                modes_select.options[0] = opt;
 
                            } else {
 
                                modes_select.options[index++] = opt;
 
                            }
 
                        }
 
                    });
 
                    var $filename_input = $('#filename');
 
                    $mimetype_select.change(function(e){
 
                        var selected = e.currentTarget;
 
                        var node = selected.options[selected.selectedIndex];
 
                        var detected_mode = CodeMirror.findModeByMIME(node.value);
 
                        setCodeMirrorMode(myCodeMirror, detected_mode);
 

	
 
                        var proposed_ext = CodeMirror.findExtensionByMode(detected_mode);
 
                        var file_data = CodeMirror.getFilenameAndExt($filename_input.val());
 
                        var filename = file_data['filename'] || 'filename1';
 
                        $filename_input.val(filename + '.' + proposed_ext);
 
                    });
 

	
 
                    // on type the new filename set mode
 
                    $filename_input.keyup(function(e){
 
                        var file_data = CodeMirror.getFilenameAndExt(this.value);
 
                        if(file_data['ext'] != null){
 
                            var detected_mode = CodeMirror.findModeByExtension(file_data['ext']) || CodeMirror.findModeByMIME('text/plain');
 
                            if (detected_mode){
kallithea/templates/files/files_delete.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Files Delete') % c.repo_name}
 
</%block>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Delete file')} @ ${h.show_id(c.cs)}
 
</%def>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('files')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading clearfix">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
            <li>
 
              <span><a href="#">${_('Branch')}: ${c.cs.branch}</a></span>
 
            </li>
 
        </ul>
 
    </div>
 
    <div class="table" id="edit">
 
        <div id="files_data">
 
            ${h.form(h.url.current(),method='post',class_="form-horizontal")}
 
            <h3 class="files_location">
 
                ${_('Delete file')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.f_path)}
 
            </h3>
 

	
 
            <div id="body" class="codeblock">
 
                <div id="editor_container">
 
                    <pre id="editor_pre"></pre>
 
                    <textarea id="editor" name="content" style="display:none"></textarea>
 
                    <textarea class="form-control" id="editor" name="content" style="display:none"></textarea>
 
                </div>
 
                <div style="padding: 10px;color:#666666">${_('Commit Message')}</div>
 
                <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
 
            </div>
 
            <div style="text-align: left;padding-top: 5px">
 
                ${h.submit('commit',_('Commit Changes'),class_="btn btn-success btn-sm")}
 
                ${h.reset('reset',_('Reset'),class_="btn btn-default btn-sm")}
 
            </div>
 
            ${h.end_form()}
 
        </div>
 
    </div>
 
</div>
 
</%def>
kallithea/templates/files/files_edit.html
Show inline comments
 
@@ -11,102 +11,102 @@
 
</%block>
 
<%block name="css_extra">
 
  <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
 
</%block>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Edit file')} @ ${h.show_id(c.cs)}
 
</%def>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('files')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading clearfix">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
            <li>
 
              <span><a href="#">${_('Branch')}: ${c.cs.branch}</a></span>
 
            </li>
 
        </ul>
 
    </div>
 
    <div class="table" id="edit">
 
        <div id="files_data">
 
            <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.file.path)}</h3>
 
            ${h.form(h.url.current(),method='post',id='eform',class_='form-inline')}
 
            <div id="body" class="codeblock">
 
            <div class="code-header">
 
                <div class="stats">
 
                    <div class="left"><i class="icon-doc-inv"></i></div>
 
                    <div class="left item">${h.link_to(h.show_id(c.file.changeset),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div>
 
                    <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div>
 
                    <div class="left item last">${c.file.mimetype}</div>
 
                    <div class="buttons">
 
                      ${h.link_to(_('Show Annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
                      ${h.link_to(_('Show as Raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
                      ${h.link_to(_('Download as Raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
                      % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
 
                       % if not c.file.is_binary:
 
                        ${h.link_to(_('Source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
                       % endif
 
                      % endif
 
                    </div>
 
                </div>
 
                <label class="commit" for="mimetype">${_('Editing file')}: ${c.file.unicode_path}</label>
 
                <select id="mimetype" name="mimetype"/>
 
                <select class="form-control" id="mimetype" name="mimetype"/>
 
            </div>
 
                <pre id="editor_pre"></pre>
 
                <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea>
 
                <div class="text-muted" style="padding: 10px">${_('Commit Message')}</div>
 
                <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
 
                <textarea class="form-control" id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
 
            </div>
 
            <div style="text-align: left;padding-top: 5px">
 
            ${h.submit('commit',_('Commit Changes'),class_="btn btn-success")}
 
            ${h.reset('reset',_('Reset'),class_="btn btn-default")}
 
            </div>
 
            ${h.end_form()}
 
        </div>
 
    </div>
 
</div>
 

	
 
<script type="text/javascript">
 
    $(document).ready(function(){
 
        var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}";
 
        var myCodeMirror = initCodeMirror('editor', "${request.script_name}", reset_url);
 

	
 
       //inject new modes, based on codeMirrors modeInfo object
 
        var $mimetype_select = $('#mimetype');
 
        $mimetype_select.each(function(){
 
            var modes_select = this;
 
            var index = 1;
 
            for(var i=0;i<CodeMirror.modeInfo.length;i++){
 
                var m = CodeMirror.modeInfo[i];
 
                var opt = new Option(m.name, m.mime);
 
                $(opt).attr('mode', m.mode);
 
                if (m.mime == 'text/plain') {
 
                    // default plain text
 
                    $(opt).prop('selected', true);
 
                    modes_select.options[0] = opt;
 
                } else {
 
                    modes_select.options[index++] = opt;
 
                }
 
            }
 
        });
 
        // try to detect the mode based on the file we edit
 
        var detected_mode = CodeMirror.findModeByExtension("${c.file.extension}");
 
        if(detected_mode){
 
            setCodeMirrorMode(myCodeMirror, detected_mode);
 
            $($mimetype_select.find('option[value="'+detected_mode.mime+'"]')[0]).prop('selected', true);
 
        }
 

	
 
        $mimetype_select.on('change', function(e){
 
            var selected = e.currentTarget;
 
            var node = selected.options[selected.selectedIndex];
 
            var detected_mode = CodeMirror.findModeByMIME(node.value);
 
            setCodeMirrorMode(myCodeMirror, detected_mode);
 
        });
 
    });
 
</script>
kallithea/templates/forks/fork.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Fork repository %s') % c.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Fork')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('createfork')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="form-horizontal">
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="repo_name">${_('Fork name')}:</label>
 
                <div>
 
                    ${h.text('repo_name',class_='form-control')}
 
                    ${h.hidden('repo_type',c.repo_info.repo_type)}
 
                    ${h.hidden('fork_parent_id',c.repo_info.repo_id)}
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="description">${_('Description')}:</label>
 
                <div>
 
                    ${h.textarea('description')}
 
                    ${h.textarea('description',class_='form-control')}
 
                    <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="repo_group">${_('Repository group')}:</label>
 
                <div>
 
                    ${h.select('repo_group','',c.repo_groups,class_='form-control')}
 
                    <span class="help-block">${_('Optionally select a group to put this repository into.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="landing_rev">${_('Landing revision')}:</label>
 
                <div>
 
                    ${h.select('landing_rev','',c.landing_revs,class_='form-control')}
 
                    <span class="help-block">${_('Default revision for files page, downloads, whoosh, and readme.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="private">${_('Private')}:</label>
 
                <div>
 
                    ${h.checkbox('private',value="True")}
 
                    <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="copy_permissions">${_('Copy permissions')}:</label>
 
                <div>
 
                    ${h.checkbox('copy_permissions',value="True", checked="checked")}
 
                    <span class="help-block">${_('Copy permissions from forked repository')}</span>
 
                </div>
 
            </div>
 

	
 
            %if c.can_update:
 
            <div class="form-group">
 
                <label class="control-label" for="update_after_clone">${_('Update after clone')}:</label>
 
                <div>
 
                    ${h.checkbox('update_after_clone',value="True")}
 
                    <span class="help-block">${_('Checkout source after making a clone')}</span>
 
                </div>
 
            </div>
 
            %endif
 

	
 
            <div class="form-group">
 
                <div class="buttons">
kallithea/templates/journal/journal.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 
<%block name="title">
 
    ${_('Journal')}
 
</%block>
 
<%def name="breadcrumbs()">
 
    <h5>
 
    <form id="filter_form" class="form-inline">
 
    <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('quick filter...')}"/>
 
    <input class="form-control q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('quick filter...')}"/>
 
    <span data-toggle="tooltip" title="${h.journal_filter_help()}">?</span>
 
    <input type='submit' value="${_('Filter')}" class="btn btn-default btn-xs"/>
 
    ${_('Journal')} - ${ungettext('%s Entry', '%s Entries', c.journal_pager.item_count) % (c.journal_pager.item_count)}
 
    </form>
 
    ${h.end_form()}
 
    </h5>
 
</%def>
 
<%block name="header_menu">
 
    ${self.menu('journal')}
 
</%block>
 
<%block name="head_extra">
 
  <link href="${h.url('journal_atom', api_key=c.authuser.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" />
 
  <link href="${h.url('journal_rss', api_key=c.authuser.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" />
 
</%block>
 

	
 
<%def name="main()">
 
    <div class="panel panel-primary">
 
        <!-- box / title -->
 
        <div class="panel-heading clearfix">
 
         ${self.breadcrumbs()}
 
         <ul class="links icon-only-links">
 
           <li>
 
             <a href="${h.url('my_account_watched')}"><i class="icon-eye"></i> ${_('Watched Repositories')}</a>
 
           </li>
 
           <li>
 
             <a href="${h.url('my_account_repos')}"><i class="icon-database"></i> ${_('My Repositories')}</a>
 
           </li>
 
           <li>
 
             <span><a id="refresh" href="${h.url('journal')}"><i class="icon-arrows-cw"></i></a></span>
 
           </li>
 
           <li>
 
             <span><a href="${h.url('journal_atom', api_key=c.authuser.api_key)}"><i class="icon-rss-squared"></i></a></span>
 
           </li>
 
         </ul>
 
        </div>
 
        <div id="journal">
 
            <%include file='journal_data.html'/>
 
        </div>
 
    </div>
 

	
 
<script type="text/javascript">
 

	
 
    $('#j_filter').click(function(){
 
        var $jfilter = $('#j_filter');
 
        if($jfilter.hasClass('initial')){
 
            $jfilter.val('');
 
        }
 
    });
kallithea/templates/password_reset.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="base/root.html"/>
 

	
 
<%block name="title">
 
    ${_('Password Reset')}
 
</%block>
 

	
 
<div id="register">
 
    <%include file="/base/flash_msg.html"/>
 
    <div class="panel-heading withlogo">
 
        %if c.site_name:
 
            <h5>${_('Reset Your Password to %s') % c.site_name}</h5>
 
        %else:
 
            <h5>${_('Reset Your Password')}</h5>
 
        %endif
 
    </div>
 
    <div class="inner">
 
        ${h.form(url('password_reset'))}
 
        <div class="form">
 
            <!-- fields -->
 
            <div class="form-horizontal">
 

	
 
                <div class="form-group">
 
                    <label class="control-label" for="email">${_('Email Address')}:</label>
 
                    <div>
 
                        ${h.text('email')}
 
                        ${h.text('email', class_='form-control')}
 
                    </div>
 
                </div>
 

	
 
                %if c.captcha_active:
 
                <div class="form-group">
 
                    <label class="control-label" for="recaptcha_field">${_('Captcha')}:</label>
 
                    <div>
 
                        ${h.hidden('recaptcha_field')}
 
                        <div id="recaptcha"></div>
 
                    </div>
 
                </div>
 
                %endif
 

	
 
                <div class="buttons">
 
                    <div class="nohighlight">
 
                      ${h.submit('send',_('Send Password Reset Email'),class_="btn btn-default")}
 
                    </div>
 
                </div>
 

	
 
                <div class="alert alert-info">
 
                    ${_('A password reset link will be sent to the specified email address if it is registered in the system.')}
 
                </div>
 
            </div>
 
        </div>
 
        ${h.end_form()}
 
        %if c.captcha_active:
 
        <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
 
        %endif
 
        <script type="text/javascript">
 
         $(document).ready(function(){
 
            $('#email').focus();
 
            %if c.captcha_active:
 
            Recaptcha.create("${c.captcha_public_key}", "recaptcha",
 
                {
 
                  theme: "white"
 
                }
 
            );
 
            %endif
 
         });
 
        </script>
 
    </div>
 
   </div>
kallithea/templates/pullrequests/pullrequest.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${c.repo_name} ${_('New Pull Request')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('New Pull Request')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('showpullrequest')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading clearfix">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')}
 
    <div class="form">
 
        <!-- fields -->
 

	
 
        <div class="form-horizontal" style="float:left;width:50%;padding-right:30px;">
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="pullrequest_title">${_('Title')}:</label>
 
                <div>
 
                    ${h.text('pullrequest_title',class_='form-control',placeholder=_('Summarize the changes - or leave empty'))}
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label" for="pullrequest_desc">${_('Description')}:</label>
 
                <div>
 
                    ${h.textarea('pullrequest_desc',size=30,placeholder=_('Write a short description on this pull request'))}
 
                    ${h.textarea('pullrequest_desc',class_='form-control',size=30,placeholder=_('Write a short description on this pull request'))}
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label class="control-label">${_('Changeset flow')}:</label>
 
                <div>
 
                    ##ORG
 
                    <div>
 
                        <div>
 
                            <div style="padding:5px 3px 3px 3px;">
 
                            <b>${_('Origin repository')}:</b> <span id="org_repo_desc">${c.db_repo.description.split('\n')[0]}</span>
 
                            </div>
 
                            <div>
 
                            ${h.select('org_repo','',c.cs_repos,class_='refs')}:${h.select('org_ref',c.default_cs_ref,c.cs_refs,class_='refs')}
 
                            </div>
 
                            <div style="padding:5px 3px 3px 3px;">
 
                            <b>${_('Revision')}:</b> <span id="org_rev_span">-</span>
 
                            </div>
 
                        </div>
 
                    </div>
 

	
 
                    ##OTHER, most Probably the PARENT OF THIS FORK
 
                    <div style="border-top: 1px solid #EEE; margin: 5px 0px 0px 0px">
 
                        <div>
 
                            ## filled with JS
 
                            <div style="padding:5px 3px 3px 3px;">
 
                            <b>${_('Destination repository')}:</b> <span id="other_repo_desc">${c.a_repo.description.split('\n')[0]}</span>
 
                            </div>
 
                            <div>
 
                            ${h.select('other_repo',c.a_repo.repo_name,c.a_repos,class_='refs')}:${h.select('other_ref',c.default_a_ref,c.a_refs,class_='refs')}
 
                            </div>
 
                            <div style="padding:5px 3px 3px 3px;">
 
                            <b>${_('Revision')}:</b> <span id="other_rev_span">-</span>
 
                            </div>
 
                        </div>
 
                    </div>
 
                    <div style="clear:both"></div>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <div class="buttons">
 
                    ${h.submit('save',_('Create Pull Request'),class_="btn btn-default")}
 
                    ${h.reset('reset',_('Reset'),class_="btn btn-default")}
 
                </div>
 
            </div>
 

	
 
        </div>
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -12,97 +12,97 @@
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
<% editable = not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.owner_id == c.authuser.user_id) %>
 
${self.repo_context_bar('showpullrequest')}
 
<div class="panel panel-primary">
 
  <!-- box / title -->
 
  <div class="panel-heading">
 
    ${self.breadcrumbs()}
 
  </div>
 

	
 
  ${h.form(url('pullrequest_post', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), method='post', id='pull_request_form')}
 
    <div class="form pr-box" style="float: left">
 
      <div class="pr-details-title ${'closed' if c.pull_request.is_closed() else ''}">
 
          ${_('Title')}: ${c.pull_request.title}
 
          %if c.pull_request.is_closed():
 
              (${_('Closed')})
 
          %endif
 
      </div>
 
      <div id="pr-summary" class="fields">
 

	
 
        <div class="pr-not-edit" style="min-height:37px">
 
            <label>${_('Description')}:</label>
 
            %if editable:
 
            <div style="margin: 25px 5px; position: absolute">
 
              <a class="btn btn-default btn-xs" onclick="$('.pr-do-edit').show();$('.pr-not-edit').hide()">${_("Edit")}</a>
 
            </div>
 
            %endif
 
          <div>
 
            <div class="formatted-fixed">${h.urlify_text(c.pull_request.description, c.pull_request.org_repo.repo_name)}</div>
 
          </div>
 
        </div>
 

	
 
        %if editable:
 
        <div class="pr-do-edit" style="display:none">
 
          <div>
 
              <label for="pullrequest_title">${_('Title')}:</label>
 
              <div>
 
                  ${h.text('pullrequest_title',class_='form-control',value=c.pull_request.title,placeholder=_('Summarize the changes'))}
 
              </div>
 
          </div>
 

	
 
          <div>
 
              <label for="pullrequest_desc">${_('Description')}:</label>
 
              <div>
 
                  ${h.textarea('pullrequest_desc',size=30,content=c.pull_request.description,placeholder=_('Write a short description on this pull request'))}
 
                  ${h.textarea('pullrequest_desc',size=30,content=c.pull_request.description,placeholder=_('Write a short description on this pull request'),class_='form-control')}
 
              </div>
 
          </div>
 
        </div>
 
        %endif
 

	
 
        <div>
 
          <label>${_('Reviewer voting result')}:</label>
 
          <div>
 
            <div class="changeset-status-container" style="float:none;clear:both">
 
            %if c.current_voting_result:
 
              <span class="changeset-status-ico" style="padding:0px 4px 0px 0px">
 
                  <i class="icon-circle changeset-status-${c.current_voting_result}" title="${_('Pull request status calculated from votes')}"></i></span>
 
              <span class="changeset-status-lbl" data-toggle="tooltip" title="${_('Pull request status calculated from votes')}">
 
                %if c.pull_request.is_closed():
 
                    ${_('Closed')},
 
                %endif
 
                ${h.changeset_status_lbl(c.current_voting_result)}
 
              </span>
 
            %endif
 
            </div>
 
          </div>
 
        </div>
 
        <div>
 
          <label>${_('Still not reviewed by')}:</label>
 
          <div>
 
            % if len(c.pull_request_pending_reviewers) > 0:
 
                <div data-toggle="tooltip" title="${', '.join([x.username for x in c.pull_request_pending_reviewers])}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div>
 
            % elif len(c.pull_request_reviewers) > 0:
 
                <div>${_('Pull request was reviewed by all reviewers')}</div>
 
            %else:
 
                <div>${_('There are no reviewers')}</div>
 
            %endif
 
          </div>
 
        </div>
 
        <div>
 
          <label>${_('Origin')}:</label>
 
          <div>
 
            <div>
 
              ${h.link_to_ref(c.pull_request.org_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev)}
 
              %if c.cs_ref_type != 'branch':
 
                ${_('on')} ${h.link_to_ref(c.pull_request.org_repo.repo_name, 'branch', c.cs_branch_name)}
 
              %endif
 
            </div>
 
          </div>
 
        </div>
 
        <div>
 
          <label>${_('Target')}:</label>
 
          <div>
 
@@ -192,97 +192,97 @@ ${self.repo_context_bar('showpullrequest
 
              </div>
 
              <div class="msg-div">(${_("Pull request iterations do not change content once created. Select a revision and save to make a new iteration.")})</div>
 
              %endif
 
              <div class="msg-div">${c.update_msg_other}</div>
 
            </div>
 
        </div>
 
      </div>
 
    </div>
 
    ## REVIEWERS
 
    <div style="float:left; border-left:1px dashed #eee">
 
        <div class="pr-details-title">${_('Pull Request Reviewers')}</div>
 
        <div id="reviewers" style="padding:0px 0px 5px 10px">
 
          ## members goes here !
 
          <div>
 
            %for member,status in c.pull_request_reviewers:
 
              <input type="hidden" value="${member.user_id}" name="org_review_members" />
 
            %endfor
 
            <ul id="review_members">
 
            %for member,status in c.pull_request_reviewers:
 
              ## WARNING: the HTML below is duplicate with
 
              ## kallithea/public/js/base.js
 
              ## If you change something here it should be reflected in the template too.
 
              <li id="reviewer_${member.user_id}">
 
                <span class="reviewers_member">
 
                  <span class="reviewer_status" data-toggle="tooltip" title="${h.changeset_status_lbl(status)}">
 
                      <i class="icon-circle changeset-status-${status}"></i>
 
                  </span>
 
                  ${h.gravatar(member.email, size=14)}
 
                  <span>
 
                    ${member.full_name_and_username}
 
                    %if c.pull_request.owner_id == member.user_id:
 
                      (${_('Owner')})
 
                    %endif
 
                  </span>
 
                  <input type="hidden" value="${member.user_id}" name="review_members" />
 
                  %if editable:
 
                  <a href="#" class="reviewer_member_remove" onclick="removeReviewMember(${member.user_id})" title="${_('Remove reviewer')}">
 
                      <i class="icon-minus-circled"></i>
 
                  </a>
 
                  %endif
 
                </span>
 
              </li>
 
            %endfor
 
            </ul>
 
          </div>
 
          %if editable:
 
          <div class='ac'>
 
            <div class="reviewer_ac">
 
               ${h.text('user', class_='yui-ac-input',placeholder=_('Type name of reviewer to add'))}
 
               ${h.text('user', class_='yui-ac-input form-control',placeholder=_('Type name of reviewer to add'))}
 
               <div id="reviewers_container"></div>
 
            </div>
 
          </div>
 
          %endif
 
        </div>
 

	
 
        %if not c.pull_request_reviewers:
 
        <div class="pr-details-title">${_('Potential Reviewers')}</div>
 
        <div style="margin: 10px 0 10px 10px; max-width: 250px">
 
          <div>
 
            ${_('Click to add the repository owner as reviewer:')}
 
          </div>
 
          <ul style="margin-top: 10px">
 
            %for u in [c.pull_request.other_repo.owner]:
 
              <li>
 
                <a class="missing_reviewer missing_reviewer_${u.user_id}"
 
                  user_id="${u.user_id}"
 
                  fname="${u.name}"
 
                  lname="${u.lastname}"
 
                  nname="${u.username}"
 
                  gravatar_lnk="${h.gravatar_url(u.email, size=28, default='default')}"
 
                  gravatar_size="14"
 
                  title="Click to add reviewer to the list, then Save Changes.">${u.full_name}</a>
 
              </li>
 
            %endfor
 
          </ul>
 
        </div>
 
        %endif
 
    </div>
 
    <div class="form" style="clear:both">
 
      <div class="fields">
 
        %if editable:
 
          <div class="buttons">
 
            ${h.submit('pr-form-save',_('Save Changes'),class_="btn btn-default btn-sm")}
 
            ${h.submit('pr-form-clone',_('Create New Iteration with Changes'),class_="btn btn-default btn-sm",disabled='disabled')}
 
            ${h.reset('pr-form-reset',_('Cancel Changes'),class_="btn btn-default btn-sm")}
 
          </div>
 
        %endif
 
      </div>
 
    </div>
 
  ${h.end_form()}
 
</div>
 

	
 
<div class="panel panel-primary">
 
    <div class="panel-heading">
 
      <div class="breadcrumbs">${_('Pull Request Content')}</div>
 
    </div>
 
    <div class="table">
kallithea/templates/search/search.html
Show inline comments
 
@@ -14,79 +14,80 @@
 
    ${_('Search')}
 
  %else:
 
    ${_('Search in All Repositories')}
 
  %endif
 
  %if c.cur_query:
 
    &raquo;
 
    ${c.cur_query}
 
  %endif
 
</%def>
 

	
 
<%block name="header_menu">
 
    %if c.repo_name:
 
    ${self.menu('repositories')}
 
    %else:
 
    ${self.menu('search')}
 
    %endif
 
</%block>
 
<%def name="main()">
 
%if c.repo_name:
 
${self.repo_context_bar('options')}
 
%endif
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    %if c.repo_name:
 
        ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')}
 
    %else:
 
        ${h.form(h.url('search'),method='get')}
 
    %endif
 
    <div class="form">
 
        <div class="form-horizontal">
 
            <div class="form-group">
 
                <label class="control-label" for="q">${_('Search term')}:</label>
 
                <div>
 
                    ${h.text('q',c.cur_query,class_='form-control')}
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <label for="type">${_('Search in')}:</label>
 
                <div>
 
                    ${h.select('type',c.cur_type,[('content',_('File contents')),
 
                        ('commit',_('Commit messages')),
 
                        ('path',_('File names')),
 
                        ##('repository',_('Repository names')),
 
                        ])}
 
                        ],
 
                        class_='form-control')}
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <div class="buttons">
 
                    <input type="submit" value="${_('Search')}" class="btn btn-default"/>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                ## <label>${_('Status')}:</label>
 
                <div style="font-weight: bold;clear:both">${c.runtime}</div>
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
    <div class="search">
 
    %if c.cur_type == 'content':
 
        <%include file='search_content.html'/>
 
    %elif c.cur_type == 'path':
 
        <%include file='search_path.html'/>
 
    %elif c.cur_type == 'commit':
 
        <%include file='search_commit.html'/>
 
    %elif c.cur_type == 'repository':
 
        <%include file='search_repository.html'/>
 
    %endif
 
    </div>
 
</div>
 

	
 
</%def>
0 comments (0 inline, 0 general)