Changeset - e29c688e6885
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 14 years ago 2012-03-13 05:52:15
marcin@python-works.com
linkify perms and make global ones display better
2 files changed with 13 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/rhodecode.js
Show inline comments
 
@@ -701,14 +701,15 @@ var nameSort = function(a, b, desc, fiel
 
};
 

	
 
var permNameSort = function(a, b, desc, field) {
 
    var a_ = fromHTML(a.getData(field));
 
    var b_ = fromHTML(b.getData(field));
 
    // extract name from table
 
    a_ = a_.innerHTML;
 
    b_ = b_.innerHTML;      
 

	
 
    a_ = a_.children[0].innerHTML;
 
    b_ = b_.children[0].innerHTML;      
 
    
 
    var comp = YAHOO.util.Sort.compare;
 
    var compState = comp(a_, b_, desc);
 
    return compState;
 
};
 

	
rhodecode/templates/admin/users/user_edit_my_account.html
Show inline comments
 
@@ -183,16 +183,24 @@
 
                  <th class="left">${_('Name')}</th>
 
                  <th class="left">${_('Permission')}</th>
 
              </thead>
 
              <tbody>
 
            %for k in c.rhodecode_user.permissions[section]:
 
                <tr>
 
                    <td>${k}</td>
 
                    <td>
 
                        %if section == 'repositories':
 
                            <a href="${h.url('summary_home',repo_name=k)}">${k}</a>
 
                        %elif section == 'repositories_groups':
 
                            <a href="${h.url('repos_group_home',group_name=k)}">${k}</a>
 
                        %else:
 
                            ${k}
 
                        %endif
 
                    </td>
 
                    <td>
 
                        %if section == 'global':
 
                         ${', '.join(c.rhodecode_user.permissions[section])}
 
                         ${h.bool2icon(True)}
 
                        %else:
 
                        <span class="perm_tag ${c.rhodecode_user.permissions[section].get(k).split('.')[-1] }">${c.rhodecode_user.permissions[section].get(k)}</span>
 
                        %endif
 
                     </td>
 
                </tr>
 
            %endfor
0 comments (0 inline, 0 general)