##// END OF EJS Templates
add: change label for adding a repo group inside another one
add: change label for adding a repo group inside another one

File last commit:

r3688:6cb3efb6 new-ui
r3688:6cb3efb6 new-ui
Show More
base.mako
963 lines | 37.8 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 ## -*- coding: utf-8 -*-
<%inherit file="root.mako"/>
default-reviewers: introduce new voting rule logic that allows...
r2484 <%include file="/ejs_templates/templates.html"/>
templating: use .mako as extensions for template files.
r1282 <div class="outerwrapper">
<!-- HEADER -->
<div class="header">
<div id="header-inner" class="wrapper">
<div id="logo">
<div class="logo-wrapper">
ui: reduce logo size
r3541 <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-60x60.png')}" alt="RhodeCode"/></a>
templating: use .mako as extensions for template files.
r1282 </div>
dan
ui: fixed branding look&feel as per discussions.
r3543 % if c.rhodecode_name:
<div class="branding">
<a href="${h.route_path('home')}">${h.branding(c.rhodecode_name)}</a>
</div>
% endif
templating: use .mako as extensions for template files.
r1282 </div>
<!-- MENU BAR NAV -->
${self.menu_bar_nav()}
<!-- END MENU BAR NAV -->
</div>
</div>
${self.menu_bar_subnav()}
<!-- END HEADER -->
<!-- CONTENT -->
<div id="content" class="wrapper">
notifications: different approach with fixed/standard container
r1483
<rhodecode-toast id="notifications"></rhodecode-toast>
templating: use .mako as extensions for template files.
r1282 <div class="main">
${next.main()}
</div>
</div>
<!-- END CONTENT -->
</div>
<!-- FOOTER -->
<div id="footer">
<div id="footer-inner" class="title wrapper">
<div>
<p class="footer-link-right">
% if c.visual.show_version:
RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition}
% endif
routing: switched static redirection links to pyramid....
r1679 &copy; 2010-${h.datetime.today().year}, <a href="${h.route_url('rhodecode_official')}" target="_blank">RhodeCode GmbH</a>. All rights reserved.
templating: use .mako as extensions for template files.
r1282 % if c.visual.rhodecode_support_url:
<a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
% endif
</p>
<% sid = 'block' if request.GET.get('showrcid') else 'none' %>
<p class="server-instance" style="display:${sid}">
## display hidden instance ID if specially defined
% if c.rhodecode_instanceid:
dan
ui: introduce user-bookmarks for creation of quick shortcuts
r3424 ${_('RhodeCode instance id: {}').format(c.rhodecode_instanceid)}
templating: use .mako as extensions for template files.
r1282 % endif
</p>
</div>
</div>
</div>
<!-- END FOOTER -->
### MAKO DEFS ###
<%def name="menu_bar_subnav()">
</%def>
<%def name="breadcrumbs(class_='breadcrumbs')">
<div class="${class_}">
${self.breadcrumbs_links()}
</div>
</%def>
ui: navigation, fixed wrapping of new admin navigation items
r3566 <%def name="admin_menu(active=None)">
admin menu: cleanup case conditions
r3586 <%
def is_active(selected):
if selected == active:
return "active"
%>
ui: navigation, fixed wrapping of new admin navigation items
r3566 <div id="context-bar">
<div class="wrapper">
Liviu
Multiple changes for the navigation and buttons
r3570 <div class="title">
<div class="title-content">
<div class="title-main">
base: fixed admin panel title for super admins
r3597 % if c.is_super_admin:
admin menu: cleanup case conditions
r3586 ${_('Super Admin Panel')}
% else:
${_('Delegated Admin Panel')}
% endif
Liviu
Multiple changes for the navigation and buttons
r3570 </div>
</div>
</div>
admin menu: cleanup case conditions
r3586 <ul id="context-pages" class="navigation horizontal-list">
ui: added admin nav into admin pages
r3564 ## super admin case
auth: reduced usage of raw auth calls inside templates
r3587 % if c.is_super_admin:
ui: navigation, fixed wrapping of new admin navigation items
r3566 <li class="${is_active('audit_logs')}"><a href="${h.route_path('admin_audit_logs')}">${_('Admin audit logs')}</a></li>
<li class="${is_active('repositories')}"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li>
<li class="${is_active('repository_groups')}"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
<li class="${is_active('users')}"><a href="${h.route_path('users')}">${_('Users')}</a></li>
<li class="${is_active('user_groups')}"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
<li class="${is_active('permissions')}"><a href="${h.route_path('admin_permissions_application')}">${_('Permissions')}</a></li>
<li class="${is_active('authentication')}"><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li>
<li class="${is_active('integrations')}"><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li>
<li class="${is_active('defaults')}"><a href="${h.route_path('admin_defaults_repositories')}">${_('Defaults')}</a></li>
<li class="${is_active('settings')}"><a href="${h.route_path('admin_settings')}">${_('Settings')}</a></li>
ui: added admin nav into admin pages
r3564
## delegated admin
auth: reduced usage of raw auth calls inside templates
r3587 % elif c.is_delegated_admin:
<%
repositories=c.auth_user.repositories_admin or c.can_create_repo
repository_groups=c.auth_user.repository_groups_admin or c.can_create_repo_group
user_groups=c.auth_user.user_groups_admin or c.can_create_user_group
%>
ui: added admin nav into admin pages
r3564 %if repositories:
ui: navigation, fixed wrapping of new admin navigation items
r3566 <li class="${is_active('repositories')} local-admin-repos"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li>
ui: added admin nav into admin pages
r3564 %endif
%if repository_groups:
ui: navigation, fixed wrapping of new admin navigation items
r3566 <li class="${is_active('repository_groups')} local-admin-repo-groups"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
ui: added admin nav into admin pages
r3564 %endif
%if user_groups:
ui: navigation, fixed wrapping of new admin navigation items
r3566 <li class="${is_active('user_groups')} local-admin-user-groups"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
ui: added admin nav into admin pages
r3564 %endif
% endif
</ul>
admin menu: cleanup case conditions
r3586
ui: navigation, fixed wrapping of new admin navigation items
r3566 </div>
<div class="clear"></div>
</div>
templating: use .mako as extensions for template files.
r1282 </%def>
<%def name="dt_info_panel(elements)">
<dl class="dl-horizontal">
%for dt, dd, title, show_items in elements:
<dt>${dt}:</dt>
dan
tooltip: use consistent h.tooltip usage to set tooltips.
r1843 <dd title="${h.tooltip(title)}">
templating: use .mako as extensions for template files.
r1282 %if callable(dd):
## allow lazy evaluation of elements
${dd()}
%else:
${dd}
%endif
%if show_items:
<span class="btn-collapse" data-toggle="item-${h.md5_safe(dt)[:6]}-details">${_('Show More')} </span>
%endif
</dd>
%if show_items:
<div class="collapsable-content" data-toggle="item-${h.md5_safe(dt)[:6]}-details" style="display: none">
%for item in show_items:
<dt></dt>
<dd>${item}</dd>
%endfor
</div>
%endif
%endfor
</dl>
</%def>
<%def name="gravatar(email, size=16)">
<%
if (size > 16):
gravatar_class = 'gravatar gravatar-large'
else:
gravatar_class = 'gravatar'
%>
<%doc>
TODO: johbo: For now we serve double size images to make it smooth
for retina. This is how it worked until now. Should be replaced
with a better solution at some point.
</%doc>
<img class="${gravatar_class}" src="${h.gravatar_url(email, size * 2)}" height="${size}" width="${size}">
</%def>
<%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
<% email = h.email_or_none(contact) %>
dan
tooltip: use consistent h.tooltip usage to set tooltips.
r1843 <div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}">
templating: use .mako as extensions for template files.
r1282 ${self.gravatar(email, size)}
<span class="${'user user-disabled' if show_disabled else 'user'}"> ${h.link_to_user(contact)}</span>
</div>
</%def>
<%def name="repo_page_title(repo_instance)">
summary: move the RSS button to the right pane of repo name
r3666 <div class="title-content repo-title">
add: change label for adding a repo group inside another one
r3688
templating: use .mako as extensions for template files.
r1282 <div class="title-main">
## SVN/HG/GIT icons
%if h.is_hg(repo_instance):
<i class="icon-hg"></i>
%endif
%if h.is_git(repo_instance):
<i class="icon-git"></i>
%endif
%if h.is_svn(repo_instance):
<i class="icon-svn"></i>
%endif
## public/private
%if repo_instance.private:
<i class="icon-repo-private"></i>
%else:
<i class="icon-repo-public"></i>
%endif
## repo name with group name
dan
search: new UI for search, and repo group context search...
r3442 ${h.breadcrumb_repo_link(repo_instance)}
templating: use .mako as extensions for template files.
r1282
summary: move the RSS button to the right pane of repo name
r3666 ## Context Actions
<div class="pull-right">
%if c.rhodecode_user.username != h.DEFAULT_USER:
<a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name, _query=dict(auth_token=c.rhodecode_user.feed_token))}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a>
repositories: bring back watch action in summary view
r3670
<a href="#WatchRepo" onclick="toggleFollowingRepo(this, templateContext.repo_id); return false" title="${_('Watch this Repository and actions on it in your personalized journal')}" class="btn btn-sm ${('watching' if c.repository_is_user_following else '')}">
% if c.repository_is_user_following:
icons: updated iconography and fontello configuration
r3680 <i class="icon-eye-off"></i>${_('Unwatch')}
repositories: bring back watch action in summary view
r3670 % else:
icons: updated iconography and fontello configuration
r3680 <i class="icon-eye"></i>${_('Watch')}
repositories: bring back watch action in summary view
r3670 % endif
</a>
summary: move the RSS button to the right pane of repo name
r3666 %else:
<a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a>
%endif
</div>
templating: use .mako as extensions for template files.
r1282 </div>
## FORKED
%if repo_instance.fork:
Liviu
Multiple changes for the navigation and buttons
r3570 <p class="discreet">
templating: use .mako as extensions for template files.
r1282 <i class="icon-code-fork"></i> ${_('Fork of')}
forks: don't expose fork link if we don't have permission to read it, and also don't pre-select in pull request.
r3367 ${h.link_to_if(c.has_origin_repo_read_perm,repo_instance.fork.repo_name, h.route_path('repo_summary', repo_name=repo_instance.fork.repo_name))}
templating: use .mako as extensions for template files.
r1282 </p>
%endif
## IMPORTED FROM REMOTE
%if repo_instance.clone_uri:
Liviu
Multiple changes for the navigation and buttons
r3570 <p class="discreet">
templating: use .mako as extensions for template files.
r1282 <i class="icon-code-fork"></i> ${_('Clone from')}
routing: don't use pylons url() in base to generate clone url....
r2306 <a href="${h.safe_str(h.hide_credentials(repo_instance.clone_uri))}">${h.hide_credentials(repo_instance.clone_uri)}</a>
templating: use .mako as extensions for template files.
r1282 </p>
%endif
## LOCKING STATUS
%if repo_instance.locked[0]:
Liviu
Multiple changes for the navigation and buttons
r3570 <p class="locking_locked discreet">
templating: use .mako as extensions for template files.
r1282 <i class="icon-repo-lock"></i>
${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}}
</p>
%elif repo_instance.enable_locking:
Liviu
Multiple changes for the navigation and buttons
r3570 <p class="locking_unlocked discreet">
templating: use .mako as extensions for template files.
r1282 <i class="icon-repo-unlock"></i>
${_('Repository not locked. Pull repository to lock it.')}
</p>
%endif
</div>
</%def>
<%def name="repo_menu(active=None)">
<%
def is_active(selected):
if selected == active:
return "active"
%>
ui: navigation, fixed wrapping of new admin navigation items
r3566 <!--- REPO CONTEXT BAR -->
templating: use .mako as extensions for template files.
r1282 <div id="context-bar">
<div class="wrapper">
Liviu
ui: start of new UI branch
r3559
<div class="title">
${self.repo_page_title(c.rhodecode_db_repo)}
</div>
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 <ul id="context-pages" class="navigation horizontal-list">
repo-summary: re-implemented summary view as pyramid....
r1785 <li class="${is_active('summary')}"><a class="menulink" href="${h.route_path('repo_summary', repo_name=c.repo_name)}"><div class="menulabel">${_('Summary')}</div></a></li>
changelog: ported to pyramid views.
r1931 <li class="${is_active('changelog')}"><a class="menulink" href="${h.route_path('repo_changelog', repo_name=c.repo_name)}"><div class="menulabel">${_('Changelog')}</div></a></li>
files: ported repository files controllers to pyramid views.
r1927 <li class="${is_active('files')}"><a class="menulink" href="${h.route_path('repo_files', repo_name=c.repo_name, commit_id=c.rhodecode_db_repo.landing_rev[1], f_path='')}"><div class="menulabel">${_('Files')}</div></a></li>
compare: migrated code from pylons to pyramid views.
r1957 <li class="${is_active('compare')}"><a class="menulink" href="${h.route_path('repo_compare_select',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a></li>
ui: expose search as a visible option for repositories.
r3440
templating: use .mako as extensions for template files.
r1282 ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()"
%if c.rhodecode_db_repo.repo_type in ['git','hg']:
<li class="${is_active('showpullrequest')}">
dan
tooltip: use consistent h.tooltip usage to set tooltips.
r1843 <a class="menulink" href="${h.route_path('pullrequest_show_all', repo_name=c.repo_name)}" title="${h.tooltip(_('Show Pull Requests for %s') % c.repo_name)}">
ui: fixed pr count on repo settings
r3569 <div class="menulabel">
%if c.repository_pull_requests == 1:
${c.repository_pull_requests} ${_('Pull Request')}
%else:
${c.repository_pull_requests} ${_('Pull Requests')}
templating: use .mako as extensions for template files.
r1282 %endif
ui: fixed pr count on repo settings
r3569 </div>
templating: use .mako as extensions for template files.
r1282 </a>
</li>
%endif
ui: expose search as a visible option for repositories.
r3440
artifacts: mark as beta for UI project.
r3682 <li class="${is_active('artifacts')}"><a class="menulink" href="${h.route_path('repo_artifacts_list',repo_name=c.repo_name)}"><div class="menulabel">${_('Artifacts')} (BETA)</div></a></li>
repo: added base CE display of new artifacts
r3671
ui: moved group settings outside
r3567 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
<li class="${is_active('settings')}"><a class="menulink" href="${h.route_path('edit_repo',repo_name=c.repo_name)}"><div class="menulabel">${_('Repository Settings')}</div></a></li>
%endif
templating: use .mako as extensions for template files.
r1282 <li class="${is_active('options')}">
navigation: remove # from url in options navigation entry....
r1783 <a class="menulink dropdown">
<div class="menulabel">${_('Options')} <div class="show_more"></div></div>
</a>
templating: use .mako as extensions for template files.
r1282 <ul class="submenu">
ui: moved group settings outside
r3567
templating: use .mako as extensions for template files.
r1282 %if c.rhodecode_db_repo.fork:
compare: migrated code from pylons to pyramid views.
r1957 <li>
<a title="${h.tooltip(_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name))}"
href="${h.route_path('repo_compare',
repo_name=c.rhodecode_db_repo.fork.repo_name,
source_ref_type=c.rhodecode_db_repo.landing_rev[0],
source_ref=c.rhodecode_db_repo.landing_rev[1],
target_repo=c.repo_name,target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],
target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1],
_query=dict(merge=1))}"
>
${_('Compare fork')}
</a>
</li>
templating: use .mako as extensions for template files.
r1282 %endif
%if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
%if c.rhodecode_db_repo.locked[0]:
repositories: rewrote whole admin section to pyramid....
r2014 <li><a class="locking_del" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li>
templating: use .mako as extensions for template files.
r1282 %else:
repositories: rewrote whole admin section to pyramid....
r2014 <li><a class="locking_add" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Lock')}</a></li>
templating: use .mako as extensions for template files.
r1282 %endif
%endif
%if c.rhodecode_user.username != h.DEFAULT_USER:
%if c.rhodecode_db_repo.repo_type in ['git','hg']:
forks: moved pylons code into pyramid.
r1988 <li><a href="${h.route_path('repo_fork_new',repo_name=c.repo_name)}">${_('Fork')}</a></li>
pull-requests: migrated code from pylons to pyramid
r1974 <li><a href="${h.route_path('pullrequest_new',repo_name=c.repo_name)}">${_('Create Pull Request')}</a></li>
templating: use .mako as extensions for template files.
r1282 %endif
%endif
</ul>
</li>
</ul>
</div>
<div class="clear"></div>
</div>
repositories: added option to archive repositories instead of deleting them....
r3090 % if c.rhodecode_db_repo.archived:
<div class="alert alert-warning text-center">
<strong>${_('This repository has been archived. It is now read-only.')}</strong>
</div>
% endif
ui: navigation, fixed wrapping of new admin navigation items
r3566 <!--- REPO END CONTEXT BAR -->
templating: use .mako as extensions for template files.
r1282
</%def>
dan
search: new UI for search, and repo group context search...
r3442 <%def name="repo_group_page_title(repo_group_instance)">
<div class="title-content">
<div class="title-main">
## Repository Group icon
icons: updated iconography and fontello configuration
r3680 <i class="icon-repo-group"></i>
dan
search: new UI for search, and repo group context search...
r3442
## repo name with group name
${h.breadcrumb_repo_group_link(repo_group_instance)}
</div>
<%namespace name="dt" file="/data_table/_dt_elements.mako"/>
Liviu
added discreet class to repo-group-description to match repo fork description styling
r3617 <div class="repo-group-desc discreet">
dan
search: new UI for search, and repo group context search...
r3442 ${dt.repo_group_desc(repo_group_instance.description_safe, repo_group_instance.personal, c.visual.stylify_metatags)}
</div>
</div>
</%def>
<%def name="repo_group_menu(active=None)">
<%
def is_active(selected):
if selected == active:
return "active"
gr_name = c.repo_group.group_name if c.repo_group else None
# create repositories with write permission on group is set to true
create_on_write = h.HasPermissionAny('hg.create.write_on_repogroup.true')()
group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'group admin index page')
group_write = h.HasRepoGroupPermissionAny('group.write')(gr_name, 'can write into group index page')
%>
ui: navigation, fixed wrapping of new admin navigation items
r3566 <!--- REPO GROUP CONTEXT BAR -->
dan
search: new UI for search, and repo group context search...
r3442 <div id="context-bar">
<div class="wrapper">
Liviu
Multiple changes for the navigation and buttons
r3570 <div class="title">
${self.repo_group_page_title(c.repo_group)}
</div>
dan
search: new UI for search, and repo group context search...
r3442 <ul id="context-pages" class="navigation horizontal-list">
<li class="${is_active('home')}"><a class="menulink" href="${h.route_path('repo_group_home', repo_group_name=c.repo_group.group_name)}"><div class="menulabel">${_('Group Home')}</div></a></li>
auth: reduced usage of raw auth calls inside templates
r3587 % if c.is_super_admin or group_admin:
ui: moved group settings outside
r3567 <li class="${is_active('settings')}"><a class="menulink" href="${h.route_path('edit_repo_group',repo_group_name=c.repo_group.group_name)}" title="${_('You have admin right to this group, and can edit it')}"><div class="menulabel">${_('Group Settings')}</div></a></li>
% endif
dan
search: new UI for search, and repo group context search...
r3442
<li class="${is_active('options')}">
<a class="menulink dropdown">
<div class="menulabel">${_('Options')} <div class="show_more"></div></div>
</a>
<ul class="submenu">
auth: reduced usage of raw auth calls inside templates
r3587 %if c.is_super_admin or group_admin or (group_write and create_on_write):
dan
search: new UI for search, and repo group context search...
r3442 <li><a href="${h.route_path('repo_new',_query=dict(parent_group=c.repo_group.group_id))}">${_('Add Repository')}</a></li>
%endif
auth: reduced usage of raw auth calls inside templates
r3587 %if c.is_super_admin or group_admin:
add: change label for adding a repo group inside another one
r3688 <li><a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.repo_group.group_id))}">${_(u'Add Repository Group')}</a></li>
dan
search: new UI for search, and repo group context search...
r3442 %endif
</ul>
</li>
</ul>
</div>
<div class="clear"></div>
</div>
ui: navigation, fixed wrapping of new admin navigation items
r3566 <!--- REPO GROUP CONTEXT BAR -->
dan
search: new UI for search, and repo group context search...
r3442
</%def>
base: show my account as active when we're showing this view....
r1318 <%def name="usermenu(active=False)">
templating: use .mako as extensions for template files.
r1282 ## USER MENU
base: show my account as active when we're showing this view....
r1318 <li id="quick_login_li" class="${'active' if active else ''}">
auth: login/registration changes for upcomming new rules for login using external identities....
r3386 % if c.rhodecode_user.username == h.DEFAULT_USER:
<a id="quick_login_link" class="menulink childs" href="${h.route_path('login', _query={'came_from': h.current_route_path(request)})}">
${gravatar(c.rhodecode_user.email, 20)}
<span class="user">
<span>${_('Sign in')}</span>
</span>
</a>
% else:
## logged in user
<a id="quick_login_link" class="menulink childs">
${gravatar(c.rhodecode_user.email, 20)}
<span class="user">
<span class="menu_link_user">${c.rhodecode_user.username}</span>
<div class="show_more"></div>
</span>
</a>
## subnav with menu for logged in user
<div class="user-menu submenu">
<div id="quick_login">
%if c.rhodecode_user.username != h.DEFAULT_USER:
<div class="">
<div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div>
<div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
<div class="email">${c.rhodecode_user.email}</div>
templating: use .mako as extensions for template files.
r1282 </div>
auth: login/registration changes for upcomming new rules for login using external identities....
r3386 <div class="">
<ol class="links">
<li>${h.link_to(_(u'My account'),h.route_path('my_account_profile'))}</li>
% if c.rhodecode_user.personal_repo_group:
<li>${h.link_to(_(u'My personal group'), h.route_path('repo_group_home', repo_group_name=c.rhodecode_user.personal_repo_group.group_name))}</li>
% endif
<li>${h.link_to(_(u'Pull Requests'), h.route_path('my_account_pullrequests'))}</li>
dan
ui: introduce user-bookmarks for creation of quick shortcuts
r3424 ## bookmark-items
<li class="bookmark-items">
${_('Bookmarks')}
<div class="pull-right">
<a href="${h.route_path('my_account_bookmarks')}">${_('Manage')}</a>
</div>
</li>
% if not c.bookmark_items:
<li>
<a href="${h.route_path('my_account_bookmarks')}">${_('No Bookmarks yet.')}</a>
</li>
% endif
% for item in c.bookmark_items:
<li>
% if item.repository:
<div>
<a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}">
ui: bookmark items should use consisten space leading position number so UI is evenly displayed
r3434 <code>${item.position}</code>
dan
ui: introduce user-bookmarks for creation of quick shortcuts
r3424 % if item.repository.repo_type == 'hg':
<i class="icon-hg" title="${_('Repository')}" style="font-size: 16px"></i>
% elif item.repository.repo_type == 'git':
<i class="icon-git" title="${_('Repository')}" style="font-size: 16px"></i>
% elif item.repository.repo_type == 'svn':
<i class="icon-svn" title="${_('Repository')}" style="font-size: 16px"></i>
% endif
${(item.title or h.shorter(item.repository.repo_name, 30))}
</a>
</div>
% elif item.repository_group:
<div>
<a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}">
ui: bookmark items should use consisten space leading position number so UI is evenly displayed
r3434 <code>${item.position}</code>
icons: updated iconography and fontello configuration
r3680 <i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i>
dan
ui: introduce user-bookmarks for creation of quick shortcuts
r3424 ${(item.title or h.shorter(item.repository_group.group_name, 30))}
</a>
</div>
% else:
<a class="bookmark-item" href="${h.route_path('my_account_goto_bookmark', bookmark_id=item.position)}">
ui: bookmark items should use consisten space leading position number so UI is evenly displayed
r3434 <code>${item.position}</code>
dan
ui: introduce user-bookmarks for creation of quick shortcuts
r3424 ${item.title}
</a>
% endif
</li>
% endfor
auth: login/registration changes for upcomming new rules for login using external identities....
r3386
<li class="logout">
${h.secure_form(h.route_path('logout'), request=request)}
${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")}
${h.end_form()}
</li>
</ol>
templating: use .mako as extensions for template files.
r1282 </div>
auth: login/registration changes for upcomming new rules for login using external identities....
r3386 %endif
</div>
</div>
## unread counter
<div class="pill_container">
<a class="menu_link_notifications ${'empty' if c.unread_notifications == 0 else ''}" href="${h.route_path('notifications_show_all')}">${c.unread_notifications}</a>
</div>
% endif
templating: use .mako as extensions for template files.
r1282 </li>
</%def>
<%def name="menu_items(active=None)">
<%
def is_active(selected):
if selected == active:
return "active"
return ""
%>
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774
nav-bar: added placeholder for notice box.
r2898 <ul id="quick" class="main_nav navigation horizontal-list">
## notice box for important system messages
<li style="display: none">
<a class="notice-box" href="#openNotice" onclick="showNoticeBox(); return false">
<div class="menulabel-notice" >
0
</div>
</a>
</li>
## Main filter
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 <li>
<div class="menulabel main_filter_box">
<div class="main_filter_input_box">
go-to search: updated logic of goto switcher...
r3556 <ul class="searchItems">
% if c.template_context['search_context']['repo_id']:
<li class="searchTag searchTagFilter searchTagHidable" >
##<a href="${h.route_path('search_repo',repo_name=c.template_context['search_context']['repo_name'])}">
<span class="tag">
This repo
icons: updated iconography and fontello configuration
r3680 <a href="#removeGoToFilter" onclick="removeGoToFilter(); return false"><i class="icon-cancel-circled"></i></a>
go-to search: updated logic of goto switcher...
r3556 </span>
##</a>
</li>
% elif c.template_context['search_context']['repo_group_id']:
<li class="searchTag searchTagFilter searchTagHidable">
##<a href="${h.route_path('search_repo_group',repo_group_name=c.template_context['search_context']['repo_group_name'])}">
<span class="tag">
This group
icons: updated iconography and fontello configuration
r3680 <a href="#removeGoToFilter" onclick="removeGoToFilter(); return false"><i class="icon-cancel-circled"></i></a>
go-to search: updated logic of goto switcher...
r3556 </span>
##</a>
</li>
% endif
<li class="searchTagInput">
<input class="main_filter_input" id="main_filter" size="15" type="text" name="main_filter" placeholder="${_('search / go to...')}" value="" />
</li>
<li class="searchTag searchTagHelp">
<a href="#showFilterHelp" onclick="showMainFilterBox(); return false">?</a>
</li>
</ul>
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 </div>
</div>
<div id="main_filter_help" style="display: none">
dan
quick-search: improve styling of search input and results.
r3443 - Use '/' key to quickly access this field.
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774
dan
quick-search: improve styling of search input and results.
r3443 - Enter a name of repository, or repository group for quick search.
- Prefix query to allow special search:
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774
go-to search: updated logic of goto switcher...
r3556 user:admin, to search for usernames, always global
user_group:devops, to search for user groups, always global
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774
go-to search: updated logic of goto switcher...
r3556 commit:efced4, to search for commits, scoped to repositories or groups
file:models.py, to search for file paths, scoped to repositories or groups
quick-serach: added option to also search user-groups.
r2795
go-to search: updated logic of goto switcher...
r3556 % if c.template_context['search_context']['repo_id']:
For advanced full text search visit: <a href="${h.route_path('search_repo',repo_name=c.template_context['search_context']['repo_name'])}">repository search</a>
% elif c.template_context['search_context']['repo_group_id']:
For advanced full text search visit: <a href="${h.route_path('search_repo_group',repo_group_name=c.template_context['search_context']['repo_group_name'])}">repository group search</a>
% else:
For advanced full text search visit: <a href="${h.route_path('search')}">global search</a>
% endif
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 </div>
</li>
templating: use .mako as extensions for template files.
r1282
## ROOT MENU
ui/menu: re-order the navigation for future changes.
r3540 <li class="${is_active('home')}">
<a class="menulink" title="${_('Home')}" href="${h.route_path('home')}">
<div class="menulabel">${_('Home')}</div>
</a>
</li>
templating: use .mako as extensions for template files.
r1282 %if c.rhodecode_user.username != h.DEFAULT_USER:
<li class="${is_active('journal')}">
journal: ported controller to pyramid code
r1933 <a class="menulink" title="${_('Show activity journal')}" href="${h.route_path('journal')}">
templating: use .mako as extensions for template files.
r1282 <div class="menulabel">${_('Journal')}</div>
</a>
</li>
%else:
<li class="${is_active('journal')}">
journal: ported controller to pyramid code
r1933 <a class="menulink" title="${_('Show Public activity journal')}" href="${h.route_path('journal_public')}">
templating: use .mako as extensions for template files.
r1282 <div class="menulabel">${_('Public journal')}</div>
</a>
</li>
%endif
ui/menu: re-order the navigation for future changes.
r3540
templating: use .mako as extensions for template files.
r1282 <li class="${is_active('gists')}">
dan
gists: migrated gists controller to pyramid view.
r1891 <a class="menulink childs" title="${_('Show Gists')}" href="${h.route_path('gists_show')}">
templating: use .mako as extensions for template files.
r1282 <div class="menulabel">${_('Gists')}</div>
</a>
</li>
ui/menu: re-order the navigation for future changes.
r3540
auth: reduced usage of raw auth calls inside templates
r3587 % if c.is_super_admin or c.is_delegated_admin:
templating: use .mako as extensions for template files.
r1282 <li class="${is_active('admin')}">
ui: added admin nav into admin pages
r3564 <a class="menulink childs" title="${_('Admin settings')}" href="${h.route_path('admin_home')}">
<div class="menulabel">${_('Admin')} </div>
templating: use .mako as extensions for template files.
r1282 </a>
</li>
auth: reduced usage of raw auth calls inside templates
r3587 % endif
ui: added admin nav into admin pages
r3564
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 ## render extra user menu
${usermenu(active=(active=='my_account'))}
templating: use .mako as extensions for template files.
r1282 % if c.debug_style:
style: use different indicator for nicer UI.
r2839 <li>
dan
debug-style: moved from pylons controller to pyramid view.
r1900 <a class="menulink" title="${_('Style')}" href="${h.route_path('debug_style_home')}">
style: use different indicator for nicer UI.
r2839 <div class="menulabel">${_('[Style]')}</div>
templating: use .mako as extensions for template files.
r1282 </a>
</li>
% endif
</ul>
<script type="text/javascript">
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 var visualShowPublicIcon = "${c.visual.show_public_icon}" == "True";
templating: use .mako as extensions for template files.
r1282
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 var formatRepoResult = function(result, container, query, escapeMarkup) {
return function(data, escapeMarkup) {
if (!data.repo_id){
return data.text; // optgroup text Repositories
templating: use .mako as extensions for template files.
r1282 }
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774
var tmpl = '';
var repoType = data['repo_type'];
var repoName = data['text'];
if(data && data.type == 'repo'){
if(repoType === 'hg'){
tmpl += '<i class="icon-hg"></i> ';
}
else if(repoType === 'git'){
tmpl += '<i class="icon-git"></i> ';
}
else if(repoType === 'svn'){
tmpl += '<i class="icon-svn"></i> ';
}
if(data['private']){
tmpl += '<i class="icon-lock" ></i> ';
}
else if(visualShowPublicIcon){
tmpl += '<i class="icon-unlock-alt"></i> ';
}
templating: use .mako as extensions for template files.
r1282 }
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 tmpl += escapeMarkup(repoName);
return tmpl;
templating: use .mako as extensions for template files.
r1282
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 }(result, escapeMarkup);
templating: use .mako as extensions for template files.
r1282 };
dan
ui: introduce user-bookmarks for creation of quick shortcuts
r3424 var formatRepoGroupResult = function(result, container, query, escapeMarkup) {
return function(data, escapeMarkup) {
if (!data.repo_group_id){
return data.text; // optgroup text Repositories
}
var tmpl = '';
var repoGroupName = data['text'];
if(data){
icons: updated iconography and fontello configuration
r3680 tmpl += '<i class="icon-repo-group"></i> ';
dan
ui: introduce user-bookmarks for creation of quick shortcuts
r3424
}
tmpl += escapeMarkup(repoGroupName);
return tmpl;
}(result, escapeMarkup);
};
go-to search: updated logic of goto switcher...
r3556 var escapeRegExChars = function (value) {
return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
};
var getRepoIcon = function(repo_type) {
if (repo_type === 'hg') {
return '<i class="icon-hg"></i> ';
}
else if (repo_type === 'git') {
return '<i class="icon-git"></i> ';
}
else if (repo_type === 'svn') {
return '<i class="icon-svn"></i> ';
}
return ''
};
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774
var autocompleteMainFilterFormatResult = function (data, value, org_formatter) {
if (value.split(':').length === 2) {
value = value.split(':')[1]
}
var searchType = data['type'];
var valueDisplay = data['value_display'];
var pattern = '(' + escapeRegExChars(value) + ')';
go-to search: updated logic of goto switcher...
r3556 valueDisplay = Select2.util.escapeMarkup(valueDisplay);
dan
quick-search: improve styling of search input and results.
r3443
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 // highlight match
go-to search: updated logic of goto switcher...
r3556 if (searchType != 'text') {
valueDisplay = valueDisplay.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>');
}
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774
var icon = '';
templating: use .mako as extensions for template files.
r1282
quick-search: use smart group search when browsing inside a repository group....
r2804 if (searchType === 'hint') {
icons: updated iconography and fontello configuration
r3680 icon += '<i class="icon-repo-group"></i> ';
quick-search: use smart group search when browsing inside a repository group....
r2804 }
dan
quick-search: improve styling of search input and results.
r3443 // full text search
quick-search: use smart group search when browsing inside a repository group....
r2804 else if (searchType === 'search') {
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 icon += '<i class="icon-more"></i> ';
}
dan
quick-search: improve styling of search input and results.
r3443 // repository
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 else if (searchType === 'repo') {
dan
quick-search: improve styling of search input and results.
r3443
var repoIcon = getRepoIcon(data['repo_type']);
icon += repoIcon;
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 if (data['private']) {
icon += '<i class="icon-lock" ></i> ';
}
else if (visualShowPublicIcon) {
icon += '<i class="icon-unlock-alt"></i> ';
}
}
dan
quick-search: improve styling of search input and results.
r3443 // repository groups
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 else if (searchType === 'repo_group') {
icons: updated iconography and fontello configuration
r3680 icon += '<i class="icon-repo-group"></i> ';
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 }
dan
quick-search: improve styling of search input and results.
r3443 // user group
quick-serach: added option to also search user-groups.
r2795 else if (searchType === 'user_group') {
icon += '<i class="icon-group"></i> ';
}
go-to search: updated logic of goto switcher...
r3556 // user
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 else if (searchType === 'user') {
icon += '<img class="gravatar" src="{0}"/>'.format(data['icon_link']);
}
dan
quick-search: improve styling of search input and results.
r3443 // commit
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 else if (searchType === 'commit') {
dan
quick-search: improve styling of search input and results.
r3443 var repo_data = data['repo_data'];
var repoIcon = getRepoIcon(repo_data['repository_type']);
if (repoIcon) {
icon += repoIcon;
} else {
icon += '<i class="icon-tag"></i>';
}
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 }
dan
search: allow quick search for path globally
r3542 // file
else if (searchType === 'file') {
var repo_data = data['repo_data'];
var repoIcon = getRepoIcon(repo_data['repository_type']);
if (repoIcon) {
icon += repoIcon;
} else {
icon += '<i class="icon-tag"></i>';
}
}
go-to search: updated logic of goto switcher...
r3556 // generic text
else if (searchType === 'text') {
icon = '';
}
templating: use .mako as extensions for template files.
r1282
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 var tmpl = '<div class="ac-container-wrap">{0}{1}</div>';
return tmpl.format(icon, valueDisplay);
};
var handleSelect = function(element, suggestion) {
quick-search: use smart group search when browsing inside a repository group....
r2804 if (suggestion.type === "hint") {
// we skip action
$('#main_filter').focus();
go-to search: updated logic of goto switcher...
r3556 }
else if (suggestion.type === "text") {
// we skip action
$('#main_filter').focus();
quick-search: use smart group search when browsing inside a repository group....
r2804 } else {
window.location = suggestion['url'];
}
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 };
go-to search: updated logic of goto switcher...
r3556
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 var autocompleteMainFilterResult = function (suggestion, originalQuery, queryLowerCase) {
if (queryLowerCase.split(':').length === 2) {
queryLowerCase = queryLowerCase.split(':')[1]
}
go-to search: updated logic of goto switcher...
r3556 if (suggestion.type === "text") {
// special case we don't want to "skip" display for
return true
}
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 return suggestion.value_display.toLowerCase().indexOf(queryLowerCase) !== -1;
};
go-to search: updated logic of goto switcher...
r3556 var cleanContext = {
repo_view_type: null,
repo_id: null,
repo_name: "",
repo_group_id: null,
repo_group_name: null
};
var removeGoToFilter = function () {
$('.searchTagHidable').hide();
$('#main_filter').autocomplete(
'setOptions', {params:{search_context: cleanContext}});
};
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 $('#main_filter').autocomplete({
serviceUrl: pyroutes.url('goto_switcher_data'),
go-to search: updated logic of goto switcher...
r3556 params: {
"search_context": templateContext.search_context
},
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 minChars:2,
maxHeight:400,
deferRequestBy: 300, //miliseconds
tabDisabled: true,
go-to search: updated logic of goto switcher...
r3556 autoSelectFirst: false,
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 formatResult: autocompleteMainFilterFormatResult,
lookupFilter: autocompleteMainFilterResult,
dan
quick-search-bar: show errors when search fails.
r3320 onSelect: function (element, suggestion) {
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 handleSelect(element, suggestion);
return false;
dan
quick-search-bar: show errors when search fails.
r3320 },
onSearchError: function (element, query, jqXHR, textStatus, errorThrown) {
if (jqXHR !== 'abort') {
alert("Error during search.\nError code: {0}".format(textStatus));
window.location = '';
}
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 }
templating: use .mako as extensions for template files.
r1282 });
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 showMainFilterBox = function () {
$('#main_filter_help').toggle();
dan
quick-search: improve styling of search input and results.
r3443 };
templating: use .mako as extensions for template files.
r1282
go-to search: updated logic of goto switcher...
r3556 $('#main_filter').on('keydown.autocomplete', function (e) {
var BACKSPACE = 8;
var el = $(e.currentTarget);
if(e.which === BACKSPACE){
var inputVal = el.val();
if (inputVal === ""){
removeGoToFilter()
}
}
});
templating: use .mako as extensions for template files.
r1282 </script>
<script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
</%def>
<div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4>
</div>
<div class="modal-body">
<div class="block-left">
<table class="keyboard-mappings">
<tbody>
<tr>
<th></th>
<th>${_('Site-wide shortcuts')}</th>
</tr>
<%
elems = [
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774 ('/', 'Use quick search box'),
templating: use .mako as extensions for template files.
r1282 ('g h', 'Goto home page'),
('g g', 'Goto my private gists page'),
('g G', 'Goto my public gists page'),
dan
ui: introduce user-bookmarks for creation of quick shortcuts
r3424 ('g 0-9', 'Goto bookmarked items from 0-9'),
templating: use .mako as extensions for template files.
r1282 ('n r', 'New repository page'),
('n g', 'New gist page'),
]
%>
%for key, desc in elems:
<tr>
<td class="keys">
<span class="key tag">${key}</span>
</td>
<td>${desc}</td>
</tr>
%endfor
</tbody>
</table>
</div>
<div class="block-left">
<table class="keyboard-mappings">
<tbody>
<tr>
<th></th>
<th>${_('Repositories')}</th>
</tr>
<%
elems = [
('g s', 'Goto summary page'),
('g c', 'Goto changelog page'),
('g f', 'Goto files page'),
('g F', 'Goto files page with file search activated'),
('g p', 'Goto pull requests page'),
('g o', 'Goto repository settings'),
('g O', 'Goto repository permissions settings'),
]
%>
%for key, desc in elems:
<tr>
<td class="keys">
<span class="key tag">${key}</span>
</td>
<td>${desc}</td>
</tr>
%endfor
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
repo-switcher: new unified search box for filtering/accessing users, repos and repo groups....
r2774