Changeset - dacdea9fda2a
[Not reviewed]
default
! ! !
Na'Tosha Bard - 11 years ago 2014-09-19 14:18:56
natosha@unity3d.com
Correct capitalization and improved English text in the UI
81 files changed with 210 insertions and 208 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
@@ -247,25 +247,25 @@ issue_prefix = #
 
#issue_pat_wiki = (?:wiki-)(.+)
 
#issue_server_link_wiki = https://mywiki.com/{id}
 
#issue_prefix_wiki = WIKI-
 

	
 

	
 
## instance-id prefix
 
## a prefix key for this instance used for cache invalidation when running
 
## multiple instances of kallithea, make sure it's globally unique for
 
## all running kallithea instances. Leave empty if you don't use it
 
instance_id =
 

	
 
## alternative return HTTP header for failed authentication. Default HTTP
 
## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
 
## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
 
## handling that. Set this variable to 403 to return HTTPForbidden
 
auth_ret_code =
 

	
 
## locking return code. When repository is locked return this HTTP code. 2XX
 
## codes don't break the transactions while 4XX codes do
 
lock_ret_code = 423
 

	
 
## allows to change the repository location in settings page
 
allow_repo_location_change = True
 

	
 
## allows to setup custom hooks in settings page
 
allow_custom_hooks_settings = True
kallithea/bin/template.ini.mako
Show inline comments
 
@@ -244,25 +244,25 @@ issue_prefix = #
 
#issue_pat_wiki = (?:wiki-)(.+)
 
#issue_server_link_wiki = https://mywiki.com/{id}
 
#issue_prefix_wiki = WIKI-
 

	
 

	
 
<%text>## instance-id prefix</%text>
 
<%text>## a prefix key for this instance used for cache invalidation when running</%text>
 
<%text>## multiple instances of kallithea, make sure it's globally unique for</%text>
 
<%text>## all running kallithea instances. Leave empty if you don't use it</%text>
 
instance_id =
 

	
 
<%text>## alternative return HTTP header for failed authentication. Default HTTP</%text>
 
<%text>## response is 401 HTTPUnauthorized. Currently HG clients have troubles with</%text>
 
<%text>## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with</%text>
 
<%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text>
 
auth_ret_code =
 

	
 
<%text>## locking return code. When repository is locked return this HTTP code. 2XX</%text>
 
<%text>## codes don't break the transactions while 4XX codes do</%text>
 
lock_ret_code = 423
 

	
 
<%text>## allows to change the repository location in settings page</%text>
 
allow_repo_location_change = True
 

	
 
<%text>## allows to setup custom hooks in settings page</%text>
 
allow_custom_hooks_settings = True
kallithea/config/deployment.ini_tmpl
Show inline comments
 
@@ -241,25 +241,25 @@ issue_prefix = #
 
#issue_pat_wiki = (?:wiki-)(.+)
 
#issue_server_link_wiki = https://mywiki.com/{id}
 
#issue_prefix_wiki = WIKI-
 

	
 

	
 
## instance-id prefix
 
## a prefix key for this instance used for cache invalidation when running
 
## multiple instances of kallithea, make sure it's globally unique for
 
## all running kallithea instances. Leave empty if you don't use it
 
instance_id =
 

	
 
## alternative return HTTP header for failed authentication. Default HTTP
 
## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
 
## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
 
## handling that. Set this variable to 403 to return HTTPForbidden
 
auth_ret_code =
 

	
 
## locking return code. When repository is locked return this HTTP code. 2XX
 
## codes don't break the transactions while 4XX codes do
 
lock_ret_code = 423
 

	
 
## allows to change the repository location in settings page
 
allow_repo_location_change = True
 

	
 
## allows to setup custom hooks in settings page
 
allow_custom_hooks_settings = True
kallithea/controllers/search.py
Show inline comments
 
@@ -132,16 +132,16 @@ class SearchController(BaseRepoControlle
 
                    )
 

	
 
                except QueryParserError:
 
                    c.runtime = _('Invalid search query. Try quoting it.')
 
                searcher.close()
 
            except (EmptyIndexError, IOError):
 
                log.error(traceback.format_exc())
 
                log.error('Empty Index data')
 
                c.runtime = _('There is no index to search in. '
 
                              'Please run whoosh indexer')
 
            except (Exception):
 
                log.error(traceback.format_exc())
 
                c.runtime = _('An error occurred during this search operation')
 
                c.runtime = _('An error occurred during search operation.')
 

	
 
        # Return a rendered template
 
        return render('/search/search.html')
kallithea/lib/middleware/simplegit.py
Show inline comments
 
@@ -46,25 +46,25 @@ from kallithea.lib.exceptions import HTT
 
from kallithea.lib.hooks import pre_pull
 
from kallithea.lib import auth_modules
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
GIT_PROTO_PAT = re.compile(r'^/(.+)/(info/refs|git-upload-pack|git-receive-pack)')
 

	
 

	
 
def is_git(environ):
 
    path_info = environ['PATH_INFO']
 
    isgit_path = GIT_PROTO_PAT.match(path_info)
 
    log.debug('pathinfo: %s detected as GIT %s' % (
 
    log.debug('pathinfo: %s detected as Git %s' % (
 
        path_info, isgit_path is not None)
 
    )
 
    return isgit_path
 

	
 

	
 
class SimpleGit(BaseVCSController):
 

	
 
    def _handle_request(self, environ, start_response):
 
        if not is_git(environ):
 
            return self.application(environ, start_response)
 
        if not self._check_ssl(environ):
 
            return HTTPNotAcceptable('SSL REQUIRED !')(environ, start_response)
 
@@ -191,25 +191,25 @@ class SimpleGit(BaseVCSController):
 
                       )
 
            # store the make_lock for later evaluation in hooks
 
            extras.update({'make_lock': make_lock,
 
                           'locked_by': locked_by})
 

	
 
        fix_PATH()
 
        log.debug('HOOKS extras is %s' % extras)
 
        baseui = make_ui('db')
 
        self.__inject_extras(repo_path, baseui, extras)
 

	
 
        try:
 
            self._handle_githooks(repo_name, action, baseui, environ)
 
            log.info('%s action on GIT repo "%s" by "%s" from %s' %
 
            log.info('%s action on Git repo "%s" by "%s" from %s' %
 
                     (action, str_repo_name, safe_str(username), ip_addr))
 
            app = self.__make_app(repo_name, repo_path, extras)
 
            return app(environ, start_response)
 
        except HTTPLockedRC, e:
 
            _code = CONFIG.get('lock_ret_code')
 
            log.debug('Repository LOCKED ret code %s!' % (_code))
 
            return e(environ, start_response)
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            return HTTPInternalServerError()(environ, start_response)
 
        finally:
 
            # invalidate cache on push
kallithea/lib/middleware/simplehg.py
Show inline comments
 
@@ -6,25 +6,25 @@
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.lib.middleware.simplehg
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
SimpleHG middleware for handling mercurial protocol request
 
SimpleHg middleware for handling mercurial protocol request
 
(push/clone etc.). It's implemented with basic auth function
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: Apr 28, 2010
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 

	
 
"""
 

	
 

	
 
@@ -51,25 +51,25 @@ log = logging.getLogger(__name__)
 
def is_mercurial(environ):
 
    """
 
    Returns True if request's target is mercurial server - header
 
    ``HTTP_ACCEPT`` of such request would start with ``application/mercurial``.
 
    """
 
    http_accept = environ.get('HTTP_ACCEPT')
 
    path_info = environ['PATH_INFO']
 
    if http_accept and http_accept.startswith('application/mercurial'):
 
        ishg_path = True
 
    else:
 
        ishg_path = False
 

	
 
    log.debug('pathinfo: %s detected as HG %s' % (
 
    log.debug('pathinfo: %s detected as Mercurial %s' % (
 
        path_info, ishg_path)
 
    )
 
    return ishg_path
 

	
 

	
 
class SimpleHg(BaseVCSController):
 

	
 
    def _handle_request(self, environ, start_response):
 
        if not is_mercurial(environ):
 
            return self.application(environ, start_response)
 
        if not self._check_ssl(environ):
 
            return HTTPNotAcceptable('SSL REQUIRED !')(environ, start_response)
 
@@ -193,25 +193,25 @@ class SimpleHg(BaseVCSController):
 
                            repo=repo_name, user_id=user.user_id
 
                       )
 
            # store the make_lock for later evaluation in hooks
 
            extras.update({'make_lock': make_lock,
 
                           'locked_by': locked_by})
 

	
 
        fix_PATH()
 
        log.debug('HOOKS extras is %s' % extras)
 
        baseui = make_ui('db')
 
        self.__inject_extras(repo_path, baseui, extras)
 

	
 
        try:
 
            log.info('%s action on HG repo "%s" by "%s" from %s' %
 
            log.info('%s action on Mercurial repo "%s" by "%s" from %s' %
 
                     (action, str_repo_name, safe_str(username), ip_addr))
 
            app = self.__make_app(repo_path, baseui, extras)
 
            return app(environ, start_response)
 
        except RepoError, e:
 
            if str(e).find('not found') != -1:
 
                return HTTPNotFound()(environ, start_response)
 
        except HTTPLockedRC, e:
 
            _code = CONFIG.get('lock_ret_code')
 
            log.debug('Repository LOCKED ret code %s!' % (_code))
 
            return e(environ, start_response)
 
        except Exception:
 
            log.error(traceback.format_exc())
kallithea/lib/utils.py
Show inline comments
 
@@ -816,25 +816,25 @@ def check_git_version():
 
    try:
 
        _ver = StrictVersion(ver)
 
    except Exception:
 
        _ver = StrictVersion('0.0.0')
 
        stderr = traceback.format_exc()
 

	
 
    req_ver = '1.7.4'
 
    to_old_git = False
 
    if  _ver < StrictVersion(req_ver):
 
        to_old_git = True
 

	
 
    if 'git' in BACKENDS:
 
        log.debug('GIT executable: "%s" version detected: %s'
 
        log.debug('Git executable: "%s" version detected: %s'
 
                  % (settings.GIT_EXECUTABLE_PATH, stdout))
 
        if stderr:
 
            log.warning('Unable to detect git version, org error was: %r' % stderr)
 
        elif to_old_git:
 
            log.warning('Kallithea detected git version %s, which is too old '
 
                        'for the system to function properly. Make sure '
 
                        'its version is at least %s' % (ver, req_ver))
 
    return _ver
 

	
 

	
 
@decorator.decorator
 
def jsonify(func, *args, **kwargs):
kallithea/public/css/style.css
Show inline comments
 
@@ -4831,24 +4831,25 @@ span.pr-closed-tag {
 

	
 
#pr-summary .msg-div {
 
    margin: 5px 0;
 
}
 

	
 
/****
 
  PERMS
 
*****/
 
#perms .perms_section_head {
 
    padding: 10px 10px 10px 0px;
 
    font-size: 16px;
 
    font-weight: bold;
 
    text-transform: capitalize;
 
}
 

	
 
#perms .perm_tag {
 
    padding: 1px 3px 1px 3px;
 
    font-size: 10px;
 
    font-weight: bold;
 
    text-transform: uppercase;
 
    white-space: nowrap;
 
    -webkit-border-radius: 3px;
 
    border-radius: 3px;
 
}
 

	
kallithea/public/js/base.js
Show inline comments
 
@@ -764,25 +764,25 @@ var _getLineNo = function(tr) {
 
    }
 

	
 
    return line
 
};
 

	
 
var _placeAddButton = function($line_tr){
 
    var $tr = $line_tr;
 
    while ($tr.next().hasClass('inline-comments')){
 
        $tr.find('.add-comment').remove();
 
        $tr = $tr.next();
 
    }
 
    $tr.find('.add-comment').remove();
 
    var label = TRANSLATION_MAP['Add another comment'];
 
    var label = TRANSLATION_MAP['Add Another Comment'];
 
    var $html_el = $('<div class="add-comment"><span class="btn btn-mini">{0}</span></div>'.format(label));
 
    $html_el.click(function(e) {
 
        injectInlineForm($line_tr);
 
    });
 
    $tr.find('.comment').after($html_el);
 
};
 

	
 
/**
 
 * Places the inline comment into the changeset block in proper line position
 
 */
 
var _placeInline = function(target_id, lineno, html){
 
    var $td = $("#{0}_{1}".format(target_id, lineno));
 
@@ -2159,20 +2159,20 @@ var YUI_datatable = function(data, field
 
            filterTimeout = setTimeout(updateFilter, 600);
 
        });
 
}
 

	
 
// global hooks after DOM is loaded
 

	
 
$(document).ready(function(){
 
    $('.diff-collapse-button').click(function(e) {
 
        var $button = $(e.currentTarget);
 
        var $target = $('#' + $button.attr('target'));
 
        if($target.hasClass('hidden')){
 
            $target.removeClass('hidden');
 
            $button.html("&uarr; {0} &uarr;".format(_TM['Collapse diff']));
 
            $button.html("&uarr; {0} &uarr;".format(_TM['Collapse Diff']));
 
        }
 
        else if(!$target.hasClass('hidden')){
 
            $target.addClass('hidden');
 
            $button.html("&darr; {0} &darr;".format(_TM['Expand diff']));
 
            $button.html("&darr; {0} &darr;".format(_TM['Expand Diff']));
 
        }
 
    });
 
});
kallithea/templates/admin/admin.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Admin journal')}
 
    ${_('Admin Journal')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    <form id="filter_form">
 
    <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...')}"/>
 
    <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span>
 
    <input type='submit' value="${_('filter')}" class="btn btn-mini" style="padding:0px 2px 0px 2px;margin:0px"/>
 
    ${_('Admin journal')} - ${ungettext('%s entry', '%s entries', c.users_log.item_count) % (c.users_log.item_count)}
 
    <input type='submit' value="${_('Filter')}" class="btn btn-mini" style="padding:0px 2px 0px 2px;margin:0px"/>
 
    ${_('Admin Journal')} - ${ungettext('%s Entry', '%s Entries', c.users_log.item_count) % (c.users_log.item_count)}
 
    </form>
 
    ${h.end_form()}
 
</%def>
 

	
 
<%def name="page_nav()">
 
    ${self.menu('admin')}
 
</%def>
 
<%def name="main()">
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
kallithea/templates/admin/defaults/defaults.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Repositories defaults')}
 
    ${_('Repository Defaults')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

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

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

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

	
 
    <h3>${_('Repositories defaults')}</h3>
 
    <h3>${_('Repository Defaults')}</h3>
 

	
 
    ${h.form(url('default', id='defaults'),method='put')}
 
    <div class="form">
 
        <!-- fields -->
 

	
 
        <div class="fields">
 

	
 
            <div class="field">
 
                <div class="label">
 
                    <label for="default_repo_type">${_('Type')}:</label>
 
                </div>
 
                <div class="input">
kallithea/templates/admin/gists/index.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    %if c.show_private:
 
        ${_('Private Gists for user %s') % c.authuser.username}
 
        ${_('Private Gists for User %s') % c.authuser.username}
 
    %elif c.show_public:
 
        ${_('Public Gists for user %s') % c.authuser.username}
 
        ${_('Public Gists for User %s') % c.authuser.username}
 
    %else:
 
        ${_('Public Gists')}
 
    %endif
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    %if c.show_private:
 
        ${_('Private Gists for user %s') % c.authuser.username}
 
        ${_('Private Gists for User %s') % c.authuser.username}
 
    %elif c.show_public:
 
        ${_('Public Gists for user %s') % c.authuser.username}
 
        ${_('Public Gists for User %s') % c.authuser.username}
 
    %else:
 
        ${_('Public Gists')}
 
    %endif
 
    - ${c.gists_pager.item_count}
 
</%def>
 

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

	
 
<%def name="main()">
 
<div class="box">
kallithea/templates/admin/my_account/my_account.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('My account')} ${c.authuser.username}
 
    ${_('My Account')} ${c.authuser.username}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

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

	
 
<%def name="page_nav()">
 
    ${self.menu('admin')}
 
</%def>
 
@@ -28,26 +28,26 @@
 
          <li>
 
           <div class="gravatar_box" style="height: 26px">
 
               <div class="gravatar" style="float: left">
 
                   <img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/>
 
               </div>
 
               <div class="truncate" style="margin:10px 0px 10px 0px; color:#5f5f5f; float:left; width: 100px">
 
                <strong>${c.user.username}</strong>
 
               </div>
 
           </div>
 
          </li>
 
          <li class="${'active' if c.active=='profile' else ''}"><a href="${h.url('my_account')}">${_('Profile')}</a></li>
 
          <li class="${'active' if c.active=='password' else ''}"><a href="${h.url('my_account_password')}">${_('Password')}</a></li>
 
          <li class="${'active' if c.active=='api_keys' else ''}"><a href="${h.url('my_account_api_keys')}">${_('API keys')}</a></li>
 
          <li class="${'active' if c.active=='api_keys' else ''}"><a href="${h.url('my_account_api_keys')}">${_('API Keys')}</a></li>
 
          <li class="${'active' if c.active=='emails' else ''}"><a href="${h.url('my_account_emails')}">${_('My Emails')}</a></li>
 
          <li class="${'active' if c.active=='repos' else ''}"><a href="${h.url('my_account_repos')}">${_('My Repositories')}</a></li>
 
          <li class="${'active' if c.active=='watched' else ''}"><a href="${h.url('my_account_watched')}">${_('Watched')}</a></li>
 
          <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('my_account_perms')}">${_('My permissions')}</a></li>
 
          <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('my_account_perms')}">${_('My Permissions')}</a></li>
 
        </ul>
 
    </div>
 

	
 
    <div style="min-width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/my_account/my_account_${c.active}.html"/>
 
    </div>
 
</div>
 

	
 
</%def>
kallithea/templates/admin/my_account/my_account_emails.html
Show inline comments
 
@@ -14,25 +14,25 @@
 
            <td><div class="email">${em.email}</div></td>
 
            <td>
 
                ${h.form(url('my_account_emails'),method='delete')}
 
                    ${h.hidden('del_email_id',em.email_id)}
 
                    <i class="icon-remove-sign" style="color:#FF4444"></i>
 
                    ${h.submit('remove_',_('delete'),id="remove_email_%s" % em.email_id,
 
                    class_="action_button", onclick="return  confirm('"+_('Confirm to delete this email: %s') % em.email+"');")}
 
                ${h.end_form()}
 
            </td>
 
          </tr>
 
        %endfor
 
    %else:
 
    <tr><td><div class="ip">${_('No additional emails specified')}</div></td></tr>
 
    <tr><td><div class="ip">${_('No additional emails specified.')}</div></td></tr>
 
    %endif
 
  </table>
 
</div>
 

	
 
<div>
 
    ${h.form(url('my_account_emails'), method='post')}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
 
             <div class="field">
 
                <div class="label">
 
                    <label for="new_email">${_('New email address')}:</label>
kallithea/templates/admin/my_account/my_account_password.html
Show inline comments
 
<div style="font-size: 20px; color: #666666; padding: 0px 0px 10px 0px">${_('Change your account password')}</div>
 
<div style="font-size: 20px; color: #666666; padding: 0px 0px 10px 0px">${_('Change Your Account Password')}</div>
 
${h.form(url('my_account_password'), method='post')}
 
<div class="form">
 
    <div class="fields">
 
     <div class="field">
 
        <div class="label">
 
            <label for="current_password">${_('Current password')}:</label>
 
        </div>
 
        <div class="input">
 
            ${h.password('current_password',class_='medium',autocomplete="off")}
 
        </div>
 
     </div>
 

	
kallithea/templates/admin/my_account/my_account_repos.html
Show inline comments
 
<div style="font-size: 20px; color: #666666; padding: 0px 0px 10px 0px">${_('Repositories you are owner of')}</div>
 
<div style="font-size: 20px; color: #666666; padding: 0px 0px 10px 0px">${_('Repositories You Own')}</div>
 
<input class="q_filter_box" id="q_filter" size="15" type="text" name="filter"
 
       placeholder="${_('quick filter...')}" value=""/>
 

	
 
<div class="table-grid table yui-skin-sam" id="repos_list_wrap"></div>
 
<div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
 

	
 
<script>
 
function table_renderer(data){
 
    var myDataSource = new YAHOO.util.DataSource(data);
 
    myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
 

	
 
    myDataSource.responseSchema = {
kallithea/templates/admin/my_account/my_account_watched.html
Show inline comments
 
<div style="font-size: 20px; color: #666666; padding: 0px 0px 10px 0px">${_('Repositories you are watching')}</div>
 
<div style="font-size: 20px; color: #666666; padding: 0px 0px 10px 0px">${_('Repositories You are Watching')}</div>
 
<input class="q_filter_box" id="q_filter" size="15" type="text" name="filter"
 
       placeholder="${_('quick filter...')}" value=""/>
 

	
 
<div class="table-grid table yui-skin-sam" id="repos_list_wrap"></div>
 
<div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
 

	
 
<script>
 
function table_renderer(data){
 
    var myDataSource = new YAHOO.util.DataSource(data);
 
    myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
 

	
 
    myDataSource.responseSchema = {
kallithea/templates/admin/notifications/notifications.html
Show inline comments
 
@@ -21,25 +21,25 @@
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
      <div style="padding:14px 18px;text-align: right;float:left">
 
      <span id='all' class="btn btn-mini"><a href="${h.url.current()}">${_('All')}</a></span>
 
      <span id='comment' class="btn btn-mini"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span>
 
      <span id='pull_request' class="btn btn-mini"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull Requests')}</a></span>
 
      </div>
 
      %if c.notifications:
 
      <div style="padding:14px 18px;text-align: right;float:right">
 
      <span id='mark_all_read' class="btn btn-mini">${_('Mark all read')}</span>
 
      <span id='mark_all_read' class="btn btn-mini">${_('Mark All Read')}</span>
 
      </div>
 
      %endif
 
  <div id='notification_data'>
 
    <%include file='notifications_data.html'/>
 
  </div>
 
</div>
 
<script type="text/javascript">
 
var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}";
 
var run = function(){
 
  $('.delete-notification').click(function(e){
 
    var notification_id = e.currentTarget.id;
 
    deleteNotification(url_action,notification_id);
kallithea/templates/admin/notifications/show_notification.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Show notification')} ${c.authuser.username}
 
    ${_('Show Notification')} ${c.authuser.username}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Notifications'),h.url('notifications'))}
 
    &raquo;
 
    ${_('Show notification')}
 
    ${_('Show Notification')}
 
</%def>
 

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

	
 
<%def name="main()">
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
kallithea/templates/admin/permissions/permissions.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Permissions administration')}
 
    ${_('Permissions Administration')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

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

	
 
<%def name="page_nav()">
 
@@ -30,23 +30,23 @@
 
        <ul class="nav nav-pills nav-stacked">
 
          <li>
 
           <div class="gravatar_box" style="height: 26px">
 
               <div class="gravatar" style="float: left">
 
                <i class="icon-ban-circle" style="font-size: 26px"></i>
 
               </div>
 
               <div class="truncate" style="margin:10px 0px 10px 0px; color:#5f5f5f; float:left; width: 100px">
 
                <strong>${_('Permissions')}</strong>
 
               </div>
 
           </div>
 
          </li>
 
          <li class="${'active' if c.active=='globals' else ''}"><a href="${h.url('admin_permissions')}">${_('Global')}</a></li>
 
          <li class="${'active' if c.active=='ips' else ''}"><a href="${h.url('admin_permissions_ips')}">${_('IP whitelist')}</a></li>
 
          <li class="${'active' if c.active=='ips' else ''}"><a href="${h.url('admin_permissions_ips')}">${_('IP Whitelist')}</a></li>
 
          <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('admin_permissions_perms')}">${_('Overview')}</a></li>
 
        </ul>
 
    </div>
 

	
 
    <div style="width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/permissions/permissions_${c.active}.html"/>
 
    </div>
 
</div>
 

	
 
</%def>
kallithea/templates/admin/permissions/permissions_globals.html
Show inline comments
 
${h.form(url('admin_permissions'), method='post')}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="anonymous">${_('Anonymous access')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    <div class="checkbox">
 
                        ${h.checkbox('anonymous',True)}
 
                    </div>
 
                     <span class="help-block">${h.literal(_('Allow access to Kallithea without need to log in. Anonymous users use %s user permissions' % (h.link_to('*default*',h.url('admin_permissions_perms')))))}</span>
 
                     <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="field">
 
                <div class="label">
 
                    <label for="default_repo_perm">${_('Repository')}:</label>
 
                </div>
 
                <div class="select">
 
                    ${h.select('default_repo_perm','',c.repo_perms_choices)}
 

	
 
                    ${h.checkbox('overwrite_default_repo','true')}
 
                    <label for="overwrite_default_repo">
 
                    <span class="tooltip"
 
@@ -60,25 +60,25 @@ ${h.form(url('admin_permissions'), metho
 
                    <label for="default_repo_create">${_('Repository creation')}:</label>
 
                </div>
 
                <div class="select">
 
                    ${h.select('default_repo_create','',c.repo_create_choices)}
 
                </div>
 
             </div>
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="create_on_write">${_('Repository creation with group write access')}:</label>
 
                </div>
 
                <div class="select">
 
                    ${h.select('create_on_write','',c.repo_create_on_write_choices)}
 
                    <span class="help-block">${_('Write permission to repository groups allows creating repositories inside that group')}</span>
 
                    <span class="help-block">${_('Write permission to a repository group allows creating repositories inside that group.')}</span>
 
                </div>
 
            </div>
 
             <div class="field">
 
                <div class="label">
 
                    <label for="default_user_group_create">${_('User group creation')}:</label>
 
                </div>
 
                <div class="select">
 
                    ${h.select('default_user_group_create','',c.user_group_create_choices)}
 
                </div>
 
             </div>
 
             <div class="field">
 
                <div class="label">
kallithea/templates/admin/permissions/permissions_ips.html
Show inline comments
 
<h4>${_('Default ip whitelist for all users')}</h4>
 
<h4>${_('Default IP Whitelist for All Users')}</h4>
 

	
 
<div class="ips_wrap">
 
      <table class="noborder">
 
      %if c.user_ip_map:
 
        %for ip in c.user_ip_map:
 
          <tr>
 
              <td><div class="ip">${ip.ip_addr}</div></td>
 
              <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td>
 
              <td>
 
                ${h.form(url('edit_user_ips', id=c.user.user_id),method='delete')}
 
                    ${h.hidden('del_ip_id',ip.ip_id)}
 
                    ${h.hidden('default_user', 'True')}
 
                    <i class="icon-remove-sign" style="color:#FF4444"></i> ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id,
 
                    class_="action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")}
 
                ${h.end_form()}
 
              </td>
 
          </tr>
 
        %endfor
 
       %else:
 
        <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr>
 
        <tr><td><div class="ip">${_('All IP addresses are allowed.')}</div></td></tr>
 
       %endif
 
      </table>
 
</div>
 

	
 
${h.form(url('edit_user_ips', id=c.user.user_id),method='put')}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
 
             <div class="field">
 
                <div class="label">
 
                    <label for="new_ip">${_('New ip address')}:</label>
 
                </div>
kallithea/templates/admin/permissions/permissions_perms.html
Show inline comments
 
<h4>${_('Default user permissions overview')}</h4>
 
<h4>${_('Default User Permissions Overview')}</h4>
 

	
 
## permissions overview
 
<%namespace name="p" file="/base/perms_summary.html"/>
 
${p.perms_summary(c.perm_user.permissions, show_all=True)}
kallithea/templates/admin/repo_groups/repo_group_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Add repository group')}
 
    ${_('Add Repository Group')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

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

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

	
 
<%def name="main()">
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
kallithea/templates/admin/repo_groups/repo_group_edit.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('%s Repository group settings') % c.repo_group.name}
 
    ${_('%s Repository Group Settings') % c.repo_group.name}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('Repository Groups'),h.url('repos_groups'))}
 
    %if c.repo_group.parent_group:
 
        &raquo; ${h.link_to(c.repo_group.parent_group.name,h.url('repos_group_home',group_name=c.repo_group.parent_group.group_name))}
 
    %endif
kallithea/templates/admin/repo_groups/repo_groups.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Repository groups administration')}
 
    ${_('Repository Groups Administration')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
 
    ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="repo_group_count">0</span> ${_('repository groups')}
 
    ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="repo_group_count">0</span> ${_('Repository Groups')}
 
</%def>
 

	
 

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

	
 
<%def name="main()">
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
@@ -39,21 +39,21 @@
 
  var data = ${c.data|n};
 
  var fields = [
 
    {key: "group_name"},
 
    {key: "raw_name"},
 
    {key: "desc"},
 
    {key: "repos"},
 
    {key: "owner"},
 
    {key: "action"}
 
  ];
 
  var column_defs = [
 
    {key:"group_name",label:"${_('Name')}",sortable:true, sortOptions: { sortFunction: nameSort }},
 
    {key:"desc",label:"${_('Description')}",sortable:true},
 
    {key:"repos",label:"${_('Number of toplevel repositories')}",sortable:true},
 
    {key:"repos",label:"${_('Number of Top-level Repositories')}",sortable:true},
 
    {key:"owner",label:"${_('Owner')}",sortable:true},
 
    {key:"action",label:"${_('Action')}",sortable:false}
 
  ];
 
  var counter = YUD.get('repo_group_count');
 
  var sort_key = "group_name";
 
  YUI_datatable(data, fields, column_defs, counter, sort_key, ${c.visual.admin_grid_items});
 
</script>
 
</%def>
kallithea/templates/admin/repos/repo_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Add repository')}
 
    ${_('Add Repository')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    %if c.authuser.is_admin:
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('Repositories'),h.url('repos'))}
 
    %else:
 
    ${_('Admin')}
kallithea/templates/admin/repos/repo_add_base.html
Show inline comments
 
@@ -33,25 +33,25 @@ ${h.form(url('repos'))}
 
            </div>
 
            <div class="textarea-repo editor">
 
                ${h.textarea('repo_description')}
 
                <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
 
            </div>
 
        </div>
 
        <div class="field">
 
             <div class="label">
 
                 <label for="repo_group">${_('Repository group')}:</label>
 
             </div>
 
             <div class="input">
 
                 ${h.select('repo_group',request.GET.get('parent_group'),c.repo_groups,class_="medium")}
 
                 <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span>
 
                 <span class="help-block">${_('Optionally select a group to put this repository into.')}</span>
 
             </div>
 
        </div>
 
        <div id="copy_perms" class="field">
 
            <div class="label label-checkbox">
 
                <label for="repo_copy_permissions">${_('Copy parent group permissions')}:</label>
 
            </div>
 
            <div class="checkboxes">
 
                ${h.checkbox('repo_copy_permissions',value="True")}
 
                <span class="help-block">${_('Copy permission set from parent repository group.')}</span>
 
            </div>
 
        </div>
 
        <div class="field">
kallithea/templates/admin/repos/repo_creating.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
## don't trigger flash messages on this page
 
<%def name="flash_msg()">
 
</%def>
 

	
 
<%def name="title()">
 
    ${_('%s Creating repository') % c.repo_name}
 
    ${_('%s Creating Repository') % c.repo_name}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Creating repository')} ${c.repo}
 
</%def>
 

	
 
<%def name="page_nav()">
 
    ${self.menu('repositories')}
 
</%def>
kallithea/templates/admin/repos/repo_edit.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
##
 
## See also repo_settings.html
 
##
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('%s repository settings') % c.repo_info.repo_name}
 
    ${_('%s Repository Settings') % c.repo_info.repo_name}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

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

	
 
<%def name="page_nav()">
 
    ${self.menu('repositories')}
 
</%def>
 
@@ -40,25 +40,25 @@ ${self.repo_context_bar('options')}
 
           <!--</div>-->
 
          <!--</li>-->
 
          <li class="${'active' if c.active=='settings' else ''}">
 
              <a href="${h.url('edit_repo', repo_name=c.repo_name)}">${_('Settings')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='permissions' else ''}">
 
              <a href="${h.url('edit_repo_perms', repo_name=c.repo_name)}">${_('Permissions')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='advanced' else ''}">
 
              <a href="${h.url('edit_repo_advanced', repo_name=c.repo_name)}">${_('Advanced')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='fields' else ''}">
 
              <a href="${h.url('edit_repo_fields', repo_name=c.repo_name)}">${_('Extra fields')}</a>
 
              <a href="${h.url('edit_repo_fields', repo_name=c.repo_name)}">${_('Extra Fields')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='caches' else ''}">
 
              <a href="${h.url('edit_repo_caches', repo_name=c.repo_name)}">${_('Caches')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='remote' else ''}">
 
              <a href="${h.url('edit_repo_remote', repo_name=c.repo_name)}">${_('Remote')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='statistics' else ''}">
 
              <a href="${h.url('edit_repo_statistics', repo_name=c.repo_name)}">${_('Statistics')}</a>
 
          </li>
 
        </ul>
 
    </div>
kallithea/templates/admin/repos/repo_edit_advanced.html
Show inline comments
 
<h3>${_('Fork of')}</h3>
 
<h3>${_('Parent')}</h3>
 
${h.form(url('edit_repo_advanced_fork', repo_name=c.repo_info.repo_name), method='put')}
 
<div class="form">
 
   <div class="fields">
 
       ${h.select('id_fork_of','',c.repos_list,class_="medium")}
 
       ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('Set'),class_="btn btn-small")}
 
   </div>
 
       <div class="field" style="border:none;color:#888">
 
       <ul>
 
            <li>${_('''Manually set this repository as a fork of another from the list''')}</li>
 
            <li>${_('''Manually set this repository as a fork of another from the list.''')}</li>
 
       </ul>
 
       </div>
 
</div>
 
${h.end_form()}
 

	
 
<script>
 
    $(document).ready(function(){
 
        $("#id_fork_of").select2({
 
            'dropdownAutoWidth': true
 
        });
 
    })
 
</script>
 

	
 
<h3>${_('Public journal visibility')}</h3>
 
<h3>${_('Public Journal Visibility')}</h3>
 
${h.form(url('edit_repo_advanced_journal', repo_name=c.repo_info.repo_name), method='put')}
 
<div class="form">
 
  ${h.hidden('auth_token',str(h.get_token()))}
 
  <div class="field">
 
  %if c.in_public_journal:
 
    <button class="btn btn-small" type="submit">
 
        <i class="icon-minus"></i>
 
        ${_('Remove from public journal')}
 
    </button>
 
  %else:
 
    <button class="btn btn-small" type="submit">
 
        <i class="icon-plus"></i>
 
        ${_('Add to public journal')}
 
        ${_('Add to Public Journal')}
 
    </button>
 
  %endif
 
  </div>
 
 <div class="field" style="border:none;color:#888">
 
 <ul>
 
      <li>${_('All actions made on this repository will be accessible to everyone in public journal')}</li>
 
      <li>${_('All actions done in this repository will be visible to everyone in the public journal.')}</li>
 
 </ul>
 
 </div>
 
</div>
 
${h.end_form()}
 

	
 
<h3>${_('Change locking')}</h3>
 
<h3>${_('Change Locking')}</h3>
 
${h.form(url('edit_repo_advanced_locking', repo_name=c.repo_info.repo_name), method='put')}
 
<div class="form">
 
   <div class="fields">
 
      %if c.repo_info.locked[0]:
 
        ${h.hidden('set_unlock', '1')}
 
        <button class="btn btn-small" type="submit"
 
                onclick="return confirm('${_('Confirm to unlock repository')}');">
 
                onclick="return confirm('${_('Confirm to unlock repository.')}');">
 
            <i class="icon-unlock"></i>
 
            ${_('Unlock repository')}
 
            ${_('Unlock Repository')}
 
        </button>
 
       ${'Locked by %s on %s' % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))}
 
      %else:
 
        ${h.hidden('set_lock', '1')}
 
        <button class="btn btn-small" type="submit"
 
                onclick="return confirm('${_('Confirm to lock repository')}');">
 
                onclick="return confirm('${_('Confirm to lock repository.')}');">
 
            <i class="icon-lock"></i>
 
            ${_('Lock repository')}
 
            ${_('Lock Repository')}
 
        </button>
 
        ${_('Repository is not locked')}
 
      %endif
 
   </div>
 
   <div class="field" style="border:none;color:#888">
 
   <ul>
 
        <li>${_('Force locking on repository. Works only when anonymous access is disabled. Trigering a pull locks repository by user who pulled, only the same user can unlock by doing a push')}
 
        <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('repo', repo_name=c.repo_name),method='delete')}
 
    <button class="btn btn-small btn-danger" type="submit"
 
            onclick="return confirm('${_('Confirm to delete this repository: %s') % c.repo_name}');">
 
        <i class="icon-remove-sign"></i>
 
        ${_('Delete this repository')}
 
        ${_('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()}
 
        ${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>
 
    %endif
 
    <div class="field" style="border:none;color:#888">
 
        <ul>
 
        <li>${_('This repository will be renamed in a special way in order to be unaccesible for Kallithea and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
 
        <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>
 
${h.end_form()}
kallithea/templates/admin/repos/repo_edit_caches.html
Show inline comments
 
${h.form(url('edit_repo_caches', repo_name=c.repo_name), method='put')}
 
<div class="form">
 
   <div class="fields">
 
       ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")}
 
       ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate Repository Cache'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to invalidate repository cache.')+"');")}
 
      <div class="field" style="border:none;color:#888">
 
      <ul>
 
          <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')}
 
          <li>${_('Manually invalidate cache for this repository. On first access, the repository will be cached again.')}
 
          </li>
 
      </ul>
 
      </div>
 
      <div class="field" style="border:none;">
 
        ${_('List of cached values')}
 
        ${_('List of Cached Values')}
 
           <table>
 
           <tr>
 
            <th>${_('Prefix')}</th>
 
            <th>${_('Key')}</th>
 
            <th>${_('Active')}</th>
 
            </tr>
 
          %for cache in c.repo_info.cache_keys:
 
              <tr>
 
                <td>${cache.get_prefix() or '-'}</td>
 
                <td>${cache.cache_key}</td>
 
                <td>${h.boolicon(cache.cache_active)}</td>
 
              </tr>
kallithea/templates/admin/repos/repo_edit_fields.html
Show inline comments
 
@@ -54,15 +54,15 @@
 
                </div>
 
             </div>
 

	
 
            <div class="buttons">
 
              ${h.submit('save',_('Add'),class_="btn")}
 
              ${h.reset('reset',_('Reset'),class_="btn")}
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
%else:
 
  <div style="font-size: 20px">
 
    ${_('Extra fields are disabled')}
 
    ${_('Extra fields are disabled.')}
 
  </div>
 
%endif
kallithea/templates/admin/repos/repo_edit_fork.html
Show inline comments
 
${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')}
 
<div class="form">
 
   <div class="fields">
 
       ${h.select('id_fork_of','',c.repos_list,class_="medium")}
 
       ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('Set'),class_="btn btn-small")}
 
   </div>
 
       <div class="field" style="border:none;color:#888">
 
       <ul>
 
            <li>${_('''Manually set this repository as a fork of another from the list''')}</li>
 
            <li>${_('''Manually set this repository as a fork of another from the list.''')}</li>
 
       </ul>
 
       </div>
 
</div>
 
${h.end_form()}
 

	
 
<script>
 
    $(document).ready(function(){
 
        $("#id_fork_of").select2({
 
            'dropdownAutoWidth': true
 
        });
 
    })
 
</script>
kallithea/templates/admin/repos/repo_edit_remote.html
Show inline comments
 
%if c.repo_info.clone_uri:
 
<div style="font-size: 20px; padding: 0px 0px 10px 0px">
 
   ${_('Remote url')}: <a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri_hidden}</a></li>
 
</div>
 
${h.form(url('edit_repo_remote', repo_name=c.repo_name), method='put')}
 
<div class="form">
 
   <div class="fields">
 
       ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull changes from remote location'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")}
 
       ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull Changes from Remote Location'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to pull changes from remote side.')+"');")}
 
   </div>
 
</div>
 
${h.end_form()}
 
%else:
 
  <div style="font-size: 20px">
 
    ${_('This repository does not have any remote url set')}
 
    ${_('This repository does not have a remote url set.')}
 
  </div>
 
%endif
kallithea/templates/admin/repos/repo_edit_settings.html
Show inline comments
 
${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
 
            <div class="field">
 
                <div class="label">
 
                    <label for="repo_name">${_('Name')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('repo_name',class_="medium")}
 
                    <span class="help-block">${_('Non-changeable id')}: `_${c.repo_info.repo_id}` <span><a id="show_more_clone_id" href="#">${_('what is that ?')}</a></span></span>
 
                    <span class="help-block">${_('Non-changeable 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 above url guarantees that this repository will allways be accessible under such url.
 
                               Using the above url guarantees that this repository will allways be accessible under such url.
 
                               Usefull for CI systems, or any other cases that you need to hardcode the url into 3rd party service.''')}</span>
 
                </div>
 
           </div>
 
           <div class="field">
 
               <div class="label">
 
                   <label for="clone_uri">${_('Clone uri')}:</label>
 
               </div>
 
               <div class="input">
 
                   %if c.repo_info.clone_uri:
 
                    <div id="clone_uri_hidden" style="font-size: 14px">
 
                        <span id="clone_uri_hidden_value">${c.repo_info.clone_uri_hidden}</span>
 
                        <span style="cursor: pointer; padding: 0px 0px 5px 0px" id="edit_clone_uri"><i class="icon-edit"></i>${_('edit')}</span>
 
@@ -34,25 +34,25 @@ ${h.form(url('repo', repo_name=c.repo_in
 
                    ${h.text('clone_uri',class_="medium")}
 
                    ${h.hidden('clone_uri_change', 'NEW')}
 
                   %endif
 
                 <span id="alter_clone_uri_help_block" class="help-block">${_('http[s] url used for doing remote pulls.')}</span>
 
               </div>
 
            </div>
 
            <div class="field">
 
                <div class="label">
 
                    <label for="repo_group">${_('Repository group')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.select('repo_group','',c.repo_groups,class_="medium")}
 
                    <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
 
                    <span class="help-block">${_('Optionally select a group to put this repository into.')}</span>
 
                </div>
 
            </div>
 
            <div class="field">
 
                <div class="label">
 
                    <label for="repo_landing_rev">${_('Landing revision')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
 
                    <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
 
                </div>
 
            </div>
 
            <div class="field">
kallithea/templates/admin/repos/repo_edit_statistics.html
Show inline comments
 
${h.form(url('edit_repo_statistics', repo_name=c.repo_info.repo_name), method='put')}
 
<div class="form">
 
    <div class="fields">
 
       <div class="field" style="border:none;color:#888">
 
        <ul>
 
            <li>${_('Processed commits')}: ${c.stats_revision}/${c.repo_last_rev}</li>
 
            <li>${_('Processed progress')}: ${c.stats_percentage}%</li>
 
        </ul>
 
       </div>
 
        ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset statistics'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")}
 
        ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset Statistics'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to remove current statistics.')+"');")}
 
   </div>
 
</div>
 
${h.end_form()}
kallithea/templates/admin/repos/repos.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Repositories administration')}
 
    ${_('Repositories Administration')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="repo_count">0</span> ${_('repositories')}
 
    <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="repo_count">0</span> ${_('Repositories')}
 
</%def>
 
<%def name="page_nav()">
 
    ${self.menu('admin')}
 
</%def>
 
<%def name="main()">
 
<div class="box">
 

	
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
         %if h.HasPermissionAny('hg.admin','hg.create.repository')():
 
          <li>
kallithea/templates/admin/settings/settings.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Settings administration')}
 
    ${_('Settings Administration')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

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

	
 
<%def name="page_nav()">
 
@@ -29,28 +29,28 @@
 
        <ul class="nav nav-pills nav-stacked">
 
          <li>
 
           <div class="gravatar_box" style="height: 26px">
 
               <div class="gravatar" style="float: left">
 
                <i class="icon-cog" style="font-size: 26px"></i>
 
               </div>
 
               <div style="margin:10px 0px 10px 0px; color:#5f5f5f; float:left">
 
                <strong>${_('Settings')}</strong>
 
               </div>
 
           </div>
 
          </li>
 
          <li class="${'active' if c.active=='vcs' else ''}"><a href="${h.url('admin_settings')}">${_('VCS')}</a></li>
 
          <li class="${'active' if c.active=='mapping' else ''}"><a href="${h.url('admin_settings_mapping')}">${_('Remap and rescan')}</a></li>
 
          <li class="${'active' if c.active=='mapping' else ''}"><a href="${h.url('admin_settings_mapping')}">${_('Remap and Rescan')}</a></li>
 
          <li class="${'active' if c.active=='global' else ''}"><a href="${h.url('admin_settings_global')}">${_('Global')}</a></li>
 
          <li class="${'active' if c.active=='visual' else ''}"><a href="${h.url('admin_settings_visual')}">${_('Visual')}</a></li>
 
          <li class="${'active' if c.active=='email' else ''}"><a href="${h.url('admin_settings_email')}">${_('Email')}</a></li>
 
          <li class="${'active' if c.active=='hooks' else ''}"><a href="${h.url('admin_settings_hooks')}">${_('Hooks')}</a></li>
 
          <li class="${'active' if c.active=='search' else ''}"><a href="${h.url('admin_settings_search')}">${_('Full text search')}</a></li>
 
          <li class="${'active' if c.active=='search' else ''}"><a href="${h.url('admin_settings_search')}">${_('Full Text Search')}</a></li>
 
          <li class="${'active' if c.active=='system' else ''}"><a href="${h.url('admin_settings_system')}">${_('System Info')}</a></li>
 
        </ul>
 
    </div>
 

	
 
    <div style="width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/settings/settings_${c.active}.html"/>
 
    </div>
 
</div>
 

	
 
</%def>
kallithea/templates/admin/settings/settings_global.html
Show inline comments
 
@@ -39,23 +39,23 @@ ${h.form(url('admin_settings_global'), m
 
                <div class="input">
 
                    ${h.text('captcha_public_key',size=60)}
 
                    <span class="help-block">${_('Public key for reCaptcha system.')}</span>
 
                </div>
 
            </div>
 

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

	
 
            <div class="buttons">
 
                ${h.submit('save',_('Save settings'),class_="btn")}
 
                ${h.submit('save',_('Save Settings'),class_="btn")}
 
                ${h.reset('reset',_('Reset'),class_="btn")}
 
           </div>
 
        </div>
 
    </div>
 
${h.end_form()}
kallithea/templates/admin/settings/settings_hooks.html
Show inline comments
 
<h4>${_('Built in Mercurial hooks - read only')}</h4>
 
<h4>${_('Built-in Mercurial Hooks (Read-Only)')}</h4>
 
<div class="form">
 
    <div class="fields">
 
      % for hook in c.hooks:
 
        <div class="field">
 
            <div class="label label">
 
                <label for="${hook.ui_key}">${hook.ui_key}</label>
 
            </div>
 
            <div class="input" style="margin-left:280px">
 
              ${h.text(hook.ui_key,hook.ui_value,size=60,readonly="readonly")}
 
            </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>
 
<h4>${_('Custom Hooks')}</h4>
 
${h.form(url('admin_settings_hooks'), method='post')}
 
<div class="form">
 
    <div class="fields">
 

	
 
      % for hook in c.custom_hooks:
 
      <div class="field"  id="${'id%s' % hook.ui_id }">
 
        <div class="label label">
 
            <label for="${hook.ui_key}">${hook.ui_key}</label>
 
        </div>
 
        <div class="input" style="margin-left:280px">
 
            ${h.hidden('hook_ui_key',hook.ui_key)}
 
            ${h.hidden('hook_ui_value',hook.ui_value)}
kallithea/templates/admin/settings/settings_mapping.html
Show inline comments
 
${h.form(url('admin_settings_mapping'), method='post')}
 
    <div class="form">
 
        <div class="fields">
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="destroy">${_('Rescan option')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    <div class="checkbox">
 
                        ${h.checkbox('destroy',True)}
 
                        <label for="destroy">${_('Destroy old data')}</label>
 
                    </div>
 
                    <span class="help-block">${_('In case a repository was deleted from filesystem and it still exists in the database check this option to scan obsolete data in database and remove it.')}</span>
 
                    <span class="help-block">${_('Check this option to remove references to repositories that no longer exist in on the filesystem.')}</span>
 

	
 
                    <div class="checkbox">
 
                        ${h.checkbox('invalidate',True)}
 
                        <label for="invalidate"> ${_('Invalidate cache for all repositories')}</label>
 
                    </div>
 
                    <span class="help-block">${_('Each cache data for repositories will be cleaned with this option selected. Use this to reload data and clear cache keys.')}</span>
 
                    <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 for="hooks"> ${_('Install Git hooks')} </label>
 
                    </div>
 
                    <span class="help-block">${_('Verify if Kallitheas GIT hooks are installed for each repository. Current hooks will be updated to latest version')}</span>
 
                    <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>
 

	
 
                </div>
 
            </div>
 

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

	
 
        <div class="fields">
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label>${_('Index build option')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    <div class="checkbox">
 
                        ${h.checkbox('full_index',True)}
 
                        <label for="full_index">${_('Build from scratch')}</label>
 

	
 
                    </div>
 
                    <span class="help-block">${_('This option completely reindex all the files within Kallithea for proper fulltext search capabilities.')}</span>
 
                    <span class="help-block">${_('This option completely reindexes all of the repositories for proper fulltext search capabilities.')}</span>
 

	
 
                </div>
 
            </div>
 

	
 
            <div class="buttons">
 
            ${h.submit('reindex',_('Reindex'),class_="btn")}
 
            </div>
 
        </div>
 
    </div>
 
${h.end_form()}
kallithea/templates/admin/settings/settings_system.html
Show inline comments
 
<dl class="dl-horizontal">
 
<%
 
 elems = [
 
    (_('Kallithea version'), h.literal('%s <b><span style="color:#036185; text-decoration: underline;cursor: pointer" id="check_for_update" >%s</span></b>' % (c.kallithea_version, _('check for updates'))), ''),
 
    (_('Python version'), c.py_version, ''),
 
    (_('Platform'), c.platform, ''),
 
    (_('GIT version'), c.git_version, ''),
 
    (_('GIT path'), c.ini.get('git_path'), ''),
 
    (_('Git version'), c.git_version, ''),
 
    (_('Git path'), c.ini.get('git_path'), ''),
 
    (_('Upgrade info endpoint'), h.literal('%s <br/><span style="color:#999999">%s.</span>' % (c.update_url, _('Note: please make sure this server can access this url'))), '')
 
 ]
 
%>
 

	
 
<div id="update_notice" style="display: none">
 
    <div style="padding: 5px 0px 5px 0px; color: #000000; font-weight: bold">${_('Checking for updates...')}</div>
 
</div>
 
%for dt, dd, tt in elems:
 
  <dt style="width:150px; text-align: left">${dt}:</dt>
 
  <dd style="margin-left: 160px" title="${tt}">${dd}</dd>
 
%endfor
 
</dl>
 

	
 
<h4>${_('Python packages')}</h4>
 
<h4>${_('Python Packages')}</h4>
 
<table class="table" style="margin:0px 0px 0px 0px">
 
  <colgroup>
 
      <col style="width:180px">
 
  </colgroup>
 
  <tbody>
 
      %for key, value in c.modules:
 
          <tr>
 
              <td style="padding-right:5px;">${key}</td>
 
              <td>${value}</td>
 
          </tr>
 
      %endfor
 
  </tbody>
kallithea/templates/admin/settings/settings_vcs.html
Show inline comments
 
${h.form(url('admin_settings'), method='post')}
 
    <div class="form">
 
        <div class="fields">
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label>${_('Web')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    <div class="checkbox">
 
                        ${h.checkbox('web_push_ssl', 'True')}
 
                        <label for="web_push_ssl">${_('Require SSL for vcs operations')}</label>
 
                    </div>
 
                    <span class="help-block">${_('Activate to set Kallithea to require SSL for pushing or pulling. If SSL certificate is missing it will return a HTTP Error 406: Not Acceptable.')}</span>
 
                    <span class="help-block">${_('Activate to require SSL both pushing and pulling. If SSL certificate is missing, it will return a HTTP Error 406: Not Acceptable.')}</span>
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label>${_('Hooks')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    <div class="checkbox">
 
                        ${h.checkbox('hooks_changegroup_repo_size','True')}
 
                        <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label>
 
                    </div>
 
@@ -30,63 +30,63 @@ ${h.form(url('admin_settings'), method='
 
                    <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="field">
 
                <div class="label label-checkbox">
 
                    <label>${_('Mercurial Extensions')}:</label>
 
                    <label>${_('Mercurial extensions')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    <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. Allows cloning remote SVN repositories and migrates them to Mercurial type.')}</span>
 
                    <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. Allows cloning remote git repositories and migrates them to Mercurial type.')}</span>
 
                    ##<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="field">
 
                <div class="label">
 
                    <label for="paths_root_path">${_('Repositories location')}:</label>
 
                    <label for="paths_root_path">${_('Location of repositories')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('paths_root_path',size=60,readonly="readonly", class_="disabled")}
 
                    <span id="path_unlock" class="tooltip" style="cursor: pointer"
 
                            title="${h.tooltip(_('Click to unlock. You must restart Kallithea in order to make this setting take effect.'))}">
 
                        <div class="btn btn-small"><i id="path_unlock_icon" class="icon-lock"></i></div>
 
                    </span>
 
                    <span class="help-block">${_('Filesystem location where repositories should be stored. After changing this value a restart and rescan of the repository folder are required.')}</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", class_="disabled")}
 
            %endif
 
            <div class="buttons">
 
                ${h.submit('save',_('Save settings'),class_="btn")}
 
                ${h.submit('save',_('Save Settings'),class_="btn")}
 
                ${h.reset('reset',_('Reset'),class_="btn")}
 
           </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-unlock');
 
                $('#paths_root_path').removeAttr('readonly');
kallithea/templates/admin/settings/settings_visual.html
Show inline comments
 
@@ -18,37 +18,38 @@ ${h.form(url('admin_settings_visual'), m
 
                        <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 class="field">
 
                    <div class="input">
 
                        ${h.text('gravatar_url', size=80)}
 
                        <span class="help-block">${_('''Gravatar url allows you to use other avatar server application.
 
                                                        Following variables of the URL will be replaced accordingly.
 
                        <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="field">
 
                    <div class="input">
 
                        ${h.text('clone_uri_tmpl', size=80)}
 
                        <span class="help-block">${_('''Schema of clone url construction eg. '{scheme}://{user}@{netloc}/{repo}', available vars:
 
                        <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 contruct clone-by-id''')}</span>
 
                    </div>
 
                </div>
 
             </div>
 

	
 
            <div class="field">
 
                <div class="label">
 
                    <label for="dashboard_items">${_('Dashboard items')}:</label>
 
@@ -73,49 +74,49 @@ ${h.form(url('admin_settings_visual'), m
 
                <div class="label label-checkbox">
 
                    <label>${_('Icons')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    <div class="checkbox">
 
                        ${h.checkbox('show_public_icon','True')}
 
                        <label for="show_public_icon">${_('Show public repo icon on repositories')}</label>
 
                    </div>
 
                    <div class="checkbox">
 
                        ${h.checkbox('show_private_icon','True')}
 
                        <label for="show_private_icon">${_('Show private repo icon on repositories')}</label>
 
                    </div>
 
                    <span class="help-block">${_('Show public/private icons next to repositories names.')}</span>
 
                    <span class="help-block">${_('Show public/private icons next to repository names.')}</span>
 
                 </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label>${_('Meta-Tagging')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    <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 repository description field and turns them into colored tags.')}</span>
 
                    <span class="help-block">${_('Parses meta tags from the repository description field and turns them into colored tags.')}</span>
 
                 </div>
 
             </div>
 

	
 
             <div class="buttons">
 
                 ${h.submit('save',_('Save settings'),class_="btn")}
 
                 ${h.submit('save',_('Save Settings'),class_="btn")}
 
                 ${h.reset('reset',_('Reset'),class_="btn")}
 
             </div>
 

	
 
        </div>
 
    </div>
 
${h.end_form()}
kallithea/templates/admin/user_groups/user_group_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

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

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

	
 
<%def name="main()">
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
kallithea/templates/admin/user_groups/user_groups.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('User groups administration')}
 
    ${_('User Groups Administration')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
 
    ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="user_group_count">0</span> ${_('user groups')}
 
</%def>
 

	
 
<%def name="page_nav()">
 
    ${self.menu('admin')}
kallithea/templates/admin/users/user_edit.html
Show inline comments
 
@@ -31,26 +31,26 @@
 
        <ul class="nav nav-pills nav-stacked">
 
          <li>
 
           <div class="gravatar_box" style="height: 26px">
 
               <div class="gravatar" style="float: left">
 
                   <img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/>
 
               </div>
 
               <div class="truncate" style="margin:10px 0px 10px 0px; color:#5f5f5f; float:left; width: 100px">
 
                <strong>${c.user.username}</strong>
 
               </div>
 
           </div>
 
          </li>
 
          <li class="${'active' if c.active=='profile' else ''}"><a href="${h.url('edit_user', id=c.user.user_id)}">${_('Profile')}</a></li>
 
          <li class="${'active' if c.active=='api_keys' else ''}"><a href="${h.url('edit_user_api_keys', id=c.user.user_id)}">${_('API keys')}</a></li>
 
          <li class="${'active' if c.active=='api_keys' else ''}"><a href="${h.url('edit_user_api_keys', id=c.user.user_id)}">${_('API Keys')}</a></li>
 
          <li class="${'active' if c.active=='advanced' else ''}"><a href="${h.url('edit_user_advanced', id=c.user.user_id)}">${_('Advanced')}</a></li>
 
          <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('edit_user_perms', id=c.user.user_id)}">${_('Default permissions')}</a></li>
 
          <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('edit_user_perms', id=c.user.user_id)}">${_('Default Permissions')}</a></li>
 
          <li class="${'active' if c.active=='emails' else ''}"><a href="${h.url('edit_user_emails', id=c.user.user_id)}">${_('Emails')}</a></li>
 
          <li class="${'active' if c.active=='ips' else ''}"><a href="${h.url('edit_user_ips', id=c.user.user_id)}">${_('Ip whitelist')}</a></li>
 
          <li class="${'active' if c.active=='ips' else ''}"><a href="${h.url('edit_user_ips', id=c.user.user_id)}">${_('IP Whitelist')}</a></li>
 
        </ul>
 
    </div>
 

	
 
    <div style="width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/users/user_edit_${c.active}.html"/>
 
    </div>
 
</div>
 

	
 
</%def>
kallithea/templates/admin/users/user_edit_emails.html
Show inline comments
 
@@ -14,25 +14,25 @@
 
            <td><div class="email">${em.email}</div></td>
 
            <td>
 
                ${h.form(url('edit_user_emails', id=c.user.user_id),method='delete')}
 
                    ${h.hidden('del_email_id',em.email_id)}
 
                    <i class="icon-remove-sign" style="color:#FF4444"></i>
 
                    ${h.submit('remove_',_('delete'),id="remove_email_%s" % em.email_id,
 
                    class_="action_button", onclick="return  confirm('"+_('Confirm to delete this email: %s') % em.email+"');")}
 
                ${h.end_form()}
 
            </td>
 
          </tr>
 
        %endfor
 
    %else:
 
    <tr><td><div class="ip">${_('No additional emails specified')}</div></td></tr>
 
    <tr><td><div class="ip">${_('No additional emails specified.')}</div></td></tr>
 
    %endif
 
  </table>
 
</div>
 

	
 
<div>
 
    ${h.form(url('edit_user_emails', id=c.user.user_id),method='put')}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
 
             <div class="field">
 
                <div class="label">
 
                    <label for="new_email">${_('New email address')}:</label>
kallithea/templates/admin/users/user_edit_ips.html
Show inline comments
 
@@ -18,25 +18,25 @@
 
            <td>
 
                ${h.form(url('edit_user_ips', id=c.user.user_id),method='delete')}
 
                    ${h.hidden('del_ip_id',ip.ip_id)}
 
                    <i class="icon-remove-sign" style="color:#FF4444"></i>
 
                    ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id,
 
                    class_="action_button", onclick="return  confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")}
 
                ${h.end_form()}
 
            </td>
 
          </tr>
 
        %endfor
 
    %endif
 
    %if not c.default_user_ip_map and not c.user_ip_map:
 
        <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr>
 
        <tr><td><div class="ip">${_('All IP addresses are allowed.')}</div></td></tr>
 
    %endif
 
  </table>
 
</div>
 

	
 
<div>
 
    ${h.form(url('edit_user_ips', id=c.user.user_id),method='put')}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
 
             <div class="field">
 
                <div class="label">
 
                    <label for="new_ip">${_('New ip address')}:</label>
kallithea/templates/admin/users/users.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Users administration')}
 
    ${_('Users Administration')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
 
    ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="user_count">0</span> ${_('users')}
 
    ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="user_count">0</span> ${_('Users')}
 
</%def>
 

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

	
 
<%def name="main()">
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
@@ -42,26 +42,26 @@
 
    {key: "firstname"},
 
    {key: "lastname"},
 
    {key: "last_login"},
 
    {key: "last_login_raw"},
 
    {key: "active"},
 
    {key: "admin"},
 
    {key: "extern_type"},
 
    {key: "action"}
 
  ];
 
  var column_defs = [
 
    {key:"gravatar",label:"",sortable:false},
 
    {key:"username",label:"${_('Username')}",sortable:true},
 
    {key:"firstname",label:"${_('Firstname')}",sortable:true},
 
    {key:"lastname",label:"${_('Lastname')}",sortable:true},
 
    {key:"last_login",label:"${_('Last login')}",sortable:true, sortOptions: { sortFunction: lastLoginSort }},
 
    {key:"firstname",label:"${_('First Name')}",sortable:true},
 
    {key:"lastname",label:"${_('Last Name')}",sortable:true},
 
    {key:"last_login",label:"${_('Last Login')}",sortable:true, sortOptions: { sortFunction: lastLoginSort }},
 
    {key:"active",label:"${_('Active')}",sortable:true},
 
    {key:"admin",label:"${_('Admin')}",sortable:true},
 
    {key:"extern_type",label:"${_('Auth type')}",sortable:true},
 
    {key:"extern_type",label:"${_('Auth Type')}",sortable:true},
 
    {key:"action",label:"${_('Action')}",sortable:false}
 
  ];
 
  var counter = YUD.get('user_count');
 
  var sort_key = "username";
 
  YUI_datatable(data, fields, column_defs, counter, sort_key, ${c.visual.admin_grid_items});
 
</script>
 

	
 
</%def>
kallithea/templates/base/base.html
Show inline comments
 
@@ -62,49 +62,49 @@
 
<%def name="flash_msg()">
 
    <%include file="/base/flash_msg.html"/>
 
</%def>
 

	
 
<%def name="breadcrumbs()">
 
    <div class="breadcrumbs">
 
    ${self.breadcrumbs_links()}
 
    </div>
 
</%def>
 

	
 
<%def name="admin_menu()">
 
  <ul class="admin_menu">
 
      <li><a href="${h.url('admin_home')}"><i class="icon-book"></i> ${_('Admin journal')}</a></li>
 
      <li><a href="${h.url('admin_home')}"><i class="icon-book"></i> ${_('Admin Journal')}</a></li>
 
      <li><a href="${h.url('repos')}"><i class="icon-archive"></i> ${_('Repositories')}</a></li>
 
      <li><a href="${h.url('repos_groups')}"><i class="icon-folder-close"></i> ${_('Repository groups')}</a></li>
 
      <li><a href="${h.url('repos_groups')}"><i class="icon-folder-close"></i> ${_('Repository Groups')}</a></li>
 
      <li><a href="${h.url('users')}"><i class="icon-user"></i> ${_('Users')}</a></li>
 
      <li><a href="${h.url('users_groups')}"><i class="icon-group"></i> ${_('User groups')}</a></li>
 
      <li><a href="${h.url('users_groups')}"><i class="icon-group"></i> ${_('User Groups')}</a></li>
 
      <li><a href="${h.url('admin_permissions')}"><i class="icon-ban-circle"></i> ${_('Permissions')}</a></li>
 
      <li><a href="${h.url('auth_home')}"><i class="icon-key"></i> ${_('Authentication')}</a></li>
 
      <li><a href="${h.url('defaults')}"><i class="icon-wrench"></i> ${_('Defaults')}</a></li>
 
      <li class="last"><a href="${h.url('admin_settings')}"><i class="icon-cog"></i> ${_('Settings')}</a></li>
 
  </ul>
 

	
 
</%def>
 

	
 

	
 
## admin menu used for people that have some admin resources
 
<%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)">
 
  <ul>
 
   %if repositories:
 
      <li><a href="${h.url('repos')}"><i class="icon-archive"></i> ${_('Repositories')}</a></li>
 
   %endif
 
   %if repository_groups:
 
      <li><a href="${h.url('repos_groups')}"><i class="icon-folder-close"></i> ${_('Repository groups')}</a></li>
 
      <li><a href="${h.url('repos_groups')}"><i class="icon-folder-close"></i> ${_('Repository Groups')}</a></li>
 
   %endif
 
   %if user_groups:
 
      <li><a href="${h.url('users_groups')}"><i class="icon-group"></i> ${_('User groups')}</a></li>
 
      <li><a href="${h.url('users_groups')}"><i class="icon-group"></i> ${_('User Groups')}</a></li>
 
   %endif
 
  </ul>
 
</%def>
 

	
 
<%def name="repo_context_bar(current=None, rev=None)">
 
  <% rev = None if rev == 'tip' else rev %>
 
  <%
 
      def follow_class():
 
          if c.repository_following:
 
              return h.literal('following')
 
          else:
 
              return h.literal('follow')
 
@@ -125,25 +125,25 @@
 
          <i class="icon-git" style="color: #e85634; font-size: 24px"></i>
 
        %endif
 

	
 
        ## public/private
 
        %if c.db_repo.private:
 
          <i class="icon-lock"></i>
 
        %else:
 
          <i class="icon-unlock-alt"></i>
 
        %endif
 
        ${h.repo_link(c.db_repo.groups_and_repo)}
 

	
 
        %if current == 'createfork':
 
         - ${_('Create fork')}
 
         - ${_('Create Fork')}
 
        %endif
 
      </h2>
 
      <!--
 
      <div id="breadcrumbs">
 
        ${h.link_to(_(u'Repositories'),h.url('home'))}
 
        &raquo;
 
        ${h.repo_link(c.db_repo.groups_and_repo)}
 
      </div>
 
      -->
 
      <ul id="context-pages" class="horizontal-list">
 
        <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}"><i class="icon-file-text"></i> ${_('Summary')}</a></li>
 
        %if rev:
 
@@ -161,25 +161,25 @@
 
        <li ${is_current('options')}>
 
             %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
 
               <a href="${h.url('edit_repo',repo_name=c.repo_name)}" class="dropdown"><i class="icon-cogs"></i> ${_('Options')}</a>
 
             %else:
 
               <a href="#" class="dropdown"><i class="icon-cogs"></i> ${_('Options')}</a>
 
             %endif
 
          <ul>
 
             %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
 
                   <li><a href="${h.url('edit_repo',repo_name=c.repo_name)}"><i class="icon-cog"></i> ${_('Settings')}</a></li>
 
             %endif
 
              %if c.db_repo.fork:
 
               <li><a 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)}">
 
                   <i class="icon-loop"></i> ${_('Compare fork')}</a></li>
 
                   <i class="icon-loop"></i> ${_('Compare Fork')}</a></li>
 
              %endif
 
              <li><a href="${h.url('compare_home',repo_name=c.repo_name)}"><i class="icon-loop"></i> ${_('Compare')}</a></li>
 

	
 
              <li><a href="${h.url('search_repo',repo_name=c.repo_name)}"><i class="icon-search"></i> ${_('Search')}</a></li>
 

	
 
              %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.db_repo.enable_locking:
 
                %if c.db_repo.locked[0]:
 
                  <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
 
                %else:
 
                  <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
 
                %endif
 
              %endif
 
@@ -243,29 +243,29 @@
 
    %else:
 
      <li ${is_current('journal')}>
 
        <a class="menu_link" title="${_('Public journal')}"  href="${h.url('public_journal')}">
 
          <i class="icon-book"></i> ${_('Public journal')}
 
        </a>
 
      </li>
 
    %endif
 
      <li ${is_current('gists')}>
 
        <a class="menu_link childs" title="${_('Show public gists')}"  href="${h.url('gists')}">
 
          <i class="icon-file-2"></i> ${_('Gists')}
 
        </a>
 
          <ul class="admin_menu">
 
            <li><a href="${h.url('new_gist', public=1)}"><i class="icon-file-alt"></i> ${_('Create new gist')}</a></li>
 
            <li><a href="${h.url('gists')}"><i class="icon-copy"></i> ${_('All public gists')}</a></li>
 
            <li><a href="${h.url('new_gist', public=1)}"><i class="icon-file-alt"></i> ${_('Create New Gist')}</a></li>
 
            <li><a href="${h.url('gists')}"><i class="icon-copy"></i> ${_('All Public Gists')}</a></li>
 
            %if c.authuser.username != 'default':
 
              <li><a href="${h.url('gists', public=1)}"><i class="icon-copy"></i> ${_('My public gists')}</a></li>
 
              <li><a href="${h.url('gists', private=1)}"><i class="icon-file-text"></i> ${_('My private gists')}</a></li>
 
              <li><a href="${h.url('gists', public=1)}"><i class="icon-copy"></i> ${_('My Public Gists')}</a></li>
 
              <li><a href="${h.url('gists', private=1)}"><i class="icon-file-text"></i> ${_('My Private Gists')}</a></li>
 
            %endif
 
          </ul>
 
      </li>
 
    <li ${is_current('search')}>
 
        <a class="menu_link" title="${_('Search in repositories')}"  href="${h.url('search')}">
 
          <i class="icon-search"></i> ${_('Search')}
 
        </a>
 
    </li>
 
    % if h.HasPermissionAll('hg.admin')('access admin main page'):
 
      <li ${is_current('admin')}>
 
        <a class="menu_link childs" title="${_('Admin')}" href="${h.url('admin_home')}">
 
          <i class="icon-cog"></i> ${_('Admin')}
 
@@ -295,32 +295,32 @@
 
    ## USER MENU
 
    <li>
 
      <a class="menu_link childs" id="quick_login_link">
 
          <span class="icon">
 
             <img src="${h.gravatar_url(c.authuser.email,20)}" alt="avatar">
 
          </span>
 
          %if c.authuser.username != 'default':
 
            <span class="menu_link_user">${c.authuser.username}</span>
 
            %if c.unread_notifications != 0:
 
              <span class="menu_link_notifications">${c.unread_notifications}</span>
 
            %endif
 
          %else:
 
              <span>${_('Not logged in')}</span>
 
              <span>${_('Not Logged In')}</span>
 
          %endif
 
      </a>
 

	
 
      <div class="user-menu">
 
        <div id="quick_login">
 
          %if c.authuser.username == 'default' or c.authuser.user_id is None:
 
            <h4>${_('Login to your account')}</h4>
 
            <h4>${_('Login to Your Account')}</h4>
 
            ${h.form(h.url('login_home',came_from=h.url.current()))}
 
            <div class="form">
 
                <div class="fields">
 
                    <div class="field">
 
                        <div class="label">
 
                            <label for="username">${_('Username')}:</label>
 
                        </div>
 
                        <div class="input">
 
                            ${h.text('username',class_='focus')}
 
                        </div>
 

	
 
                    </div>
 
@@ -347,25 +347,25 @@
 
                </div>
 
            </div>
 
            ${h.end_form()}
 
          %else:
 
            <div class="links_left">
 
                <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.authuser.email,48)}" /></div>
 
                <div class="full_name">${c.authuser.full_name_or_username}</div>
 
                <div class="email">${c.authuser.email}</div>
 
            </div>
 
            <div class="links_right">
 
            <ol class="links">
 
              <li><a href="${h.url('notifications')}">${_('Notifications')}: ${c.unread_notifications}</a></li>
 
              <li>${h.link_to(_(u'My account'),h.url('my_account'))}</li>
 
              <li>${h.link_to(_(u'My Account'),h.url('my_account'))}</li>
 
              <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li>
 
            </ol>
 
            </div>
 
          %endif
 
        </div>
 
      </div>
 
    </li>
 

	
 
    <script type="text/javascript">
 
        var visual_show_public_icon = "${c.visual.show_public_icon}" == "True";
 
        var cache = {}
 
        /*format the look of items in the list*/
kallithea/templates/base/root.html
Show inline comments
 
@@ -18,40 +18,40 @@
 
            ${self.css_extra()}
 
        </%def>
 

	
 
        <%def name="css_extra()"></%def>
 

	
 
        ${self.css()}
 

	
 
        ## JAVASCRIPT ##
 
        <%def name="js()">
 
            <script type="text/javascript">
 
            //JS translations map
 
            var TRANSLATION_MAP = {
 
                'Add another comment':'${_("Add another comment")}',
 
                'Add Another Comment':'${_("Add Another Comment")}',
 
                'Stop following this repository':"${_('Stop following this repository')}",
 
                'Start following this repository':"${_('Start following this repository')}",
 
                'Group':"${_('Group')}",
 
                'members':"${_('members')}",
 
                'Loading ...':"${_('Loading ...')}",
 
                'loading ...':"${_('loading ...')}",
 
                'Search truncated': "${_('Search truncated')}",
 
                'No matching files': "${_('No matching files')}",
 
                'Open new pull request': "${_('Open new pull request')}",
 
                'Open new pull request for selected changesets':  "${_('Open new pull request for selected changesets')}",
 
                'Show selected changesets __S &rarr; __E': "${h.literal(_('Show selected changesets __S &rarr; __E'))}",
 
                'Show selected changeset __S': "${_('Show selected changeset __S')}",
 
                'Selection link': "${_('Selection link')}",
 
                'Collapse diff': "${_('Collapse diff')}",
 
                'Expand diff': "${_('Expand diff')}",
 
                'Open New Pull Request': "${_('Open New Pull Request')}",
 
                'Open New Pull Request for Selected Changesets':  "${_('Open New Pull Request for Selected Changesets')}",
 
                'Show Selected Changesets __S &rarr; __E': "${h.literal(_('Show Selected Changesets __S &rarr; __E'))}",
 
                'Show Selected Changeset __S': "${_('Show Selected Changeset __S')}",
 
                'Selection Link': "${_('Selection Link')}",
 
                'Collapse Diff': "${_('Collapse Diff')}",
 
                'Expand Diff': "${_('Expand Diff')}",
 
                'Failed to revoke permission': "${_('Failed to revoke permission')}",
 
                'Confirm to revoke permission for {0}: {1} ?': "${_('confirm to revoke permission for {0}: {1} ?')}",
 
                'enabled': "${_('enabled')}",
 
                'disabled': "${_('disabled')}",
 
                'Select changeset': "${_('Select changeset')}",
 
                'Specify changeset': "${_('Specify changeset')}",
 
                'MSG_SORTASC': "${_('Click to sort ascending')}",
 
                'MSG_SORTDESC': "${_('Click to sort descending')}",
 
                'MSG_EMPTY': "${_('No records found.')}",
 
                'MSG_ERROR': "${_('Data error.')}",
 
                'MSG_LOADING': "${_('Loading...')}"
 
            };
kallithea/templates/changelog/changelog.html
Show inline comments
 
@@ -177,40 +177,40 @@ ${self.repo_context_bar('changelog', c.f
 
                    var checked_checkboxes = [];
 
                    for (pos in checkboxes){
 
                        if(checkboxes[pos].checked){
 
                            checked_checkboxes.push(checkboxes[pos]);
 
                        }
 
                    }
 
                    if(YUD.get('open_new_pr')){
 
                        if(checked_checkboxes.length>1){
 
                            YUD.setStyle('open_new_pr','display','none');
 
                        } else {
 
                            YUD.setStyle('open_new_pr','display','');
 
                            if(checked_checkboxes.length>0){
 
                                YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets'];
 
                                YUD.get('open_new_pr').innerHTML = _TM['Open New Pull Request for Selected Changesets'];
 
                            }else{
 
                                YUD.get('open_new_pr').innerHTML = _TM['Open new pull request'];
 
                                YUD.get('open_new_pr').innerHTML = _TM['Open New Pull Request'];
 
                            }
 
                        }
 
                    }
 

	
 
                    if(checked_checkboxes.length>0){
 
                        var rev_end = checked_checkboxes[0].name;
 
                        var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
 
                        var url = pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}',
 
                                                                  'revision': rev_start+'...'+rev_end});
 

	
 
                        var link = (rev_start == rev_end)
 
                            ? _TM['Show selected changeset __S']
 
                            : _TM['Show selected changesets __S &rarr; __E'];
 
                            ? _TM['Show Selected Changeset __S']
 
                            : _TM['Show Selected Changesets __S &rarr; __E'];
 

	
 
                        link = link.replace('__S',rev_start.substr(0,6));
 
                        link = link.replace('__E',rev_end.substr(0,6));
 
                        YUD.get('rev_range_container').href = url;
 
                        YUD.get('rev_range_container').innerHTML = link;
 
                        YUD.setStyle('rev_range_container','display','');
 
                        YUD.setStyle('rev_range_clear','display','');
 

	
 
                        YUD.get('open_new_pr').href = pyroutes.url('pullrequest_home',
 
                                                                   {'repo_name': '${c.repo_name}',
 
                                                                    'rev_start': rev_start,
 
                                                                    'rev_end': rev_end})
kallithea/templates/changelog/changelog_summary_data.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
%if c.repo_changesets:
 
<table class="table_disp">
 
    <tr>
 
        <th class="left">${_('Revision')}</th>
 
        <th class="left">${_('Commit message')}</th>
 
        <th class="left">${_('Commit Message')}</th>
 
        <th class="left">${_('Age')}</th>
 
        <th class="left">${_('Author')}</th>
 
        <th class="left">${_('Refs')}</th>
 
    </tr>
 
%for cnt,cs in enumerate(c.repo_changesets):
 
    <tr class="parity${cnt%2}">
 
        <td>
 
          <div>
 
            <div class="changeset-status-container">
 
              %if c.statuses.get(cs.raw_id):
 
                <div class="changeset-status-ico shortlog">
 
                %if c.statuses.get(cs.raw_id)[2]:
kallithea/templates/changeset/diff_block.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
##usage:
 
## <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
## ${diff_block.diff_block(change)}
 
##
 
<%def name="diff_block(change)">
 
<div class="diff-collapse">
 
    <span target="${'diff-container-%s' % (id(change))}" class="diff-collapse-button">&uarr; ${_('Collapse diff')} &uarr;</span>
 
    <span target="${'diff-container-%s' % (id(change))}" class="diff-collapse-button">&uarr; ${_('Collapse Diff')} &uarr;</span>
 
</div>
 
<div class="diff-container" id="${'diff-container-%s' % (id(change))}">
 
%for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems():
 
    <div id="${FID}_target" style="clear:both;margin-top:25px"></div>
 
    <div id="${FID}" class="diffblock  margined comm">
 
        <div class="code-header">
 
            <div class="changeset_header">
 
                <div class="changeset_file">
 
                    ${h.link_to_if(change!='D',h.safe_unicode(path),h.url('files_home',repo_name=c.repo_name,
 
                    revision=cs2,f_path=h.safe_unicode(path)))}
 
                </div>
 
                <div class="diff-actions">
kallithea/templates/compare/compare_diff.html
Show inline comments
 
@@ -4,25 +4,25 @@
 
<%def name="title()">
 
    %if c.compare_home:
 
        ${_('%s Compare') % c.repo_name}
 
    %else:
 
        ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.a_repo.repo_name, c.a_ref_name)} &gt; ${'%s@%s' % (c.cs_repo.repo_name, c.cs_ref_name)}
 
    %endif
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

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

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

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog')}
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
@@ -33,25 +33,25 @@ ${self.repo_context_bar('changelog')}
 
                <div>
 
                    ${h.hidden('compare_org')} <i class="icon-ellipsis-horizontal" style="color: #999; vertical-align: -12px; padding: 0px 0px 0px 2px"></i> ${h.hidden('compare_other')}
 
                    %if not c.compare_home:
 
                        <a class="btn btn-small" href="${c.swap_url}"><i class="icon-refresh"></i> ${_('Swap')}</a>
 
                    %endif
 
                    <div id="compare_revs" class="btn btn-small"><i class="icon-loop"></i> ${_('Compare Revisions')}</div>
 
                </div>
 
            </div>
 
        </div>
 

	
 
    %if c.compare_home:
 
        <div id="changeset_compare_view_content">
 
         <div style="color:#999;font-size: 18px">${_('Compare revisions, branches, bookmarks or tags.')}</div>
 
         <div style="color:#999;font-size: 18px">${_('Compare revisions, branches, bookmarks, or tags.')}</div>
 
        </div>
 
    %else:
 
        <div id="changeset_compare_view_content">
 
                ##CS
 
                <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
 
                <%include file="compare_cs.html" />
 

	
 
                ## FILES
 
                <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
 

	
 
                % if c.limited_diff:
 
                    ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
kallithea/templates/files/files_add.html
Show inline comments
 
@@ -13,25 +13,25 @@
 
<script type="text/javascript" src="${h.url('/js/mode/meta.js')}"></script>
 
<script type="text/javascript" src="${h.url('/js/mode/meta_ext.js')}"></script>
 
</%def>
 
<%def name="css_extra()">
 
<link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/>
 
</%def>
 

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

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

	
 
<%def name="main()">
 
${self.repo_context_bar('files')}
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
            <li>
 
              <span><a href="#">${_('Branch')}: ${c.cs.branch}</a></span>
 
            </li>
 
@@ -52,29 +52,29 @@ ${self.repo_context_bar('files')}
 
                  ${_('or')} <div class="btn btn-small" id="file_enable">${_('Create New File')}</div>
 
              </span>
 
          </h3>
 
            <div id="body" class="codeblock">
 
            <div class="code-header" id="set_mode_header">
 
                <label class="commit" for="set_mode">${_('New file mode')}</label>
 
                ${h.select('set_mode','plain',[('plain',_('plain'))])}
 
            </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>
 
                <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-small btn-success")}
 
            ${h.submit('commit',_('Commit Changes'),class_="btn btn-small btn-success")}
 
            ${h.reset('reset',_('Reset'),class_="btn btn-small")}
 
            </div>
 
            ${h.end_form()}
 
            <script type="text/javascript">
 
            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',reset_url);
 
            CodeMirror.modeURL = "${h.url('/js/mode/%N/%N.js')}";
 

	
 
            //inject new modes, based on codeMirrors modeInfo object
 
            $('#set_mode').each(function(){
 
                var modes_select = this;
 
                for(var i=0;i<CodeMirror.modeInfo.length;i++){
kallithea/templates/files/files_browser.html
Show inline comments
 
@@ -33,26 +33,26 @@
 
            </div>
 
        </div>
 
    </div>
 

	
 
    <div class="browser-body">
 
        <table class="code-browser">
 
            <thead>
 
                <tr>
 
                    <th>${_('Name')}</th>
 
                    <th>${_('Size')}</th>
 
                    <th>${_('Mimetype')}</th>
 
                    <th>${_('Last Revision')}</th>
 
                    <th>${_('Last modified')}</th>
 
                    <th>${_('Last committer')}</th>
 
                    <th>${_('Last Modified')}</th>
 
                    <th>${_('Last Committer')}</th>
 
                </tr>
 
            </thead>
 

	
 
            <tbody id="tbody">
 
                %if c.file.parent:
 
                <tr class="parity0">
 
                    <td>
 
                        ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.parent.path),class_="browser-dir ypjax-link")}
 
                    </td>
 
                    <td></td>
 
                    <td></td>
 
                    <td></td>
kallithea/templates/files/files_delete.html
Show inline comments
 
@@ -40,24 +40,24 @@ ${self.repo_context_bar('files')}
 
    <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>
 
                </div>
 
                <div style="padding: 10px;color:#666666">${_('Commit message')}</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-small btn-success")}
 
                ${h.submit('commit',_('Commit Changes'),class_="btn btn-small btn-success")}
 
                ${h.reset('reset',_('Reset'),class_="btn btn-small")}
 
            </div>
 
            ${h.end_form()}
 
        </div>
 
    </div>
 
</div>
 
</%def>
kallithea/templates/files/files_edit.html
Show inline comments
 
@@ -59,25 +59,25 @@ ${self.repo_context_bar('files')}
 
                      % endif
 
                    </div>
 
                </div>
 
                <label class="commit" for="set_mode">${_('Editing file')}: ${c.file.unicode_path}</label>
 
                ${h.select('set_mode','plain',[('plain',_('plain'))])}
 
            </div>
 
                <pre id="editor_pre"></pre>
 
                <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea>
 
                <div style="padding: 10px;color:#666666">${_('Commit Message')}</div>
 
                <textarea 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-small btn-success")}
 
            ${h.submit('commit',_('Commit Changes'),class_="btn btn-small btn-success")}
 
            ${h.reset('reset',_('Reset'),class_="btn btn-small")}
 
            </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',reset_url);
 
    CodeMirror.modeURL = "${h.url('/js/mode/%N/%N.js')}";
kallithea/templates/forks/fork.html
Show inline comments
 
@@ -43,35 +43,35 @@ ${self.repo_context_bar('createfork')}
 
                <div class="textarea editor">
 
                    ${h.textarea('description')}
 
                    <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
 
                </div>
 
            </div>
 

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

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

	
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="private">${_('Private')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('private',value="True")}
 
                    <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
 
                </div>
 
            </div>
kallithea/templates/forks/forks_data.html
Show inline comments
 
@@ -9,25 +9,25 @@
 
                </div>
 
                <span style="font-size: 20px">
 
                 <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname}) /
 
                  ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))}
 
                </span>
 
                <div style="padding:5px 3px 3px 42px;">${f.description}</div>
 
            </div>
 
            <div style="clear:both;padding-top: 10px"></div>
 
            <div class="follower_date">${_('Forked')} -
 
                <span class="tooltip" title="${h.tooltip(h.fmt_date(f.created_on))}"> ${h.age(f.created_on)}</span>
 
                <a title="${_('Compare fork with %s' % c.repo_name)}"
 
                   href="${h.url('compare_url',repo_name=c.repo_name, org_ref_type=c.db_repo.landing_rev[0],org_ref_name=c.db_repo.landing_rev[1],other_repo=f.repo_name,other_ref_type=c.db_repo.landing_rev[0],other_ref_name=c.db_repo.landing_rev[1], merge=1)}"
 
                   class="btn btn-small"><i class="icon-loop"></i> ${_('Compare fork')}</a>
 
                   class="btn btn-small"><i class="icon-loop"></i> ${_('Compare Fork')}</a>
 
            </div>
 
            <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
 
        </div>
 
    % endfor
 
  <div class="pagination-wh pagination-left">
 
  <script type="text/javascript">
 
  $(document).ready(function(){
 
      var $forks = $('#forks');
 
      $forks.on('click','.pager_link',function(e){
 
          asynchtml(e.target.href, $forks, function(){
 
              show_more_event();
 
              tooltip_activate();
kallithea/templates/journal/journal.html
Show inline comments
 
@@ -2,26 +2,26 @@
 
<%inherit file="/base/base.html"/>
 
<%def name="title()">
 
    ${_('Journal')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 
<%def name="breadcrumbs()">
 
    <h5>
 
    <form id="filter_form">
 
    <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...')}"/>
 
    <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span>
 
    <input type='submit' value="${_('filter')}" class="btn btn-small" style="padding:0px 2px 0px 2px;margin:0px"/>
 
    ${_('journal')} - ${ungettext('%s entry', '%s entries', c.journal_pager.item_count) % (c.journal_pager.item_count)}
 
    <input type='submit' value="${_('Filter')}" class="btn btn-small" style="padding:0px 2px 0px 2px;margin:0px"/>
 
    ${_('Journal')} - ${ungettext('%s Entry', '%s Entries', c.journal_pager.item_count) % (c.journal_pager.item_count)}
 
    </form>
 
    ${h.end_form()}
 
    </h5>
 
</%def>
 
<%def name="page_nav()">
 
    ${self.menu('journal')}
 
</%def>
 
<%def 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" />
 
</%def>
 
<%def name="main()">
 
@@ -45,25 +45,25 @@
 
        <!-- box / title -->
 

	
 
        <div class="title">
 
            <h5>
 
            <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value="" style="display: none"/>
 
            <input class="q_filter_box" id="q_filter_watched" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value="" style="display: none"/>
 
            </h5>
 
            <ul class="links nav nav-tabs">
 
                <li class="active" id="show_watched_li">
 
                    <a id="show_watched" href="#watched"><i class="icon-eye-open"></i> ${_('Watched')}</a>
 
                </li>
 
                <li id="show_my_li">
 
                    <a id="show_my" href="#my"><i class="icon-archive"></i> ${_('My repos')}</a>
 
                    <a id="show_my" href="#my"><i class="icon-archive"></i> ${_('My Repos')}</a>
 
               </li>
 
            </ul>
 
        </div>
 

	
 
        <!-- end box / title -->
 
        <div id="my_container" style="display:none">
 
            <div class="table-grid table yui-skin-sam" id="repos_list_wrap"></div>
 
            <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
 
        </div>
 

	
 
        <div id="watched_container">
 
            <div class="table-grid table yui-skin-sam" id="watched_repos_list_wrap"></div>
kallithea/templates/password_reset.html
Show inline comments
 
@@ -19,27 +19,27 @@
 
            %if c.site_name:
 
             <div class="branding">${c.site_name}</div>
 
            %endif
 
          </a>
 
        </div>
 
    </div>
 
</div>
 

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

	
 
                 <div class="field">
 
                    <div class="label">
 
                        <label for="email">${_('Email Address')}:</label>
 
                    </div>
 
@@ -53,26 +53,26 @@
 
                    <div class="label">
 
                        <label for="email">${_('Captcha')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${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")}
 
                          <div class="activation_msg">${_('Password reset link will be send to matching email address')}</div>
 
                      ${h.submit('send',_('Send Password Reset Email'),class_="btn")}
 
                          <div class="activation_msg">${_('Password reset link will be sent to the email address matching your username.')}</div>
 
                    </div>
 
                </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:
kallithea/templates/pullrequests/pullrequest.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

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

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

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

	
 
<%def name="main()">
 
${self.repo_context_bar('showpullrequest')}
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
@@ -85,25 +85,25 @@ ${self.repo_context_bar('showpullrequest
 

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

	
 
        </div>
 

	
 
        ## Reviewers
 
        <div style="float:left; border-left:1px dashed #eee">
 
            <div class="pr-details-title">${_('Pull request reviewers')}</div>
 
            <div class="pr-details-title">${_('Pull Request Reviewers')}</div>
 
            <div id="reviewers" style="padding:0px 0px 0px 15px">
 
              ## members goes here !
 
              <div>
 
                <ul id="review_members" class="group_members">
 
                %for member in [c.a_repo.user]:
 
                  <li id="reviewer_${member.user_id}">
 
                    <div class="reviewers_member">
 
                      <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email, 14)}"/> </div>
 
                      <div style="float:left">${member.firstname} ${member.lastname} (${_('owner')})</div>
 
                      <input type="hidden" value="${member.user_id}" name="review_members" />
 
                      <span class="action_button" style="padding: 3px" onclick="removeReviewMember(${member.user_id})" title="${_('Remove reviewer')}>
 
                          <i class="icon-remove-sign" style="color: #FF4444;"></i>
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -187,35 +187,35 @@ ${self.repo_context_bar('showpullrequest
 
                    <td>${h.radio(name='updaterev', value=cs.raw_id)}</td>
 
                    <td>${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}</td>
 
                    <td><div class="message" style="white-space:normal; height:1.1em; max-width: 500px; padding:0">${h.urlify_commit(cs.message, c.repo_name)}</div></td>
 
                    </tr>
 
                  %endfor
 
                </table>
 
              </div>
 
              %endif
 
              <div class="msg-div">${c.update_msg_other}</div>
 
            </div>
 
            %if c.available and not c.pull_request.is_closed():
 
              <div class="buttons">
 
                ${h.submit('copy_update',_('Create pull request update'),class_="btn btn-small")}
 
                ${h.submit('copy_update',_('Create Pull Request Update'),class_="btn btn-small")}
 
              </div>
 
            %endif
 
          </div>
 
        ${h.end_form()}
 

	
 
      </div>
 
    </div>
 
    ## REVIEWERS
 
    <div style="float:left; border-left:1px dashed #eee">
 
       <div class="pr-details-title">${_('Pull request reviewers')}</div>
 
       <div class="pr-details-title">${_('Pull Request Reviewers')}</div>
 
        <div id="reviewers" style="padding:0px 0px 5px 10px">
 
          ## members goes here !
 
          <div>
 
            <ul id="review_members" class="group_members">
 
            %for member,status in c.pull_request_reviewers:
 
              <li id="reviewer_${member.user_id}">
 
                <div class="reviewers_member">
 
                    <div class="reviewer_status tooltip" title="${h.tooltip(h.changeset_status_lbl(status.status if status else 'not_reviewed'))}">
 
                      <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status.status if status else 'not_reviewed')))}"/>
 
                    </div>
 
                  <div class="reviewer_gravatar gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div>
 
                  <div style="float:left;">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div>
 
@@ -242,25 +242,25 @@ ${self.repo_context_bar('showpullrequest
 
            </div>
 
            %endif
 
          </div>
 
          %endif
 
        </div>
 
       </div>
 

	
 
    <div style="overflow: auto; clear: both">
 
      ##DIFF
 
      <div class="table" style="float:left;clear:none">
 
          <div class="diffblock">
 
              <div style="padding:5px">
 
                ${_('Compare view')}
 
                ${_('Compare View')}
 
              </div>
 
          </div>
 
          <div id="changeset_compare_view_content">
 
              ##CS
 
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
 
              <%include file="/compare/compare_cs.html" />
 

	
 
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
 
              ${_('Common ancestor')}:
 
              ${h.link_to(h.short_id(c.a_rev),h.url('changeset_home',repo_name=c.a_repo.repo_name,revision=c.a_rev))}
 
              </div>
 

	
kallithea/templates/pullrequests/pullrequest_show_all.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('%s Pull Requests') % c.repo_name}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
%if c.from_:
 
    ${_('Pull requests from %s') % c.repo_name}
 
    ${_("Pull Requests from %s'") % c.repo_name}
 
%else:
 
    ${_('Pull requests to %s') % c.repo_name}
 
    ${_("Pull Requests to '%s'") % c.repo_name}
 
%endif
 
</%def>
 

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

	
 
<%def name="main()">
 
${self.repo_context_bar('showpullrequest')}
 

	
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
          <li>
 
             %if c.authuser.username != 'default':
 
              <span>
 
                  <a id="open_new_pr" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}"><i class="icon-plus"></i> ${_('Open new pull request')}</a>
 
                  <a id="open_new_pr" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}"><i class="icon-plus"></i> ${_('Open New Pull Request')}</a>
 
              </span>
 
             %endif
 
              <span>
 
                %if c.from_:
 
                    <a class="btn btn-small" href="${h.url('pullrequest_show_all',repo_name=c.repo_name,closed=c.closed)}"><i class="icon-loop-2"></i> ${_('Show pull requests to %s') % c.repo_name}</a>
 
                    <a class="btn btn-small" href="${h.url('pullrequest_show_all',repo_name=c.repo_name,closed=c.closed)}"><i class="icon-loop-2"></i> ${_('Show Pull Requests to %s') % c.repo_name}</a>
 
                %else:
 
                    <a class="btn btn-small" href="${h.url('pullrequest_show_all',repo_name=c.repo_name,closed=c.closed,from_=1)}"><i class="icon-loop-2"></i> ${_('Show pull requests from %s') % c.repo_name}</a>
 
                    <a class="btn btn-small" href="${h.url('pullrequest_show_all',repo_name=c.repo_name,closed=c.closed,from_=1)}"><i class="icon-loop-2"></i> ${_("Show Pull Requests from '%s'") % c.repo_name}</a>
 
                %endif
 
              </span>
 
          </li>
 
        </ul>
 
    </div>
 

	
 
    <div style="margin: 0 20px">
 
        <div>
 
        %if c.closed:
 
            ${h.link_to(_('Hide closed pull requests'), h.url('pullrequest_show_all',repo_name=c.repo_name,from_=c.from_))}
 
            ${h.link_to(_('Hide closed pull requests (only show open pull requests)'), h.url('pullrequest_show_all',repo_name=c.repo_name,from_=c.from_))}
 
        %else:
 
            ${h.link_to(_('Show closed pull requests too'), h.url('pullrequest_show_all',repo_name=c.repo_name,from_=c.from_,closed=1))}
 
            ${h.link_to(_('Show closed pull requests (in addition to open pull requests)'), h.url('pullrequest_show_all',repo_name=c.repo_name,from_=c.from_,closed=1))}
 
        %endif
 
        </div>
 
    </div>
 

	
 
    ${c.pullrequest_data}
 

	
 
</div>
 
</%def>
kallithea/templates/pullrequests/pullrequest_show_my_data.html
Show inline comments
 
${h.checkbox('show_closed',checked="checked" if c.show_closed else "", label=_('Show closed pull requests too'))}
 
<div class="pullrequests_section_head">${_('Opened by me')}</div>
 
${h.checkbox('show_closed',checked="checked" if c.show_closed else "", label=_('Show closed pull requests (in addition to open pull requests)'))}
 
<div class="pullrequests_section_head">${_('Pull Requests Created by Me')}</div>
 
<ul>
 
  %if c.my_pull_requests:
 
    %for pull_request in c.my_pull_requests:
 
      <li class="${'closed' if pull_request.is_closed() else ''}">
 
        <div style="height: 12px">
 
            %if pull_request.last_review_status:
 
              <img src="${h.url('/images/icons/flag_status_%s.png' % pull_request.last_review_status)}" title="${_("Someone voted: %s") % pull_request.last_review_status}"/>
 
            %else:
 
              <img src="${h.url('/images/icons/flag_status_not_reviewed.png')}" title="${_("Nobody voted")}"/>
 
            %endif
 
            <a href="${pull_request.url()}">
 
              ${pull_request.title or _("(no title)")}
 
            </a>
 
            ${_('opened on %s from') % (h.fmt_date(pull_request.created_on))}
 
            ${_('created on %s from') % (h.fmt_date(pull_request.created_on))}
 
            <% org_ref_name=pull_request.org_ref.rsplit(':', 2)[-2] %>
 
            <a href="${h.url('summary_home', repo_name=pull_request.org_repo.repo_name, anchor=org_ref_name)}">
 
              ${pull_request.org_repo.repo_name}#${org_ref_name}
 
            </a>
 
            %if pull_request.is_closed():
 
              (${_('Closed')})
 
            %endif
 
            ${h.form(url('pullrequest_delete', repo_name=pull_request.other_repo.repo_name, pull_request_id=pull_request.pull_request_id),method='delete', style="display:inline-block")}
 
              ${h.submit('remove_%s' % pull_request.pull_request_id, '', title=_('Delete Pull Request'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")}
 
            ${h.end_form()}
 
        </div>
 
      </li>
 
    %endfor
 
  %else:
 
    <li><span class="empty_data">${_('Nothing here yet')}</span></li>
 
  %endif
 
</ul>
 

	
 
<div class="pullrequests_section_head" style="clear:both">${_('I participate in')}</div>
 
<div class="pullrequests_section_head" style="clear:both">${_('Pull Requests I Participate In')}</div>
 
<ul>
 
  %if c.participate_in_pull_requests:
 
    %for pull_request in c.participate_in_pull_requests:
 
      <li class="${'closed' if pull_request.is_closed() else ''}">
 
        <div style="height: 12px">
 
            %if pull_request.last_review_status:
 
              <img src="${h.url('/images/icons/flag_status_%s.png' % pull_request.last_review_status)}" title="${_("Someone voted: %s") % pull_request.last_review_status}"/>
 
            %else:
 
              <img src="${h.url('/images/icons/flag_status_not_reviewed.png')}" title="${_("Nobody voted")}"/>
 
            %endif
 
            <a href="${pull_request.url()}">
 
              ${pull_request.title or _("(no title)")}
 
            </a>
 
            ${_('from')}
 
            <% org_ref_name=pull_request.org_ref.rsplit(':', 2)[-2] %>
 
            <a href="${h.url('summary_home', repo_name=pull_request.org_repo.repo_name, anchor=org_ref_name)}">
 
              ${pull_request.org_repo.repo_name}#${org_ref_name}
 
            </a>
 
            ${_('opened on %s') % (h.fmt_date(pull_request.created_on))}
 
            ${_('created on %s') % (h.fmt_date(pull_request.created_on))}
 
            %if pull_request.is_closed():
 
              (${_('Closed')})
 
            %endif
 
        </div>
 
      </li>
 
    %endfor
 
  %else:
 
    <li><span class="empty_data">${_('Nothing here yet')}</span></li>
 
  %endif
 
</ul>
kallithea/templates/register.html
Show inline comments
 
@@ -98,27 +98,27 @@
 
                    </div>
 
                    <div class="input">
 
                        ${h.hidden('recaptcha_field')}
 
                        <div id="recaptcha"></div>
 
                    </div>
 
                </div>
 
                %endif
 

	
 
                <div class="buttons">
 
                    <div class="nohighlight">
 
                      ${h.submit('sign_up',_('Sign Up'),class_="btn")}
 
                      %if c.auto_active:
 
                          <div class="activation_msg">${_('Your account will be activated right after registration')}</div>
 
                          <div class="activation_msg">${_('Registered accounts are ready to use and need no further action.')}</div>
 
                      %else:
 
                          <div class="activation_msg">${_('Your account must wait for activation by administrator')}</div>
 
                          <div class="activation_msg">${_('Please wait for an administrator to activate your account.')}</div>
 
                      %endif
 
                    </div>
 
                </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(){
 
            $('#username').focus();
kallithea/templates/search/search.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    %if c.repo_name:
 
        ${_('%s Search') % c.repo_name}
 
    %else:
 
        ${_('Search in all repositories')}
 
        ${_('Search in All Repositories')}
 
    %endif
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
  %if c.repo_name:
 
    ${_('Search')}
 
  %else:
 
    ${_('Search in all repositories')}
 
    ${_('Search in All Repositories')}
 
  %endif
 
  %if c.cur_query:
 
    &raquo;
 
    ${c.cur_query}
 
  %endif
 
</%def>
 

	
 
<%def name="page_nav()">
 
    %if c.repo_name:
 
    ${self.menu('repositories')}
 
    %else:
 
    ${self.menu('search')}
 
@@ -41,37 +41,37 @@ ${self.repo_context_bar('options')}
 
        ${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="fields">
 
            <div class="field field-first field-noborder">
 
             <div class="label">
 
                 <label for="q">${_('Search term')}</label>
 
                 <label for="q">${_('Search term')}:</label>
 
             </div>
 
                <div class="input">${h.text('q',c.cur_query,class_="small")}
 
                    <div class="button highlight">
 
                        <input type="submit" value="${_('Search')}" class="btn"/>
 
                    </div>
 
                </div>
 
                <div style="font-weight: bold;clear:both;margin-left:200px">${c.runtime}</div>
 
            </div>
 

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

	
 
        </div>
 
    </div>
kallithea/templates/summary/summary.html
Show inline comments
 
@@ -181,27 +181,27 @@ summary = lambda n:{False:'summary-short
 
            </li>
 
            %endif
 
          </ul>
 
        </div>
 
    </div>
 
</div>
 

	
 

	
 
<div class="box">
 
    <div class="title">
 
        <div class="breadcrumbs">
 
        %if c.repo_changesets:
 
            ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))}
 
            ${h.link_to(_('Latest Changes'),h.url('changelog_home',repo_name=c.repo_name))}
 
        %else:
 
            ${_('Quick start')}
 
            ${_('Quick Start')}
 
         %endif
 
        </div>
 
    </div>
 
    <div class="table">
 
        <div id="shortlog_data">
 
            <%include file='../changelog/changelog_summary_data.html'/>
 
        </div>
 
    </div>
 
</div>
 

	
 
%if c.readme_data:
 
<div id="readme" class="anchor">
kallithea/templates/tags/tags.html
Show inline comments
 
@@ -17,25 +17,25 @@
 
    ${self.menu('repositories')}
 
</%def>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('switch-to')}
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    %if c.repo_tags:
 
    <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="btn btn-small">${_('Compare tags')}</a></div>
 
    <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="btn btn-small">${_('Compare Tags')}</a></div>
 
    %endif
 
    <div class="table">
 
        <%include file='tags_data.html'/>
 
    </div>
 
</div>
 
<script type="text/javascript">
 
$('#compare_tags').click(function(e){
 
    e.preventDefault();
 
    var org = $('input[name=compare_org]:checked')[0];
 
    var other = $('input[name=compare_other]:checked')[0];
 

	
 
    if(org && other){
kallithea/tests/functional/test_admin.py
Show inline comments
 
@@ -43,25 +43,25 @@ class TestAdminController(TestController
 
                    setattr(ul, k, v)
 
                Session().add(ul)
 
            Session().commit()
 

	
 
    @classmethod
 
    def teardown_class(cls):
 
        UserLog.query().delete()
 
        Session().commit()
 

	
 
    def test_index(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index'))
 
        response.mustcontain('Admin journal')
 
        response.mustcontain('Admin Journal')
 

	
 
    def test_filter_all_entries(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',))
 
        response.mustcontain('2034 entries')
 

	
 
    def test_filter_journal_filter_exact_match_on_repository(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='admin/admin', action='index',
 
                                    filter='repository:xxx'))
 
        response.mustcontain('3 entries')
 

	
kallithea/tests/functional/test_files.py
Show inline comments
 
@@ -306,25 +306,25 @@ removed extra unicode conversion in diff
 
        response.mustcontain(msg)
 

	
 
    def test_ajaxed_files_list(self):
 
        self.log_user()
 
        rev = '27cd5cce30c96924232dffcd24178a07ffeb5dfc'
 
        response = self.app.get(
 
            url('files_nodelist_home', repo_name=HG_REPO, f_path='/',
 
                revision=rev),
 
            extra_environ={'HTTP_X_PARTIAL_XHR': '1'},
 
        )
 
        response.mustcontain("vcs/web/simplevcs/views/repository.py")
 

	
 
    #HG - ADD FILE
 
    # Hg - ADD FILE
 
    def test_add_file_view_hg(self):
 
        self.log_user()
 
        response = self.app.get(url('files_add_home',
 
                                      repo_name=HG_REPO,
 
                                      revision='tip', f_path='/'))
 

	
 
    def test_add_file_into_hg_missing_content(self):
 
        self.log_user()
 
        response = self.app.post(url('files_add_home',
 
                                      repo_name=HG_REPO,
 
                                      revision='tip', f_path='/'),
 
                                 params={
 
@@ -379,25 +379,25 @@ removed extra unicode conversion in diff
 
                                 params={
 
                                    'content': "foo",
 
                                    'filename': filename,
 
                                    'location': location
 
                                 },
 
                                 status=302)
 
        try:
 
            self.checkSessionFlash(response, 'Successfully committed to %s'
 
                                   % os.path.join(location, filename))
 
        finally:
 
            fixture.destroy_repo(repo.repo_name)
 

	
 
    ##GIT - ADD FILE
 
    # Git - add file
 
    def test_add_file_view_git(self):
 
        self.log_user()
 
        response = self.app.get(url('files_add_home',
 
                                      repo_name=GIT_REPO,
 
                                      revision='tip', f_path='/'))
 

	
 
    def test_add_file_into_git_missing_content(self):
 
        self.log_user()
 
        response = self.app.post(url('files_add_home',
 
                                      repo_name=GIT_REPO,
 
                                      revision='tip', f_path='/'),
 
                                 params={
 
@@ -451,25 +451,25 @@ removed extra unicode conversion in diff
 
                                 params={
 
                                    'content': "foo",
 
                                    'filename': filename,
 
                                    'location': location
 
                                 },
 
                                 status=302)
 
        try:
 
            self.checkSessionFlash(response, 'Successfully committed to %s'
 
                                   % os.path.join(location, filename))
 
        finally:
 
            fixture.destroy_repo(repo.repo_name)
 

	
 
    #HG - EDIT
 
    # Hg - EDIT
 
    def test_edit_file_view_hg(self):
 
        self.log_user()
 
        response = self.app.get(url('files_edit_home',
 
                                      repo_name=HG_REPO,
 
                                      revision='tip', f_path='vcs/nodes.py'))
 

	
 
    def test_edit_file_view_not_on_branch_hg(self):
 
        self.log_user()
 
        repo = fixture.create_repo('test-edit-repo', repo_type='hg')
 

	
 
        ## add file
 
        location = 'vcs'
 
@@ -522,25 +522,25 @@ removed extra unicode conversion in diff
 
                                          revision=repo.scm_instance.DEFAULT_BRANCH_NAME,
 
                                          f_path='vcs/nodes.py'),
 
                                     params={
 
                                        'content': "def py():\n print 'hello world'\n",
 
                                        'message': 'i commited',
 
                                     },
 
                                    status=302)
 
            self.checkSessionFlash(response,
 
                                   'Successfully committed to vcs/nodes.py')
 
        finally:
 
            fixture.destroy_repo(repo.repo_name)
 

	
 
    #GIT - EDIT
 
    # Git - edit
 
    def test_edit_file_view_git(self):
 
        self.log_user()
 
        response = self.app.get(url('files_edit_home',
 
                                      repo_name=GIT_REPO,
 
                                      revision='tip', f_path='vcs/nodes.py'))
 

	
 
    def test_edit_file_view_not_on_branch_git(self):
 
        self.log_user()
 
        repo = fixture.create_repo('test-edit-repo', repo_type='git')
 

	
 
        ## add file
 
        location = 'vcs'
 
@@ -593,25 +593,25 @@ removed extra unicode conversion in diff
 
                                          revision=repo.scm_instance.DEFAULT_BRANCH_NAME,
 
                                          f_path='vcs/nodes.py'),
 
                                     params={
 
                                        'content': "def py():\n print 'hello world'\n",
 
                                        'message': 'i commited',
 
                                     },
 
                                    status=302)
 
            self.checkSessionFlash(response,
 
                                   'Successfully committed to vcs/nodes.py')
 
        finally:
 
            fixture.destroy_repo(repo.repo_name)
 

	
 
    # HG - delete
 
    # Hg - delete
 
    def test_delete_file_view_hg(self):
 
        self.log_user()
 
        response = self.app.get(url('files_delete_home',
 
                                     repo_name=HG_REPO,
 
                                     revision='tip', f_path='vcs/nodes.py'))
 

	
 
    def test_delete_file_view_not_on_branch_hg(self):
 
        self.log_user()
 
        repo = fixture.create_repo('test-delete-repo', repo_type='hg')
 

	
 
        ## add file
 
        location = 'vcs'
 
@@ -663,25 +663,25 @@ removed extra unicode conversion in diff
 
                                          repo_name=repo.repo_name,
 
                                          revision=repo.scm_instance.DEFAULT_BRANCH_NAME,
 
                                          f_path='vcs/nodes.py'),
 
                                     params={
 
                                        'message': 'i commited',
 
                                     },
 
                                    status=302)
 
            self.checkSessionFlash(response,
 
                                   'Successfully deleted file vcs/nodes.py')
 
        finally:
 
            fixture.destroy_repo(repo.repo_name)
 

	
 
    # GIT - delete
 
    # Git - delete
 
    def test_delete_file_view_git(self):
 
        self.log_user()
 
        response = self.app.get(url('files_delete_home',
 
                                     repo_name=HG_REPO,
 
                                     revision='tip', f_path='vcs/nodes.py'))
 

	
 
    def test_delete_file_view_not_on_branch_git(self):
 
        self.log_user()
 
        repo = fixture.create_repo('test-delete-repo', repo_type='git')
 

	
 
        ## add file
 
        location = 'vcs'
kallithea/tests/functional/test_login.py
Show inline comments
 
@@ -50,25 +50,25 @@ class TestLoginController(TestController
 
        response.mustcontain('/%s' % HG_REPO)
 

	
 
    def test_login_ok_came_from(self):
 
        test_came_from = '/_admin/users'
 
        response = self.app.post(url(controller='login', action='index',
 
                                     came_from=test_came_from),
 
                                 {'username': 'test_admin',
 
                                  'password': 'test12'})
 
        self.assertEqual(response.status, '302 Found')
 
        response = response.follow()
 

	
 
        self.assertEqual(response.status, '200 OK')
 
        response.mustcontain('Users administration')
 
        response.mustcontain('Users Administration')
 

	
 
    @parameterized.expand([
 
          ('data:text/html,<script>window.alert("xss")</script>',),
 
          ('mailto:test@example.com',),
 
          ('file:///etc/passwd',),
 
          ('ftp://some.ftp.server',),
 
          ('http://other.domain',),
 
    ])
 
    def test_login_bad_came_froms(self, url_came_from):
 
        response = self.app.post(url(controller='login', action='index',
 
                                     came_from=url_came_from),
 
                                 {'username': 'test_admin',
kallithea/tests/functional/test_search.py
Show inline comments
 
@@ -83,27 +83,27 @@ class TestSearchController(TestControlle
 
        response.mustcontain('c994f0de03b2a0aa848a04fc2c0d7e737dba31fc')
 
        response.mustcontain('d1f898326327e20524fe22417c22d71064fe54a1')
 
        response.mustcontain('fe568b4081755c12abf6ba673ba777fc02a415f3')
 
        response.mustcontain('bafe786f0d8c2ff7da5c1dcfcfa577de0b5e92f1')
 

	
 
    def test_search_commit_added_file(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='search', action='index'),
 
                                {'q': 'added:README.rst',
 
                                 'type': 'commit'})
 

	
 
        response.mustcontain('2 results')
 
        #HG
 
        # Hg
 
        response.mustcontain('3803844fdbd3b711175fc3da9bdacfcd6d29a6fb')
 
        #GIT
 
        # Git
 
        response.mustcontain('ff7ca51e58c505fec0dd2491de52c622bb7a806b')
 

	
 
    def test_search_author(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='search', action='index'),
 
                    {'q': 'author:marcin@python-blog.com raw_id:b986218ba1c9b0d6a259fac9b050b1724ed8e545',
 
                     'type': 'commit'})
 

	
 
        response.mustcontain('1 results')
 

	
 
    def test_search_file_name(self):
 
        self.log_user()
kallithea/tests/other/test_vcs_operations.py
Show inline comments
 
@@ -146,25 +146,25 @@ def set_anonymous_access(enable=True):
 
    Session().commit()
 
    print '\tanonymous access is now:', enable
 
    if enable != User.get_by_username(User.DEFAULT_USER).active:
 
        raise Exception('Cannot set anonymous access')
 

	
 

	
 
#==============================================================================
 
# TESTS
 
#==============================================================================
 

	
 

	
 
def _check_proper_git_push(stdout, stderr):
 
    #WTF GIT stderr is output ?!
 
    #WTF Git stderr is output ?!
 
    assert 'fatal' not in stderr
 
    assert 'rejected' not in stderr
 
    assert 'Pushing to' in stderr
 
    assert 'master -> master' in stderr
 

	
 

	
 
class TestVCSOperations(BaseTestCase):
 

	
 
    @classmethod
 
    def setup_class(cls):
 
        #DISABLE ANONYMOUS ACCESS
 
        set_anonymous_access(False)
 
@@ -418,25 +418,25 @@ class TestVCSOperations(BaseTestCase):
 
        RepoModel().grant_user_permission(repo=r, user=TEST_USER_REGULAR_LOGIN,
 
                                          perm='repository.write')
 
        Session().commit()
 
        Repository.lock(r, User.get_by_username(TEST_USER_ADMIN_LOGIN).user_id)
 

	
 
        #push fails repo is locked by other user !
 
        stdout, stderr = _add_files_and_push('git', DEST,
 
                                             user=TEST_USER_REGULAR_LOGIN,
 
                                             passwd=TEST_USER_REGULAR_PASS)
 
        err = 'Repository `%s` locked by user `%s`' % (GIT_REPO, TEST_USER_ADMIN_LOGIN)
 
        assert err in stderr
 

	
 
        #TODO: fix this somehow later on GIT, GIT is stupid and even if we throw
 
        #TODO: fix this somehow later on Git, Git is stupid and even if we throw
 
        #back 423 to it, it makes ANOTHER request and we fail there with 405 :/
 

	
 
        msg = ("""abort: HTTP Error 423: Repository `%s` locked by user `%s`"""
 
                % (GIT_REPO, TEST_USER_ADMIN_LOGIN))
 
        #msg = "405 Method Not Allowed"
 
        #assert msg in stderr
 

	
 
    def test_push_unlocks_repository_hg(self):
 
        # enable locking
 
        r = Repository.get_by_repo_name(HG_REPO)
 
        r.enable_locking = True
 
        Session().add(r)
 
@@ -450,25 +450,25 @@ class TestVCSOperations(BaseTestCase):
 
        r = Repository.get_by_repo_name(HG_REPO)
 
        uid = User.get_by_username(TEST_USER_ADMIN_LOGIN).user_id
 
        assert r.locked[0] == uid
 

	
 
        #push is ok and repo is now unlocked
 
        stdout, stderr = _add_files_and_push('hg', DEST)
 
        assert ('remote: Released lock on repo `%s`' % HG_REPO) in stdout
 
        #we need to cleanup the Session Here !
 
        Session.remove()
 
        r = Repository.get_by_repo_name(HG_REPO)
 
        assert r.locked == [None, None]
 

	
 
    #TODO: fix me ! somehow during tests hooks don't get called on GIT
 
    #TODO: fix me ! somehow during tests hooks don't get called on Git
 
    def test_push_unlocks_repository_git(self):
 
        # enable locking
 
        r = Repository.get_by_repo_name(GIT_REPO)
 
        r.enable_locking = True
 
        Session().add(r)
 
        Session().commit()
 
        #clone some temp
 
        DEST = _get_tmp_dir()
 
        clone_url = _construct_url(GIT_REPO, dest=DEST)
 
        stdout, stderr = Command('/tmp').execute('git clone', clone_url)
 

	
 
        #check for lock repo after clone
production.ini
Show inline comments
 
@@ -245,25 +245,25 @@ issue_prefix = #
 
#issue_pat_wiki = (?:wiki-)(.+)
 
#issue_server_link_wiki = https://mywiki.com/{id}
 
#issue_prefix_wiki = WIKI-
 

	
 

	
 
## instance-id prefix
 
## a prefix key for this instance used for cache invalidation when running
 
## multiple instances of kallithea, make sure it's globally unique for
 
## all running kallithea instances. Leave empty if you don't use it
 
instance_id =
 

	
 
## alternative return HTTP header for failed authentication. Default HTTP
 
## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
 
## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
 
## handling that. Set this variable to 403 to return HTTPForbidden
 
auth_ret_code =
 

	
 
## locking return code. When repository is locked return this HTTP code. 2XX
 
## codes don't break the transactions while 4XX codes do
 
lock_ret_code = 423
 

	
 
## allows to change the repository location in settings page
 
allow_repo_location_change = True
 

	
 
## allows to setup custom hooks in settings page
 
allow_custom_hooks_settings = True
test.ini
Show inline comments
 
@@ -247,25 +247,25 @@ issue_prefix = #
 
#issue_pat_wiki = (?:wiki-)(.+)
 
#issue_server_link_wiki = https://mywiki.com/{id}
 
#issue_prefix_wiki = WIKI-
 

	
 

	
 
## instance-id prefix
 
## a prefix key for this instance used for cache invalidation when running
 
## multiple instances of kallithea, make sure it's globally unique for
 
## all running kallithea instances. Leave empty if you don't use it
 
instance_id =
 

	
 
## alternative return HTTP header for failed authentication. Default HTTP
 
## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
 
## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
 
## handling that. Set this variable to 403 to return HTTPForbidden
 
auth_ret_code =
 

	
 
## locking return code. When repository is locked return this HTTP code. 2XX
 
## codes don't break the transactions while 4XX codes do
 
lock_ret_code = 423
 

	
 
## allows to change the repository location in settings page
 
allow_repo_location_change = True
 

	
 
## allows to setup custom hooks in settings page
 
allow_custom_hooks_settings = True
0 comments (0 inline, 0 general)