Changeset - 9447a8b26da0
kallithea/templates/admin/auth/auth_settings.html
Show inline comments
 
@@ -8,60 +8,63 @@
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${_('Authentication')}
 
</%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>
 
    ${h.form(url('auth_settings'))}
 
    <div class="form">
 

	
 
    ## enabled auth plugins
 
    <h1>${_('Authentication Plugins')}</h1>
 
    <div class="form-horizontal">
 
        <div class="form-group">
 
            <label class="control-label" for="auth_plugins">${_("Enabled Plugins")}</label>
 
            <div>${h.text("auth_plugins", class_='form-control')}
 
            <span class="help-block">${_('Comma-separated list of plugins; Kallithea will try user authentication in plugin order')}</span>
 
                <div style="padding:10px 0px 10px 0px;font-weight: bold">${_('Available built-in plugins')}</div>
 
                <ul>
 
            <div>
 
                ${h.text("auth_plugins", class_='form-control')}
 
                <span class="help-block">${_('Comma-separated list of plugins; Kallithea will try user authentication in plugin order')}</span>
 
            </div>
 
        </div>
 
        <div class="form-group">
 
            <label>${_('Available built-in plugins')}</label>
 
            <div>
 
                <ul class="list-group">
 
                %for plugin_path in c.available_plugins:
 
                    <li>
 
                      <div style="padding:3px 0px 3px 0px">
 
                        <span style="margin: 0px 10px 0px 0px" plugin_id="${plugin_path}" class="toggle-plugin btn btn-default btn-xs ${'active' if plugin_path in c.enabled_plugins else ''}">
 
                    <li class="list-group-item">
 
                        <span plugin_id="${plugin_path}" class="toggle-plugin btn btn-default btn-xs ${'active' if plugin_path in c.enabled_plugins else ''}">
 
                            ${_('Enabled') if plugin_path in c.enabled_plugins else _('Disabled')}
 
                        </span>
 
                        ${plugin_path}
 
                      </div>
 
                    </li>
 
                %endfor
 
                </ul>
 
            </div>
 
        </div>
 
    </div>
 

	
 
    %for cnt, module in enumerate(c.enabled_plugins):
 
        <% pluginName = c.plugin_shortnames[module] %>
 
        <h1>${_('Plugin')}: ${pluginName}</h1>
 
        <div class="form-horizontal">
 
        ## autoform generation, based on plugin definition from it's settings
 
        %for setting in c.plugin_settings[module]:
 
            <% fullsetting = "auth_%s_%s" % (pluginName, setting["name"]) %>
 
            <% displayname = (setting["formname"] if ("formname" in setting) else setting["name"]) %>
 
            %if setting["type"] == "password":
 
            <div class="form-group">
 
                <label class="control-label" for="${fullsetting}">${_(displayname)}</label>
 
                <div>
 
                    ${h.password(fullsetting,class_='form-control')}
 
                    <span class="help-block">${setting["description"]}</span>
 
                </div>
 
            </div>
 
            %elif setting["type"] in ["string", "int"]:
kallithea/templates/admin/gists/edit.html
Show inline comments
 
@@ -31,50 +31,52 @@
 

	
 
    <div class="table">
 
        <div id="edit_error" style="display: none" class="flash_msg">
 
            <div class="alert alert-dismissable alert-warning">
 
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true"><i class="icon-cancel-circled"></i></button>
 
              ${h.literal(_('Gist was update since you started editing. Copy your changes and click %(here)s to reload new version.')
 
                             % {'here': h.link_to('here',h.url('edit_gist', gist_id=c.gist.gist_access_id))})}
 
            </div>
 
            <script>
 
            if (typeof jQuery != 'undefined') {
 
                $(".alert").alert();
 
            }
 
            </script>
 
        </div>
 

	
 
        <div id="files_data">
 
          ${h.form(h.url('edit_gist', gist_id=c.gist.gist_access_id), method='post', id='eform')}
 
            <div>
 
                ${h.gravatar_div(c.authuser.email, size=32)}
 
                <input type="hidden" value="${c.file_changeset.raw_id}" name="parent_hash">
 
                <textarea style="resize:vertical; width:400px;border: 1px solid #ccc;border-radius: 3px;"
 
                          id="description" name="description"
 
                          placeholder="${_('Gist description ...')}">${c.gist.gist_description}</textarea>
 
                <div style="padding:0px 0px 0px 42px">
 
                    <label for='lifetime'>${_('Gist lifetime')}</label>
 
                    ${h.select('lifetime', '0', c.lifetime_options)}
 
                    <label>
 
                        ${_('Gist lifetime')}
 
                        ${h.select('lifetime', '0', c.lifetime_options)}
 
                    </label>
 
                    <span class="text-muted">
 
                     %if c.gist.gist_expires == -1:
 
                      ${_('Expires')}: ${_('Never')}
 
                     %else:
 
                      ${_('Expires')}: ${h.age(h.time_to_datetime(c.gist.gist_expires))}
 
                     %endif
 
                   </span>
 
                </div>
 
            </div>
 

	
 
            % for cnt, file in enumerate(c.files):
 
                <div id="body" class="codeblock" style="margin-bottom: 4px">
 
                    <div style="padding: 10px 10px 10px 26px;color:#666666">
 
                        <input type="hidden" value="${h.safe_unicode(file.path)}" name="org_files">
 
                        <input id="filename_${h.FID('f',file.path)}" name="files" size="30" type="text" value="${h.safe_unicode(file.path)}">
 
                        <select id="mimetype_${h.FID('f',file.path)}" name="mimetypes"/>
 
                    </div>
 
                    <div class="editor_container">
 
                        <pre id="editor_pre"></pre>
 
                        <textarea id="editor_${h.FID('f',file.path)}" name="contents" style="display:none">${file.content}</textarea>
 
                    </div>
 
                </div>
 

	
 
                ## dynamic edit box.
kallithea/templates/admin/gists/new.html
Show inline comments
 
@@ -15,50 +15,52 @@
 
</%block>
 

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

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

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

	
 
    <div class="table">
 
        <div id="files_data">
 
          ${h.form(h.url('gists'), method='post',id='eform')}
 
            <div>
 
                ${h.gravatar_div(c.authuser.email, size=32)}
 
                <textarea style="resize:vertical; width:400px;border: 1px solid #ccc;border-radius: 3px;" id="description" name="description" placeholder="${_('Gist description ...')}"></textarea>
 
                <div style="padding:0px 0px 0px 42px">
 
                <label for='lifetime'>${_('Gist lifetime')}</label>
 
                ${h.select('lifetime', '', c.lifetime_options)}
 
                    <label>
 
                        ${_('Gist lifetime')}
 
                        ${h.select('lifetime', '', c.lifetime_options)}
 
                    </label>
 
                </div>
 
            </div>
 
            <div id="body" class="codeblock">
 
                <div style="padding: 10px 10px 10px 26px;color:#666666">
 
                    ${h.text('filename', size=30, placeholder=_('name this file...'))}
 
                    <select 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>
 
            <div style="padding-top: 5px">
 
            ${h.submit('private',_('Create Private Gist'),class_="btn btn-success btn-xs")}
 
            ${h.submit('public',_('Create Public Gist'),class_="btn btn-default btn-xs")}
 
            ${h.reset('reset',_('Reset'),class_="btn btn-default btn-xs")}
 
            </div>
 
          ${h.end_form()}
 
          <script type="text/javascript">
 
            $(document).ready(function(){
 
                var myCodeMirror = initCodeMirror('editor', "${request.script_name}", '');
 

	
 
                //inject new modes
 
                var $mimetype_select = $('#mimetype');
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,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>
 
                    <label>
 
                        ${h.checkbox('overwrite_default_repo','true')}
 
                        <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,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>
 
                    <label>
 
                        ${h.checkbox('overwrite_default_group','true')}
 
                        <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,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>
 
                    <label>
 
                        ${h.checkbox('overwrite_default_user_group','true')}
 
                        <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,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,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,class_='form-control')}
 
                    <span class="help-block">${_('Enable this to allow non-admins to create user groups.')}</span>
 
                </div>
kallithea/templates/admin/repos/repo_edit_advanced.html
Show inline comments
 
@@ -61,34 +61,40 @@ ${h.form(url('edit_repo_advanced_locking
 
            <i class="icon-lock"></i>
 
            ${_('Lock Repository')}
 
        </button>
 
        ${_('Repository is not locked')}
 
      %endif
 
   <div class="text-muted" style="border:none">
 
   <ul>
 
        <li>${_('Force locking on the repository. Works only when anonymous access is disabled. Triggering a pull locks the repository.  The user who is pulling locks the repository; only the user who pulled and locked it can unlock it by doing a push.')}
 
        </li>
 
   </ul>
 
   </div>
 
</div>
 
${h.end_form()}
 

	
 
<h3>${_('Delete')}</h3>
 
${h.form(url('delete_repo', repo_name=c.repo_name))}
 
<div class="form">
 
    <button class="btn btn-danger btn-sm" type="submit"
 
            onclick="return confirm('${_('Confirm to delete this repository: %s') % c.repo_name}');">
 
        <i class="icon-minus-circled"></i>
 
        ${_('Delete this Repository')}
 
    </button>
 
    %if c.repo_info.forks.count():
 
        ${ungettext('This repository has %s fork', 'This repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()}
 
        <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label>
 
        <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label>
 
        <label>
 
            <input type="radio" name="forks" value="detach_forks" checked="checked"/>
 
            ${_('Detach forks')}
 
        </label>
 
        <label>
 
            <input type="radio" name="forks" value="delete_forks" />
 
            ${_('Delete forks')}
 
        </label>
 
    %endif
 
    <div class="text-muted" style="border:none">
 
        <ul>
 
        <li>${_('The deleted repository will be moved away and hidden until the administrator expires it. The administrator can both permanently delete it or restore it.')}</li>
 
        </ul>
 
    </div>
 
</div>
 
${h.end_form()}
kallithea/templates/admin/settings/settings_mapping.html
Show inline comments
 
${h.form(url('admin_settings_mapping'), method='post')}
 
    <div class="form">
 
        <div class="form-horizontal">
 
            <div class="form-group">
 
                <label class="control-label" for="destroy">${_('Rescan options')}:</label>
 
                <div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('destroy',True)}
 
                        <label for="destroy">${_('Delete records of missing repositories')}</label>
 
                        <label>
 
                            ${h.checkbox('destroy',True)}
 
                            ${_('Delete records of missing repositories')}
 
                        </label>
 
                    </div>
 
                    <span class="help-block">${_('Check this option to remove all comments, pull requests and other records related to repositories that no longer exist in the filesystem.')}</span>
 

	
 
                    <div class="checkbox">
 
                        ${h.checkbox('invalidate',True)}
 
                        <label for="invalidate"> ${_('Invalidate cache for all repositories')}</label>
 
                        <label>
 
                            ${h.checkbox('invalidate',True)}
 
                            ${_('Invalidate cache for all repositories')}
 
                        </label>
 
                    </div>
 
                    <span class="help-block">${_('Check this to reload data and clear cache keys for all repositories.')}</span>
 

	
 
                    <div class="checkbox">
 
                        ${h.checkbox('hooks',True)}
 
                        <label for="hooks"> ${_('Install Git hooks')} </label>
 
                        <label>
 
                            ${h.checkbox('hooks',True)}
 
                            ${_('Install Git hooks')}
 
                        </label>
 
                    </div>
 
                    <span class="help-block">${_("Verify if Kallithea's Git hooks are installed for each repository. Current hooks will be updated to the latest version.")}</span>
 
                    <div class="checkbox">
 
                        ${h.checkbox('hooks_overwrite', True)}
 
                        <label for="hooks_overwrite"> ${_('Overwrite existing Git hooks')}</label>
 
                        <label>
 
                            ${h.checkbox('hooks_overwrite', True)}
 
                            ${_('Overwrite existing Git hooks')}
 
                        </label>
 
                    </div>
 
                    <span class="help-block">${_("If installing Git hooks, overwrite any existing hooks, even if they do not seem to come from Kallithea. WARNING: This operation will destroy any custom git hooks you may have deployed by hand!")}</span>
 
                </div>
 
            </div>
 

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

	
 
        <div class="form-horizontal">
 
            <div class="form-group">
 
                <label class="control-label">${_('Index build option')}:</label>
 
                <div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('full_index',True)}
 
                        <label for="full_index">${_('Build from scratch')}</label>
 
                        <label>
 
                            ${h.checkbox('full_index',True)}
 
                            ${_('Build from scratch')}
 
                        </label>
 
                    </div>
 
                    <span class="help-block">${_('This option completely reindexeses all of the repositories for proper fulltext search capabilities.')}</span>
 

	
 
                </div>
 
            </div>
 

	
 
            <div class="form-group">
 
                <div class="buttons">
 
                    ${h.submit('reindex',_('Reindex'),class_="btn btn-default")}
 
                </div>
 
            </div>
 
        </div>
 
    </div>
 
${h.end_form()}
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>
 
                        <label>
 
                            ${h.checkbox('hooks_changegroup_repo_size','True')}
 
                            ${_('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>
 
                        <label>
 
                            ${h.checkbox('hooks_changegroup_push_logger','True')}
 
                            ${_('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>
 
                        <label>
 
                            ${h.checkbox('hooks_outgoing_pull_logger','True')}
 
                            ${_('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>
 
                        <label>
 
                            ${h.checkbox('hooks_changegroup_update','True')}
 
                            ${_('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>
 
                        <label>
 
                            ${h.checkbox('extensions_largefiles','True')}
 
                            ${_('Enable largefiles extension')}
 
                        </label>
 
                    </div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('extensions_hgsubversion','True')}
 
                        <label for="extensions_hgsubversion">${_('Enable hgsubversion extension')}</label>
 
                        <label>
 
                            ${h.checkbox('extensions_hgsubversion','True')}
 
                            ${_('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>
 
                    ##    <label>
 
                    ##        ${h.checkbox('extensions_hggit','True')}
 
                    ##        ${_('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",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")}
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>
 
                        <label>
 
                            ${h.checkbox('repository_fields','True')}
 
                            ${_('Use repository extra fields')}
 
                        </label>
 
                        <span class="help-block">${_('Allows storing additional customized fields per repository.')}</span>
 
                    </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>
 
                        <label>
 
                            ${h.checkbox('show_version','True')}
 
                            ${_('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>
 
                        <label>
 
                            ${h.checkbox('use_gravatar','True')}
 
                            ${_('Use Gravatars in Kallithea')}
 
                        </label>
 
                    </div>
 
                </div>
 
                <div>
 
                    <div>
 
                        ${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>
 

	
 
            <div class="form-group">
 
                <label>${_('Clone URL')}:</label>
 
                <div>
 
                    ${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,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,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>
 
                        <label>
 
                            ${h.checkbox('show_public_icon','True')}
 
                            ${_('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>
 
                        <label>
 
                            ${h.checkbox('show_private_icon','True')}
 
                            ${_('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;">
 
                    <div>
 
                        ${_('Stylify recognised meta tags:')}
 
                        <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>
 

	
 
        </div>
 
    </div>
kallithea/templates/base/base.html
Show inline comments
 
@@ -351,56 +351,59 @@
 
          href="${h.url('notifications')}"
 
        %else:
 
          href="#"
 
        %endif
 
      >
 
          ${h.gravatar_div(c.authuser.email, size=20, div_class="icon", div_style="display:inline", div_aria_hidden="true")}
 
          %if c.authuser.username != 'default':
 
            <span class="menu_link_user">${c.authuser.username}</span>
 
            %if c.unread_notifications != 0:
 
              <span class="badge">${c.unread_notifications}</span>
 
            %endif
 
          %else:
 
              <span>${_('Not Logged In')}</span>
 
          %endif
 
      </a>
 

	
 
      <div class="user-menu" role="menu">
 
        <div id="quick_login" role="form" aria-describedby="quick_login_h" aria-hidden="true" class="dropdown-menu">
 
          %if c.authuser.username == 'default' or c.authuser.user_id is None:
 
            <h4 id="quick_login_h">${_('Login to Your Account')}</h4>
 
            ${h.form(h.url('login_home', came_from=request.path_qs))}
 
            <div class="form">
 
                <div class="fields">
 
                    <div>
 
                        <label for="username">${_('Username')}:</label>
 
                        <div>
 
                            <label for="username">${_('Username')}:</label>
 
                        </div>
 
                        <div>
 
                            ${h.text('username',class_='form-control')}
 
                        </div>
 

	
 
                    </div>
 
                    <div>
 
                        <label for="password">${_('Password')}:</label>
 
                        <div>
 
                            <label for="password">${_('Password')}:</label>
 
                        </div>
 
                        <div>
 
                            ${h.password('password',class_='form-control')}
 
                        </div>
 

	
 
                    </div>
 
                    <div class="buttons">
 
                        <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div>
 
                        <div class="register">
 
                        %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
 
                         ${h.link_to(_("Don't have an account ?"),h.url('register'))}
 
                        %endif
 
                        </div>
 
                        <div class="submit">
 
                            ${h.submit('sign_in',_('Log In'),class_="btn btn-default btn-xs")}
 
                        </div>
 
                    </div>
 
                </div>
 
            </div>
 
            ${h.end_form()}
 
          %else:
 
            <div class="links_left">
 
                ${h.gravatar_div(c.authuser.email, size=48, div_class="big_gravatar")}
 
                <div class="full_name">${c.authuser.full_name_or_username}</div>
 
                <div class="email">${c.authuser.email}</div>
kallithea/templates/base/perms_summary.html
Show inline comments
 
## snippet for displaying permissions overview for users
 
## usage:
 
##    <%namespace name="p" file="/base/perms_summary.html"/>
 
##    ${p.perms_summary(c.perm_user.permissions)}
 

	
 
<%def name="perms_summary(permissions, show_all=False, actions=True)">
 
<div id="perms" class="table">
 
     %for section in sorted(permissions.keys()):
 
        <div class="perms_section_head">
 
            ${section.replace("_"," ").capitalize()}
 
            %if section != 'global':
 
                <div style="float: right">
 
                ${_('Show')}:
 
                ${h.checkbox('perms_filter_none_%s' % section, 'none', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='none')} <label for="${'perms_filter_none_%s' % section}"><span class="perm_tag none">${_('None')}</span></label>
 
                ${h.checkbox('perms_filter_read_%s' % section, 'read', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='read')} <label for="${'perms_filter_read_%s' % section}"><span class="perm_tag read">${_('Read')}</span></label>
 
                ${h.checkbox('perms_filter_write_%s' % section, 'write', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='write')} <label for="${'perms_filter_write_%s' % section}"> <span class="perm_tag write">${_('Write')}</span></label>
 
                ${h.checkbox('perms_filter_admin_%s' % section, 'admin', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='admin')} <label for="${'perms_filter_admin_%s' % section}"><span class="perm_tag admin">${_('Admin')}</span></label>
 
                <label>${h.checkbox('perms_filter_none_%s' % section, 'none', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='none')}<span class="perm_tag none">${_('None')}</span></label>
 
                <label>${h.checkbox('perms_filter_read_%s' % section, 'read', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='read')}<span class="perm_tag read">${_('Read')}</span></label>
 
                <label>${h.checkbox('perms_filter_write_%s' % section, 'write', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='write')}<span class="perm_tag write">${_('Write')}</span></label>
 
                <label>${h.checkbox('perms_filter_admin_%s' % section, 'admin', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='admin')}<span class="perm_tag admin">${_('Admin')}</span></label>
 
                </div>
 
            %endif
 
        </div>
 
        %if not permissions[section]:
 
            <span class="empty_data">${_('No permissions defined yet')}</span>
 
        %else:
 
        <div id='tbl_list_wrap_${section}' class="yui-skin-sam">
 
         <table id="tbl_list_${section}">
 
          ## global permission box
 
          %if section == 'global':
 
              <thead>
 
                  <tr>
 
                  <th colspan="2" class="left">${_('Permission')}</th>
 
                  %if actions:
 
                  <th class="left">${_('Edit Permission')}</th>
 
                  %endif
 
              </thead>
 
              <tbody>
 
              %for k in permissions[section]:
 
                  <tr>
 
                      <td colspan="2">
 
                          ${h.get_permission_name(k)}
 
                      </td>
 
                      %if actions:
kallithea/templates/files/files_add.html
Show inline comments
 
@@ -29,50 +29,52 @@ ${self.repo_context_bar('files')}
 
        ${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="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 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 class="form-control" id="mimetype" name="mimetype"/>
 
                <label class="commit">
 
                    ${_('New file type')}
 
                    <select class="form-control" id="mimetype" name="mimetype"/>
 
                </label>
 
            </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 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++){
kallithea/templates/files/files_browser.html
Show inline comments
 
@@ -16,50 +16,52 @@
 
</%def>
 
<%def name="file_name(node)">
 
    <%
 
        c = "icon-folder-open"
 
        if node.is_file():
 
            c = "icon-doc"
 
        elif node.is_submodule():
 
            c = "icon-file-submodule"
 
    %>
 
    <%return h.literal('<i class="%s"></i><span>%s</span>' % (c, h.escape(node.name)))%>
 
</%def>
 
<div id="body" class="browserblock">
 
    <div class="browser-header">
 
        <div class="browser-nav">
 
            ${h.form(h.url.current())}
 
            <div class="info_box">
 
              <div class="info_box_elem rev">${_('Revision')}</div>
 
              <div class="info_box_elem"><a class="btn btn-default btn-xs ypjax-link" href="${c.url_prev}" title="${_('Previous revision')}"><i class="icon-left-open"></i></a></div>
 
              <div class="info_box_elem">${h.text('at_rev',value=c.changeset.revision,size=5)}</div>
 
              <div class="info_box_elem"><a class="btn btn-default btn-xs ypjax-link" href="${c.url_next}" title="${_('Next revision')}"><i class="icon-right-open"></i></a></div>
 
            </div>
 
            ${h.end_form()}
 
        </div>
 
        <div class="browser-branch">
 
            ${h.checkbox('stay_at_branch',c.changeset.branch,c.changeset.branch==c.branch)}
 
            <label>${_('Follow current branch')}</label>
 
            <label>
 
                ${h.checkbox('stay_at_branch',c.changeset.branch,c.changeset.branch==c.branch)}
 
                ${_('Follow current branch')}
 
            </label>
 
        </div>
 
        <div id="search_activate_id" class="search_activate">
 
            <a class="btn btn-default btn-xs" id="filter_activate" href="#">${_('Search File List')}</a>
 
        </div>
 
        <div class="browser-search">
 
            <div>
 
                <div id="node_filter_box_loading" style="display:none">${_('Loading file list...')}</div>
 
                <div id="node_filter_box" style="display:none">
 
                ${h.files_breadcrumbs(c.repo_name,c.changeset.raw_id,c.file.path)}/<input class="init" type="text" value="type to search..." name="filter" size="25" id="node_filter">
 
                </div>
 
            </div>
 
        </div>
 
    </div>
 

	
 
    <div class="browser-body">
 
        <table class="code-browser">
 
            <thead>
 
                <tr>
 
                    <th>${_('Name')}</th>
 
                    <th>${_('Size')}</th>
 
                    <th>${_('Last Revision')}</th>
 
                    <th>${_('Last Modified')}</th>
 
                    <th>${_('Last Committer')}</th>
 
                </tr>
kallithea/templates/files/files_edit.html
Show inline comments
 
@@ -34,50 +34,52 @@ ${self.repo_context_bar('files')}
 
        </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 class="form-control" id="mimetype" name="mimetype"/>
 
                <label class="commit">
 
                    ${_('Editing file')}: ${c.file.unicode_path}
 
                    <select class="form-control" id="mimetype" name="mimetype"/>
 
                </label>
 
            </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 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;
kallithea/templates/login.html
Show inline comments
 
@@ -18,49 +18,49 @@
 
    <div class="panel-body inner">
 
        ${h.form(url('login_home', came_from=c.came_from))}
 
        <div class="form">
 
            <i class="icon-lock"></i>
 
            <!-- fields -->
 

	
 
            <div class="form-horizontal">
 
                <div class="form-group">
 
                    <label class="control-label col-sm-5" for="username">${_('Username')}:</label>
 
                    <div class="col-sm-7">
 
                        ${h.text('username',class_='form-control')}
 
                    </div>
 

	
 
                </div>
 
                <div class="form-group">
 
                    <label class="control-label col-sm-5" for="password">${_('Password')}:</label>
 
                    <div class="col-sm-7">
 
                        ${h.password('password',class_='form-control')}
 
                    </div>
 

	
 
                </div>
 
                <div class="form-group">
 
                    <div class="col-sm-offset-5 col-sm-7">
 
                        <div class="checkbox">
 
                            <label for="remember">
 
                            <label>
 
                                <input type="checkbox" id="remember" name="remember"/>
 
                                ${_('Stay logged in after browser restart')}
 
                            </label>
 
                        </div>
 
                    </div>
 
                </div>
 
            </div>
 
            <!-- end fields -->
 
            <!-- links -->
 
            <div class="links">
 
                ${h.link_to(_('Forgot your password ?'),h.url('reset_password'))}
 
                %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
 
                  /
 
                 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
 
                %endif
 
                <span class="buttons">
 
                    ${h.submit('sign_in',_('Sign In'),class_="btn btn-default")}
 
                </span>
 
            </div>
 

	
 
            <!-- end links -->
 
        </div>
 
        ${h.end_form()}
 
        <script type="text/javascript">
kallithea/templates/summary/statistics.html
Show inline comments
 
@@ -188,50 +188,50 @@ function SummaryPlot(from,to,dataset,ove
 
                 "added":0,
 
                 "changed":0,
 
                 "removed":0
 
            }],
 
            "schema":["commits"],
 
            "color":'#ffffff'
 
        }
 
    }
 

	
 
    /**
 
     * generate checkboxes accordingly to data
 
     * @param keys
 
     * @returns
 
     */
 
    function generateCheckboxes(data) {
 
        //append checkboxes
 
        var i = 0;
 
        choiceContainerTable.innerHTML = '';
 
        for(var pos in data) {
 

	
 
            data[pos].color = i;
 
            i++;
 
            if(data[pos].label != ''){
 
                choiceContainerTable.innerHTML +=
 
                    '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \
 
                     <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label);
 
                    '<tr><td><label><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \
 
                     {0}</label></td></tr>'.format(data[pos].label);
 
            }
 
        }
 
    }
 

	
 
    /**
 
     * ToolTip show
 
     */
 
    function showTooltip(x, y, contents) {
 
        var div=document.getElementById('tooltip');
 
        if(!div) {
 
            div = document.createElement('div');
 
            div.id="tooltip";
 
            div.style.position="absolute";
 
            div.style.border='1px solid #fdd';
 
            div.style.padding='2px';
 
            div.style.backgroundColor='#fee';
 
            document.body.appendChild(div);
 
        }
 
        YUD.setStyle(div, 'opacity', 0);
 
        div.innerHTML = contents;
 
        div.style.top=(y + 5) + "px";
 
        div.style.left=(x + 5) + "px";
 

	
 
        var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
kallithea/templates/summary/summary.html
Show inline comments
 
@@ -92,50 +92,52 @@ summary = lambda n:{False:'summary-short
 
                   ${_('Statistics are disabled for this repository')}
 
                   %if h.HasPermissionAny('hg.admin')('enable stats on from summary'):
 
                        ${h.link_to(_('Enable'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_statistics'),class_="btn btn-default btn-xs")}
 
                   %endif
 
                %endif
 
              </div>
 
            </div>
 

	
 
            <div class="form-group clearfix">
 
              <label>${_('Download')}:</label>
 
              <div class="${summary(c.show_stats)}">
 
                %if len(c.db_repo_scm_instance.revisions) == 0:
 
                  ${_('There are no downloads yet')}
 
                %elif not c.enable_downloads:
 
                  ${_('Downloads are disabled for this repository')}
 
                    %if h.HasPermissionAny('hg.admin')('enable downloads on from summary'):
 
                        ${h.link_to(_('Enable'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_downloads'),class_="btn btn-default btn-xs")}
 
                    %endif
 
                %else:
 
                    <span id="${'zip_link'}">
 
                        <a class="btn btn-default btn-sm" href="${h.url('files_archive_home',repo_name=c.db_repo.repo_name,fname='tip.zip')}"><i class="icon-file-zip"></i> ${_('Download as zip')}</a>
 
                    </span>
 
                    ${h.hidden('download_options')}
 
                    <span style="vertical-align: bottom">
 
                      <input id="archive_subrepos" type="checkbox" name="subrepos" />
 
                      <label for="archive_subrepos" data-toggle="tooltip" title="${_('Check this to download archive with subrepos')}" >${_('With subrepos')}</label>
 
                      <label data-toggle="tooltip" title="${_('Check this to download archive with subrepos')}">
 
                          <input id="archive_subrepos" type="checkbox" name="subrepos" />
 
                          ${_('With subrepos')}
 
                      </label>
 
                    </span>
 
                %endif
 
              </div>
 
            </div>
 
        </div>
 
        <div id="summary-menu-stats">
 
          <ul>
 
            <li>
 
               <a title="${_('Owner')} ${c.db_repo.owner.email}">
 
                <i class="icon-user"></i> ${c.db_repo.owner.username}
 
                ${h.gravatar_div(c.db_repo.owner.email, size=18, div_style="float: right; margin: 0px 0px 0px 0px", div_title=c.db_repo.owner.full_name)}
 
              </a>
 
            </li>
 
            <li>
 
               <a title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
 
                <i class="icon-heart"></i> ${_('Followers')}
 
                <span class="badge" id="current_followers_count">${c.repository_followers}</span>
 
              </a>
 
            </li>
 
            <li>
 
              <a title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
 
                <i class="icon-fork"></i> ${_('Forks')}
 
                <span class="badge">${c.repository_forks}</span>
 
              </a>
0 comments (0 inline, 0 general)