+
diff --git a/rhodecode/templates/admin/repos/repo_edit_perms.html b/rhodecode/templates/admin/repos/repo_edit_perms.html
--- a/rhodecode/templates/admin/repos/repo_edit_perms.html
+++ b/rhodecode/templates/admin/repos/repo_edit_perms.html
@@ -25,7 +25,7 @@
${h.radio('u_perm_%s' % r2p.user.username,'repository.write')} |
${h.radio('u_perm_%s' % r2p.user.username,'repository.admin')} |
- ${r2p.user.username}
+ ${r2p.user.username}
|
%if r2p.user.username !='default':
@@ -46,7 +46,7 @@
| ${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.write')} |
${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.admin')} |
- ${g2p.users_group.users_group_name}
+ ${g2p.users_group.users_group_name}
|
@@ -117,165 +117,12 @@ YUE.onDOMReady(function () {
YUD.setStyle('add_perm', 'opacity', '0.6');
YUD.setStyle('add_perm', 'cursor', 'default');
});
+ MembersAutoComplete(
+ ${c.users_array|n},
+ ${c.users_groups_array|n},
+ "${_('Group')}",
+ "${_('members')}"
+ );
});
-YAHOO.example.FnMultipleFields = function () {
- var myUsers = ${c.users_array|n};
- var myGroups = ${c.users_groups_array|n};
-
- // Define a custom search function for the DataSource of users
- var matchUsers = function (sQuery) {
- // Case insensitive matching
- var query = sQuery.toLowerCase();
- var i = 0;
- var l = myUsers.length;
- var matches = [];
-
- // Match against each name of each contact
- for (; i < l; i++) {
- contact = myUsers[i];
- if ((contact.fname.toLowerCase().indexOf(query) > -1) || (contact.lname.toLowerCase().indexOf(query) > -1) || (contact.nname && (contact.nname.toLowerCase().indexOf(query) > -1))) {
- matches[matches.length] = contact;
- }
- }
- return matches;
- };
-
- // Define a custom search function for the DataSource of usersGroups
- var matchGroups = function (sQuery) {
- // Case insensitive matching
- var query = sQuery.toLowerCase();
- var i = 0;
- var l = myGroups.length;
- var matches = [];
-
- // Match against each name of each contact
- for (; i < l; i++) {
- matched_group = myGroups[i];
- if (matched_group.grname.toLowerCase().indexOf(query) > -1) {
- matches[matches.length] = matched_group;
- }
- }
- return matches;
- };
-
- //match all
- var matchAll = function (sQuery) {
- u = matchUsers(sQuery);
- g = matchGroups(sQuery);
- return u.concat(g);
- };
-
- // DataScheme for members
- var memberDS = new YAHOO.util.FunctionDataSource(matchAll);
- memberDS.responseSchema = {
- fields: ["id", "fname", "lname", "nname", "grname", "grmembers"]
- };
-
- // DataScheme for owner
- var ownerDS = new YAHOO.util.FunctionDataSource(matchUsers);
- ownerDS.responseSchema = {
- fields: ["id", "fname", "lname", "nname"]
- };
-
- // Instantiate AutoComplete for perms
- var membersAC = new YAHOO.widget.AutoComplete("perm_new_member_name", "perm_container", memberDS);
- membersAC.useShadow = false;
- membersAC.resultTypeList = false;
-
- // Instantiate AutoComplete for owner
- var ownerAC = new YAHOO.widget.AutoComplete("user", "owner_container", ownerDS);
- ownerAC.useShadow = false;
- ownerAC.resultTypeList = false;
-
-
- // Helper highlight function for the formatter
- var highlightMatch = function (full, snippet, matchindex) {
- return full.substring(0, matchindex) + "" + full.substr(matchindex, snippet.length) + "" + full.substring(matchindex + snippet.length);
- };
-
- // Custom formatter to highlight the matching letters
- var custom_formatter = function (oResultData, sQuery, sResultMatch) {
- var query = sQuery.toLowerCase();
-
- if (oResultData.grname != undefined) {
- var grname = oResultData.grname;
- var grmembers = oResultData.grmembers;
- var grnameMatchIndex = grname.toLowerCase().indexOf(query);
- var grprefix = "${_('Group')}: ";
- var grsuffix = " (" + grmembers + " ${_('members')})";
-
- if (grnameMatchIndex > -1) {
- return grprefix + highlightMatch(grname, query, grnameMatchIndex) + grsuffix;
- }
-
- return grprefix + oResultData.grname + grsuffix;
- } else if (oResultData.fname != undefined) {
-
- var fname = oResultData.fname,
- lname = oResultData.lname,
- nname = oResultData.nname || "",
- // Guard against null value
- fnameMatchIndex = fname.toLowerCase().indexOf(query),
- lnameMatchIndex = lname.toLowerCase().indexOf(query),
- nnameMatchIndex = nname.toLowerCase().indexOf(query),
- displayfname, displaylname, displaynname;
-
- if (fnameMatchIndex > -1) {
- displayfname = highlightMatch(fname, query, fnameMatchIndex);
- } else {
- displayfname = fname;
- }
-
- if (lnameMatchIndex > -1) {
- displaylname = highlightMatch(lname, query, lnameMatchIndex);
- } else {
- displaylname = lname;
- }
-
- if (nnameMatchIndex > -1) {
- displaynname = "(" + highlightMatch(nname, query, nnameMatchIndex) + ")";
- } else {
- displaynname = nname ? "(" + nname + ")" : "";
- }
-
- return displayfname + " " + displaylname + " " + displaynname;
- } else {
- return '';
- }
- };
- membersAC.formatResult = custom_formatter;
- ownerAC.formatResult = custom_formatter;
-
- var myHandler = function (sType, aArgs) {
-
- var myAC = aArgs[0]; // reference back to the AC instance
- var elLI = aArgs[1]; // reference to the selected LI element
- var oData = aArgs[2]; // object literal of selected item's result data
- //fill the autocomplete with value
- if (oData.nname != undefined) {
- //users
- myAC.getInputEl().value = oData.nname;
- YUD.get('perm_new_member_type').value = 'user';
- } else {
- //groups
- myAC.getInputEl().value = oData.grname;
- YUD.get('perm_new_member_type').value = 'users_group';
- }
-
- };
-
- membersAC.itemSelectEvent.subscribe(myHandler);
- if(ownerAC.itemSelectEvent){
- ownerAC.itemSelectEvent.subscribe(myHandler);
- }
-
- return {
- memberDS: memberDS,
- ownerDS: ownerDS,
- membersAC: membersAC,
- ownerAC: ownerAC,
- };
-}();
-
diff --git a/rhodecode/templates/admin/repos/repos.html b/rhodecode/templates/admin/repos/repos.html
--- a/rhodecode/templates/admin/repos/repos.html
+++ b/rhodecode/templates/admin/repos/repos.html
@@ -48,7 +48,7 @@
${dt.quick_menu(repo['name'])}
|
- ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))}
+ ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'), admin=True)}
|
##DESCRIPTION
diff --git a/rhodecode/templates/admin/repos_groups/repos_group_edit_perms.html b/rhodecode/templates/admin/repos_groups/repos_group_edit_perms.html
--- a/rhodecode/templates/admin/repos_groups/repos_group_edit_perms.html
+++ b/rhodecode/templates/admin/repos_groups/repos_group_edit_perms.html
@@ -15,7 +15,7 @@
| ${h.radio('u_perm_%s' % r2p.user.username,'group.write')} |
${h.radio('u_perm_%s' % r2p.user.username,'group.admin')} |
- ${r2p.user.username}
+ ${r2p.user.username}
|
%if r2p.user.username !='default':
@@ -35,7 +35,7 @@
| ${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.write')} |
${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.admin')} |
- ${g2p.users_group.users_group_name}
+ ${g2p.users_group.users_group_name}
|
@@ -68,7 +68,7 @@
diff --git a/rhodecode/templates/admin/repos_groups/repos_groups.html b/rhodecode/templates/admin/repos_groups/repos_groups.html
--- a/rhodecode/templates/admin/repos_groups/repos_groups.html
+++ b/rhodecode/templates/admin/repos_groups/repos_groups.html
@@ -17,5 +17,5 @@
${self.menu('admin')}
%def>
<%def name="main()">
- <%include file="/index_base.html" args="parent=self"/>
+ <%include file="/index_base.html" args="parent=self,short_repo_names=True"/>
%def>
diff --git a/rhodecode/templates/admin/repos_groups/repos_groups_show.html b/rhodecode/templates/admin/repos_groups/repos_groups_show.html
--- a/rhodecode/templates/admin/repos_groups/repos_groups_show.html
+++ b/rhodecode/templates/admin/repos_groups/repos_groups_show.html
@@ -44,7 +44,7 @@
|
- ${h.link_to(h.literal(' » '.join([g.name for g in gr.parents+[gr]])),url('edit_repos_group',id=gr.group_id))}
+ ${h.link_to(h.literal(' » '.join(map(h.safe_unicode,[g.name for g in gr.parents+[gr]]))),url('edit_repos_group',id=gr.group_id))}
|
${gr.group_description} |
diff --git a/rhodecode/templates/admin/users/user_edit_my_account.html b/rhodecode/templates/admin/users/user_edit_my_account.html
--- a/rhodecode/templates/admin/users/user_edit_my_account.html
+++ b/rhodecode/templates/admin/users/user_edit_my_account.html
@@ -113,52 +113,45 @@
%if h.HasPermissionAny('hg.admin','hg.create.repository')():
-
- ${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}
+ ${h.link_to(_('ADD'),h.url('admin_settings_create_repository'))}
%endif
-
-
+
+
+
+ |
${_('Name')} |
- ${_('revision')} |
- ${_('action')} |
+ ${_('Revision')} |
+ ${_('Action')} |
+ ${_('Action')} |
+ <%namespace name="dt" file="/_data_table/_dt_elements.html"/>
%if c.user_repos:
%for repo in c.user_repos:
-
- %if h.is_hg(repo['dbrepo']['repo_type']):
-
- %elif h.is_git(repo['dbrepo']['repo_type']):
-
- %else:
-
- %endif
- %if repo['dbrepo']['private']:
-
- %else:
-
- %endif
-
- ${h.link_to(repo['name'], h.url('summary_home',repo_name=repo['name']),class_="repo_name")}
- %if repo['dbrepo_fork']:
-
-
- %endif
- |
- ${("r%s:%s") % (repo['rev'],h.short_id(repo['tip']))} |
+ ##QUICK MENU
+
+ ##REPO NAME AND ICONS
+
+ ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))}
+ |
+ ##LAST REVISION
+
+ ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])}
+ |
|
${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')}
@@ -177,14 +170,144 @@
%endif
|
+
+
+
+ %for section in sorted(c.rhodecode_user.permissions.keys()):
+
${section.replace("_"," ").capitalize()}
+
+
+
+
+
+ ${_('Name')} |
+ ${_('Permission')} |
+
+
+ %for k in c.rhodecode_user.permissions[section]:
+ <%
+ if section != 'global':
+ section_perm = c.rhodecode_user.permissions[section].get(k)
+ _perm = section_perm.split('.')[-1]
+ else:
+ _perm = section_perm = None
+ %>
+ %if _perm not in ['none']:
+
+
+ %if section == 'repositories':
+ ${k}
+ %elif section == 'repositories_groups':
+ ${k}
+ %else:
+ ${k}
+ %endif
+ |
+
+ %if section == 'global':
+ ${h.bool2icon(True)}
+ %else:
+ ${section_perm}
+ %endif
+ |
+
+ %endif
+ %endfor
+
+
+
+ %endfor
%def>
diff --git a/rhodecode/templates/admin/users_groups/users_groups.html b/rhodecode/templates/admin/users_groups/users_groups.html
--- a/rhodecode/templates/admin/users_groups/users_groups.html
+++ b/rhodecode/templates/admin/users_groups/users_groups.html
@@ -37,7 +37,7 @@
%for cnt,u_group in enumerate(c.users_groups_list):
${h.link_to(u_group.users_group_name,h.url('edit_users_group', id=u_group.users_group_id))} |
- ${len(u_group.members)} |
+ ${len(u_group.members)} |
${h.bool2icon(u_group.users_group_active)} |
${h.form(url('users_group', id=u_group.users_group_id),method='delete')}
diff --git a/rhodecode/templates/base/root.html b/rhodecode/templates/base/root.html
--- a/rhodecode/templates/base/root.html
+++ b/rhodecode/templates/base/root.html
@@ -1,5 +1,5 @@
## -*- coding: utf-8 -*-
-
+
${self.title()}
@@ -37,7 +37,7 @@
## JAVASCRIPT ##
<%def name="js()">
-
@@ -130,6 +130,17 @@
${self.js()}
- ${next.body()}
+ ## IE hacks
+
+
+
+
+ ${next.body()}
diff --git a/rhodecode/templates/changelog/changelog.html b/rhodecode/templates/changelog/changelog.html
--- a/rhodecode/templates/changelog/changelog.html
+++ b/rhodecode/templates/changelog/changelog.html
@@ -93,11 +93,11 @@
%endif
%if h.is_hg(c.rhodecode_repo) and cs.branch:
- ${h.link_to(cs.branch,h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
+ ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
%endif
%for tag in cs.tags:
- ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
+ ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
%endfor
diff --git a/rhodecode/templates/changeset/changeset.html b/rhodecode/templates/changeset/changeset.html
--- a/rhodecode/templates/changeset/changeset.html
+++ b/rhodecode/templates/changeset/changeset.html
@@ -36,8 +36,8 @@
- ${c.ignorews_url()}
- ${c.context_url()}
+ ${c.ignorews_url(request.GET)}
+ ${c.context_url(request.GET)}
@@ -91,14 +91,14 @@
- ${_('%s files affected with %s additions and %s deletions:') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
+ ${_('%s files affected with %s insertions and %s deletions:') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
%for change,filenode,diff,cs1,cs2,stat in c.changes:
%if change != 'removed':
- ${h.link_to(h.safe_unicode(filenode.path),c.anchor_url(filenode.changeset.raw_id,filenode.path)+"_target")}
+ ${h.link_to(h.safe_unicode(filenode.path),c.anchor_url(filenode.changeset.raw_id,filenode.path,request.GET)+"_target")}
%else:
${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID('',filenode.path)))}
%endif
diff --git a/rhodecode/templates/changeset/diff_block.html b/rhodecode/templates/changeset/diff_block.html
--- a/rhodecode/templates/changeset/diff_block.html
+++ b/rhodecode/templates/changeset/diff_block.html
@@ -7,7 +7,7 @@
%for change,filenode,diff,cs1,cs2,stat in changes:
%if change !='removed':
-
+
|
##REPO NAME AND ICONS
- ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))}
+ ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'),pageargs.get('short_repo_names'))}
|
##DESCRIPTION
@@ -115,7 +119,7 @@
|