##// END OF EJS Templates
less: fix changelog commit message flowing into the labels that are floating to the right of it...
less: fix changelog commit message flowing into the labels that are floating to the right of it For long commit messages, two texts were shown on top of each other and none of them could be read. To fix that, give the floating labels a solid white background. To avoid a hard cut-off of the commit message, use a white box-shadow to the left of the labels to give a smooth transition. To avoid the commit message flowing into the td padding to the right of the labels, make log-container hide overflow.

File last commit:

r7032:97ea346a default
r7108:ba8781f3 default
Show More
base.html
556 lines | 24.6 KiB | text/html | HtmlLexer
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 ## -*- coding: utf-8 -*-
<%inherit file="root.html"/>
<!-- CONTENT -->
domruf
templates: use a Bootstrap container for the whole #content...
r6625 <div id="content" class="container-fluid">
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 ${self.flash_msg()}
<div id="main">
${next.main()}
</div>
</div>
<!-- END CONTENT -->
<!-- FOOTER -->
domruf
less: cleanup footer navbar style...
r7008 <div class="footer navbar navbar-inverse">
Mads Kiilerich
style: Boostrap-ish markup of footers...
r6385 <span class="navbar-text pull-left">
${_('Server instance: %s') % c.instance_id if c.instance_id else ''}
</span>
<span class="navbar-text pull-right">
This site is powered by
%if c.visual.show_version:
<a class="navbar-link" href="${h.url('kallithea_project_url')}" target="_blank">Kallithea</a> ${c.kallithea_version},
%else:
<a class="navbar-link" href="${h.url('kallithea_project_url')}" target="_blank">Kallithea</a>,
%endif
which is
<a class="navbar-link" href="${h.canonical_url('about')}#copyright">&copy; 2010&ndash;2017 by various authors &amp; licensed under GPLv3</a>.
%if c.issues_url:
&ndash; <a class="navbar-link" href="${c.issues_url}" target="_blank">${_('Support')}</a>
%endif
</span>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </div>
<!-- END FOOTER -->
### MAKO DEFS ###
Thomas De Schampheleire
templates: move site branding in page title to base template...
r4845 <%block name="branding_title">
%if c.site_name:
&middot; ${c.site_name}
%endif
</%block>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 <%def name="flash_msg()">
<%include file="/base/flash_msg.html"/>
</%def>
<%def name="breadcrumbs()">
Mads Kiilerich
style: use panel, panel-heading, panel-title, panel-body and settings...
r6386 <div class="breadcrumbs panel-title">
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 ${self.breadcrumbs_links()}
</div>
</%def>
<%def name="admin_menu()">
Andrew Shadura
style: use some ARIA accessibility markup...
r5913 <ul class="dropdown-menu" role="menu">
domruf
style: remove whitespace after icons...
r7021 <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-database"></i>${_('Repositories')}</a></li>
<li><a href="${h.url('repos_groups')}"><i class="icon-folder"></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-users"></i>${_('User Groups')}</a></li>
<li><a href="${h.url('admin_permissions')}"><i class="icon-block"></i>${_('Default 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>${_('Repository Defaults')}</a></li>
<li class="last"><a href="${h.url('admin_settings')}"><i class="icon-gear"></i>${_('Settings')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </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)">
Andrew Shadura
style: use some ARIA accessibility markup...
r5913 <ul class="dropdown-menu" role="menu">
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %if repositories:
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('repos')}"><i class="icon-database"></i>${_('Repositories')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
%if repository_groups:
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('repos_groups')}"><i class="icon-folder"></i>${_('Repository Groups')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
%if user_groups:
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('users_groups')}"><i class="icon-users"></i>${_('User Groups')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
</ul>
</%def>
domruf
less: use .label and .label-* style instead of custom .*tag...
r7032 <%def name="repolabel(repo)">
Thomas De Schampheleire
summary: repeat repo type in front of clone URL...
r4976 %if h.is_hg(repo):
domruf
less: use .label and .label-* style instead of custom .*tag...
r7032 <span class="label label-repo" title="${_('Mercurial repository')}">hg</span>
Thomas De Schampheleire
summary: repeat repo type in front of clone URL...
r4976 %endif
%if h.is_git(repo):
domruf
less: use .label and .label-* style instead of custom .*tag...
r7032 <span class="label label-repo" title="${_('Git repository')}">git</span>
Thomas De Schampheleire
summary: repeat repo type in front of clone URL...
r4976 %endif
</%def>
Mads Kiilerich
repo context bar: preserve current revision when navigating between changelog, changeset and file view
r4276 <%def name="repo_context_bar(current=None, rev=None)">
<% rev = None if rev == 'tip' else rev %>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 <!--- CONTEXT BAR -->
domruf
template: use Bootstrap compatible navbar markup...
r6390 <nav id="context-bar" class="navbar navbar-inverse">
domruf
contextbar: fix navbar markup...
r6757 <div class="container-fluid">
Mads Kiilerich
template: avoid duplicate id="logo" - use "repo-logo" in the subordinate repo header
r6402 <div class="navbar-header">
domruf
template: use Bootstrap compatible navbar markup...
r6390 <div class="navbar-brand">
domruf
less: use .label and .label-* style instead of custom .*tag...
r7032 ${repolabel(c.db_repo)}
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187
## public/private
Bradley M. Kuhn
Rename rhodecode_db_repo to db_repo - it stores db repo abstractions
r4195 %if c.db_repo.private:
Sean Farley
icon-lock: use icon-keyhole-circled instead of lock for private repos...
r4602 <i class="icon-keyhole-circled"></i>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %else:
Sean Farley
icon-lock-open-alt: use icon-globe to signify public repo...
r4601 <i class="icon-globe"></i>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
domruf
templates: get rid of repo_breadcrumbs...
r6212 %for group in c.db_repo.groups_with_parents:
domruf
template: use Bootstrap compatible navbar markup...
r6390 ${h.link_to(group.name, url('repos_group_home', group_name=group.group_name), class_='navbar-link')}
domruf
templates: get rid of repo_breadcrumbs...
r6212 &raquo;
%endfor
domruf
template: use Bootstrap compatible navbar markup...
r6390 ${h.link_to(c.db_repo.just_name, url('summary_home', repo_name=c.db_repo.repo_name), class_='navbar-link')}
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187
%if current == 'createfork':
Na'Tosha Bard
Correct capitalization and improved English text in the UI
r4527 - ${_('Create Fork')}
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
domruf
template: use Bootstrap compatible navbar markup...
r6390 </div>
Mads Kiilerich
style: introduce Bootstrap navbar-toggle markup for the repository navbar...
r6446 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#context-pages" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
domruf
template: use Bootstrap compatible navbar markup...
r6390 </div>
domruf
contextbar: fix navbar markup...
r6757 <div id="context-pages" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
domruf
style: remove whitespace after icons...
r7021 <li class="${'active' if current == 'summary' else ''}" data-context="summary"><a href="${h.url('summary_home', repo_name=c.repo_name)}"><i class="icon-doc-text"></i>${_('Summary')}</a></li>
Mads Kiilerich
repo context bar: preserve current revision when navigating between changelog, changeset and file view
r4276 %if rev:
domruf
style: remove whitespace after icons...
r7021 <li class="${'active' if current == 'changelog' else ''}" data-context="changelog"><a href="${h.url('changelog_file_home', repo_name=c.repo_name, revision=rev, f_path='')}"><i class="icon-clock"></i>${_('Changelog')}</a></li>
Mads Kiilerich
repo context bar: preserve current revision when navigating between changelog, changeset and file view
r4276 %else:
domruf
style: remove whitespace after icons...
r7021 <li class="${'active' if current == 'changelog' else ''}" data-context="changelog"><a href="${h.url('changelog_home', repo_name=c.repo_name)}"><i class="icon-clock"></i>${_('Changelog')}</a></li>
Mads Kiilerich
repo context bar: preserve current revision when navigating between changelog, changeset and file view
r4276 %endif
domruf
style: remove whitespace after icons...
r7021 <li class="${'active' if current == 'files' else ''}" data-context="files"><a href="${h.url('files_home', repo_name=c.repo_name, revision=rev or 'tip')}"><i class="icon-doc-inv"></i>${_('Files')}</a></li>
domruf
templates: change the order of Pull Requests and Options in context bar...
r7023 <li class="${'active' if current == 'showpullrequest' else ''}" data-context="showpullrequest">
<a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests for %s') % c.repo_name}"> <i class="icon-git-pull-request"></i>${_('Pull Requests')}
%if c.repository_pull_requests:
<span class="badge">${c.repository_pull_requests}</span>
%endif
</a>
</li>
domruf
template: use Bootstrap compatible navbar markup...
r6390 <li class="${'active' if current == 'switch-to' else ''}" data-context="switch-to">
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572 <input id="branch_switcher" name="branch_switcher" type="hidden">
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </li>
domruf
template: use Bootstrap compatible navbar markup...
r6390 <li class="${'active' if current == 'options' else ''} dropdown" data-context="options">
Søren Løvborg
auth: simplify repository permission checks...
r6471 %if h.HasRepoPermissionLevel('admin')(c.repo_name):
domruf
style: remove whitespace after icons...
r7021 <a href="${h.url('edit_repo',repo_name=c.repo_name)}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true"><i class="icon-wrench"></i>${_('Options')} <i class="caret"></i></a>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %else:
domruf
style: remove whitespace after icons...
r7021 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true"><i class="icon-wrench"></i>${_('Options')} <i class="caret"></i></a>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
Mads Kiilerich
templates: fix aria markup from 24a0c176a63d...
r6387 <ul class="dropdown-menu" role="menu" aria-hidden="true">
Søren Løvborg
auth: simplify repository permission checks...
r6471 %if h.HasRepoPermissionLevel('admin')(c.repo_name):
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('edit_repo',repo_name=c.repo_name)}"><i class="icon-gear"></i>${_('Settings')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
Bradley M. Kuhn
Rename rhodecode_db_repo to db_repo - it stores db repo abstractions
r4195 %if c.db_repo.fork:
Mads Kiilerich
compare: consistent naming: _ref is a tuple, _ref_type is the type, _ref_name is symbolic name, _rev is the revision
r4291 <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)}">
domruf
style: remove whitespace after icons...
r7021 <i class="icon-git-compare"></i>${_('Compare Fork')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('compare_home',repo_name=c.repo_name)}"><i class="icon-git-compare"></i>${_('Compare')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('search_repo',repo_name=c.repo_name)}"><i class="icon-search"></i>${_('Search')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187
Søren Løvborg
auth: simplify repository permission checks...
r6471 %if h.HasRepoPermissionLevel('write')(c.repo_name) and c.db_repo.enable_locking:
Bradley M. Kuhn
Rename rhodecode_db_repo to db_repo - it stores db repo abstractions
r4195 %if c.db_repo.locked[0]:
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('toggle_locking', repo_name=c.repo_name)}"><i class="icon-lock"></i>${_('Unlock')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %else:
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('toggle_locking', repo_name=c.repo_name)}"><i class="icon-lock-open-alt"></i>${_('Lock')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
%endif
## TODO: this check feels wrong, it would be better to have a check for permissions
## also it feels like a job for the controller
Mads Kiilerich
controllers: avoid setting request state in controller instances - set it in the thread global request variable...
r6412 %if request.authuser.username != 'default':
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 <li>
domruf
template: use Bootstrap compatible navbar markup...
r6390 <a href="#" class="${'following' if c.repository_following else 'follow'}" onclick="toggleFollowingRepo(this, ${c.db_repo.repo_id});">
domruf
style: remove whitespace after icons...
r7021 <span class="show-follow"><i class="icon-heart-empty"></i>${_('Follow')}</span>
<span class="show-following"><i class="icon-heart"></i>${_('Unfollow')}</span>
Mads Kiilerich
follow: various minor cleanup...
r5436 </a>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </li>
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}"><i class="icon-git-pull-request"></i>${_('Fork')}</a></li>
<li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}"><i class="icon-git-pull-request"></i>${_('Create Pull Request')}</a></li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
</ul>
</li>
domruf
template: use Bootstrap compatible navbar markup...
r6390 </ul>
domruf
contextbar: fix navbar markup...
r6757 </div>
</div>
domruf
template: use Bootstrap compatible navbar markup...
r6390 </nav>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 <script type="text/javascript">
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572 $(document).ready(function() {
var bcache = {};
$("#branch_switcher").select2({
domruf
style: remove whitespace after icons...
r7021 placeholder: '<i class="icon-exchange"></i>' + ${h.jshtml(_('Switch To'))} + ' <span class="caret"></span>',
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572 dropdownAutoWidth: true,
sortResults: prefixFirstSort,
formatResult: function(obj) {
return obj.text;
},
formatSelection: function(obj) {
return obj.text;
},
formatNoMatches: function(term) {
Søren Løvborg
templates: properly escape inline JavaScript values...
r6492 return ${h.jshtml(_('No matches found'))};
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572 },
escapeMarkup: function(m) {
// don't escape our custom placeholder
Mads Kiilerich
style: various minor-ish markup changes, preparing for Bootstrap
r6611 if (m.substr(0, 25) == '<i class="icon-exchange">') {
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572 return m;
}
return Select2.util.escapeMarkup(m);
},
domruf
template: use Bootstrap compatible navbar markup...
r6390 containerCssClass: "branch-switcher",
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572 dropdownCssClass: "repo-switcher-dropdown",
query: function(query) {
var key = 'cache';
var cached = bcache[key];
if (cached) {
var data = {
results: []
};
// filter results
$.each(cached.results, function() {
var section = this.text;
var children = [];
$.each(this.children, function() {
if (query.term.length === 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0) {
children.push({
'id': this.id,
'text': this.text,
'type': this.type,
'obj': this.obj
});
}
});
if (children.length !== 0) {
data.results.push({
'text': section,
'children': children
});
}
});
query.callback(data);
} else {
$.ajax({
url: pyroutes.url('repo_refs_data', {
Søren Løvborg
templates: properly escape inline JavaScript values...
r6492 'repo_name': ${h.js(c.repo_name)}
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572 }),
data: {},
dataType: 'json',
type: 'GET',
success: function(data) {
bcache[key] = data;
query.callback(data);
}
});
}
}
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 });
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572
$("#branch_switcher").on('select2-selecting', function(e) {
e.preventDefault();
domruf
template: use Bootstrap compatible navbar markup...
r6390 var context = $('#context-bar .active').data('context');
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572 if (context == 'files') {
window.location = pyroutes.url('files_home', {
'repo_name': REPO_NAME,
'revision': e.choice.id,
'f_path': '',
'at': e.choice.text
});
Takumi IINO
select2: make "Switch To" switch to changelog view everywhere, except in Files context...
r5573 } else if (context == 'changelog') {
if (e.choice.type == 'tag' || e.choice.type == 'book') {
Mads Kiilerich
js: workaround to avoid <option> tags inside <script>...
r5957 $("#branch_filter").append($('<'+'option/>').val(e.choice.text));
Takumi IINO
select2: make "Switch To" switch to changelog view everywhere, except in Files context...
r5573 }
$("#branch_filter").val(e.choice.text).change();
} else {
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572 window.location = pyroutes.url('changelog_home', {
Søren Løvborg
templates: properly escape inline JavaScript values...
r6492 'repo_name': ${h.js(c.repo_name)},
Ante Ilic
menu: Added select2 box for "Switch To", work towards having general revision context...
r5572 'branch': e.choice.text
});
}
});
});
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </script>
<!--- END CONTEXT BAR -->
</%def>
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 <%def name="menu(current=None)">
domruf
template: use Bootstrap compatible navbar markup...
r6390 <ul id="quick" class="nav navbar-nav navbar-right">
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 <!-- repo switcher -->
domruf
template: use Bootstrap compatible navbar markup...
r6390 <li class="${'active' if current == 'repositories' else ''}">
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 <input id="repo_switcher" name="repo_switcher" type="hidden">
</li>
##ROOT MENU
Mads Kiilerich
controllers: avoid setting request state in controller instances - set it in the thread global request variable...
r6412 %if request.authuser.username != 'default':
domruf
template: use Bootstrap compatible navbar markup...
r6390 <li class="${'active' if current == 'journal' else ''}">
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 <a class="menu_link" title="${_('Show recent activity')}" href="${h.url('journal')}">
domruf
style: remove whitespace after icons...
r7021 <i class="icon-book"></i>${_('Journal')}
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 </a>
</li>
%else:
domruf
template: use Bootstrap compatible navbar markup...
r6390 <li class="${'active' if current == 'journal' else ''}">
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 <a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}">
domruf
style: remove whitespace after icons...
r7021 <i class="icon-book"></i>${_('Public journal')}
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 </a>
</li>
%endif
domruf
template: use Bootstrap compatible navbar markup...
r6390 <li class="${'active' if current == 'gists' else ''} dropdown">
Andrew Shadura
style: use some ARIA accessibility markup...
r5913 <a class="menu_link dropdown-toggle" data-toggle="dropdown" role="button" title="${_('Show public gists')}" href="${h.url('gists')}">
domruf
style: remove whitespace after icons...
r7021 <i class="icon-clippy"></i>${_('Gists')} <span class="caret"></span>
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 </a>
Andrew Shadura
style: use some ARIA accessibility markup...
r5913 <ul class="dropdown-menu" role="menu">
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('new_gist', public=1)}"><i class="icon-paste"></i>${_('Create New Gist')}</a></li>
<li><a href="${h.url('gists')}"><i class="icon-globe"></i>${_('All Public Gists')}</a></li>
Mads Kiilerich
controllers: avoid setting request state in controller instances - set it in the thread global request variable...
r6412 %if request.authuser.username != 'default':
domruf
style: remove whitespace after icons...
r7021 <li><a href="${h.url('gists', public=1)}"><i class="icon-user"></i>${_('My Public Gists')}</a></li>
<li><a href="${h.url('gists', private=1)}"><i class="icon-keyhole-circled"></i>${_('My Private Gists')}</a></li>
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 %endif
</ul>
</li>
domruf
template: use Bootstrap compatible navbar markup...
r6390 <li class="${'active' if current == 'search' else ''}">
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 <a class="menu_link" title="${_('Search in repositories')}" href="${h.url('search')}">
domruf
style: remove whitespace after icons...
r7021 <i class="icon-search"></i>${_('Search')}
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 </a>
</li>
Søren Løvborg
auth: remove HasPermissionAll and variants...
r6026 % if h.HasPermissionAny('hg.admin')('access admin main page'):
domruf
template: use Bootstrap compatible navbar markup...
r6390 <li class="${'active' if current == 'admin' else ''} dropdown">
Andrew Shadura
style: use some ARIA accessibility markup...
r5913 <a class="menu_link dropdown-toggle" data-toggle="dropdown" role="button" title="${_('Admin')}" href="${h.url('admin_home')}">
domruf
style: remove whitespace after icons...
r7021 <i class="icon-gear"></i>${_('Admin')} <span class="caret"></span>
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 </a>
${admin_menu()}
</li>
Mads Kiilerich
controllers: avoid setting request state in controller instances - set it in the thread global request variable...
r6412 % elif request.authuser.repositories_admin or request.authuser.repository_groups_admin or request.authuser.user_groups_admin:
domruf
template: use Bootstrap compatible navbar markup...
r6390 <li class="${'active' if current == 'admin' else ''} dropdown">
Mads Kiilerich
base: fix tabbing to navbar links - Chrome requires the <a> to have a href
r6973 <a class="menu_link dropdown-toggle" data-toggle="dropdown" role="button" title="${_('Admin')}" href="">
domruf
style: remove whitespace after icons...
r7021 <i class="icon-gear"></i>${_('Admin')}
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 </a>
Mads Kiilerich
controllers: avoid setting request state in controller instances - set it in the thread global request variable...
r6412 ${admin_menu_simple(request.authuser.repositories_admin,
request.authuser.repository_groups_admin,
request.authuser.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 </li>
% endif
domruf
template: use Bootstrap compatible navbar markup...
r6390 <li class="${'active' if current == 'my_pullrequests' else ''}">
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 <a class="menu_link" title="${_('My Pull Requests')}" href="${h.url('my_pullrequests')}">
domruf
style: remove whitespace after icons...
r7021 <i class="icon-git-pull-request"></i>${_('My Pull Requests')}
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 %if c.my_pr_count != 0:
Andrew Shadura
style: make markup more Bootstrap-compatible...
r5912 <span class="badge">${c.my_pr_count}</span>
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 %endif
</a>
</li>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 ## USER MENU
Andrew Shadura
style: make markup more Bootstrap-compatible...
r5912 <li class="dropdown">
Andrew Shadura
style: use some ARIA accessibility markup...
r5913 <a class="menu_link dropdown-toggle" data-toggle="dropdown" role="button" id="quick_login_link"
Andrew Shadura
templates: add ARIA markup to dropdown menus...
r6209 aria-expanded="false" aria-controls="quick_login"
Mads Kiilerich
controllers: avoid setting request state in controller instances - set it in the thread global request variable...
r6412 %if request.authuser.username != 'default':
Søren Løvborg
design: make top-right profile button into an actual link...
r5659 href="${h.url('notifications')}"
Andrew Shadura
templates: assign a dummy href to a button to enable keyboard navigation...
r6210 %else:
href="#"
Søren Løvborg
design: make top-right profile button into an actual link...
r5659 %endif
>
Mads Kiilerich
controllers: avoid setting request state in controller instances - set it in the thread global request variable...
r6412 ${h.gravatar_div(request.authuser.email, size=20, div_class="icon")}
%if request.authuser.username != 'default':
<span class="menu_link_user">${request.authuser.username}</span>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %if c.unread_notifications != 0:
Andrew Shadura
style: make markup more Bootstrap-compatible...
r5912 <span class="badge">${c.unread_notifications}</span>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
%else:
Na'Tosha Bard
Correct capitalization and improved English text in the UI
r4527 <span>${_('Not Logged In')}</span>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 %endif
domruf
navbar: use Bootstrap 'caret' class instead of our own 'navbar-caret'...
r6778 <i class="caret"></i>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </a>
domruf
template: use Bootstrap compatible navbar markup...
r6390 <div class="dropdown-menu user-menu" role="menu">
<div id="quick_login" role="form" aria-describedby="quick_login_h" aria-hidden="true" class="container-fluid">
Mads Kiilerich
controllers: avoid setting request state in controller instances - set it in the thread global request variable...
r6412 %if request.authuser.username == 'default' or request.authuser.user_id is None:
Mads Kiilerich
style: fix weird styling of quick login
r6488 ${h.form(h.url('login_home', came_from=request.path_qs), class_='form clearfix')}
<h4 id="quick_login_h">${_('Login to Your Account')}</h4>
<label>
${_('Username')}:
${h.text('username',class_='form-control')}
</label>
<label>
${_('Password')}:
${h.password('password',class_='form-control')}
</label>
<div class="password_forgotten">
${h.link_to(_('Forgot password?'),h.url('reset_password'))}
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </div>
Mads Kiilerich
style: fix weird styling of quick login
r6488 <div class="register">
%if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
${h.link_to(_("Don't have an account?"),h.url('register'))}
%endif
</div>
<div class="submit">
${h.submit('sign_in',_('Log In'),class_="btn btn-default btn-xs")}
</div>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 ${h.end_form()}
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 %else:
domruf
template: use Bootstrap compatible navbar markup...
r6390 <div class="pull-left">
Mads Kiilerich
controllers: avoid setting request state in controller instances - set it in the thread global request variable...
r6412 ${h.gravatar_div(request.authuser.email, size=48, div_class="big_gravatar")}
<b class="full_name">${request.authuser.full_name_or_username}</b>
<div class="email">${request.authuser.email}</div>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </div>
Mads Kiilerich
template: restore aria-describedby fix from ac03ae060ca0 that was lost in 8bd7a637cea0
r6400 <div id="quick_login_h" class="pull-right list-group text-right">
domruf
template: use Bootstrap compatible navbar markup...
r6390 <a class="list-group-item" href="${h.url('notifications')}">${_('Notifications')}: ${c.unread_notifications}</a>
${h.link_to(_('My Account'),h.url('my_account'),class_='list-group-item')}
Mads Kiilerich
controllers: avoid setting request state in controller instances - set it in the thread global request variable...
r6412 %if not request.authuser.is_external_auth:
Søren Løvborg
BaseController: hide "Log out" link for external login sessions...
r5266 ## Cannot log out if using external (container) authentication.
domruf
template: use Bootstrap compatible navbar markup...
r6390 ${h.link_to(_('Log Out'), h.url('logout_home'),class_='list-group-item')}
Søren Løvborg
BaseController: hide "Log out" link for external login sessions...
r5266 %endif
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </div>
Mads Kiilerich
pull requests: add new "my" page, separate from "my account" and prominently shown in the page headers
r4281 %endif
</div>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </div>
</li>
Mads Kiilerich
templates: fix missing / superfluous close tags
r6358 </ul>
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187
<script type="text/javascript">
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 $(document).ready(function(){
Søren Løvborg
templates: properly escape inline JavaScript values...
r6492 var visual_show_public_icon = ${h.js(c.visual.show_public_icon)};
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 var cache = {}
/*format the look of items in the list*/
var format = function(state){
if (!state.id){
return state.text; // optgroup
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 }
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 var obj_dict = state.obj;
var tmpl = '';
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 if(obj_dict && state.type == 'repo'){
tmpl += '<span class="repo-icons">';
if(obj_dict['repo_type'] === 'hg'){
domruf
less: use .label and .label-* style instead of custom .*tag...
r7032 tmpl += '<span class="label label-repo" title="${_('Mercurial repository')}">hg</span> ';
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 }
else if(obj_dict['repo_type'] === 'git'){
domruf
less: use .label and .label-* style instead of custom .*tag...
r7032 tmpl += '<span class="label label-repo" title="${_('Git repository')}">git</span> ';
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 }
if(obj_dict['private']){
domruf
style: remove whitespace after icons...
r7021 tmpl += '<i class="icon-keyhole-circled"></i>';
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 }
else if(visual_show_public_icon){
domruf
style: remove whitespace after icons...
r7021 tmpl += '<i class="icon-globe"></i>';
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 }
tmpl += '</span>';
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 }
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 if(obj_dict && state.type == 'group'){
domruf
style: remove whitespace after icons...
r7021 tmpl += '<i class="icon-folder"></i>';
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 }
tmpl += state.text;
return tmpl;
}
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 $("#repo_switcher").select2({
domruf
style: remove whitespace after icons...
r7021 placeholder: '<i class="icon-database"></i>' + ${h.jshtml(_('Repositories'))} + ' <span class="caret"></span>',
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 dropdownAutoWidth: true,
Takumi IINO
select2: show prefix matches first in #repo-switcher...
r5571 sortResults: prefixFirstSort,
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 formatResult: format,
formatSelection: format,
formatNoMatches: function(term){
Søren Løvborg
templates: properly escape inline JavaScript values...
r6492 return ${h.jshtml(_('No matches found'))};
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 },
containerCssClass: "repo-switcher",
dropdownCssClass: "repo-switcher-dropdown",
escapeMarkup: function(m){
// don't escape our custom placeholder
Mads Kiilerich
style: various minor-ish markup changes, preparing for Bootstrap
r6611 if(m.substr(0,29) == '<i class="icon-database"></i>'){
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 return m;
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 }
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 return Select2.util.escapeMarkup(m);
},
query: function(query){
var key = 'cache';
var cached = cache[key] ;
if(cached) {
var data = {results: []};
//filter results
$.each(cached.results, function(){
var section = this.text;
var children = [];
$.each(this.children, function(){
if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){
children.push({'id': this.id, 'text': this.text, 'type': this.type, 'obj': this.obj});
}
});
if(children.length !== 0){
data.results.push({'text': section, 'children': children});
}
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 });
query.callback(data);
}else{
$.ajax({
Søren Løvborg
templates: properly escape inline JavaScript values...
r6492 url: ${h.js(h.url('repo_switcher_data'))},
Takumi IINO
js: wrap repo_switcher setup code in $(document).ready...
r5562 data: {},
dataType: 'json',
type: 'GET',
success: function(data) {
cache[key] = data;
query.callback({results: data.results});
}
});
}
}
});
$("#repo_switcher").on('select2-selecting', function(e){
e.preventDefault();
window.location = pyroutes.url('summary_home', {'repo_name': e.val});
});
Andrew Shadura
templates: add ARIA markup to dropdown menus...
r6209
$(document).on('shown.bs.dropdown', function(event) {
var dropdown = $(event.target);
dropdown.attr('aria-expanded', true);
dropdown.find('.dropdown-menu').attr('aria-hidden', false);
});
$(document).on('hidden.bs.dropdown', function(event) {
var dropdown = $(event.target);
dropdown.attr('aria-expanded', false);
dropdown.find('.dropdown-menu').attr('aria-hidden', true);
});
Mads Kiilerich
javascript: add missing semicolons
r5151 });
Bradley M. Kuhn
Second step in two-part process to rename directories....
r4187 </script>
</%def>
domruf
changeset: make parent/child navigation activation and javascript reusable...
r6865
<%def name="parent_child_navigation()">
domruf
js: reuse parent/child navigation code - avoid duplication...
r6868 <div class="pull-left">
<div class="parent-child-link"
domruf
changeset: make parent/child navigation activation and javascript reusable...
r6865 data-ajax-url="${h.url('changeset_parents',repo_name=c.repo_name, revision=c.changeset.raw_id)}"
domruf
js: make links to child changesets use a right arrow again...
r6887 data-linktype="parent"
domruf
changeset: make parent/child navigation activation and javascript reusable...
r6865 data-reponame="${c.repo_name}">
domruf
style: remove whitespace after icons...
r7021 <i class="icon-left-open"></i><a href="#">${_('Parent rev.')}</a>
domruf
changeset: make parent/child navigation activation and javascript reusable...
r6865 </div>
</div>
domruf
js: reuse parent/child navigation code - avoid duplication...
r6868 <div class="pull-right">
<div class="parent-child-link"
domruf
changeset: make parent/child navigation activation and javascript reusable...
r6865 data-ajax-url="${h.url('changeset_children',repo_name=c.repo_name, revision=c.changeset.raw_id)}"
domruf
js: make links to child changesets use a right arrow again...
r6887 data-linktype="child"
domruf
changeset: make parent/child navigation activation and javascript reusable...
r6865 data-reponame="${c.repo_name}">
domruf
style: remove whitespace after icons...
r7021 <a href="#">${_('Child rev.')}</a><i class="icon-right-open"></i>
domruf
changeset: make parent/child navigation activation and javascript reusable...
r6865 </div>
</div>
<script type="text/javascript">
$(document).ready(function(){
activate_parent_child_links();
});
</script>
</%def>