Files
@ 9855b31d033b
Branch filter:
Location: kallithea/rhodecode/templates/base/perms_summary.html - annotation
9855b31d033b
2.6 KiB
text/html
pullrequests: fix changesets ordering being reversed when creating new pull requests
41b4edf77b5b tried to make the displayed order of changeset consistent: The
topmost is always the latest.
That did however also reverse the ordering of the changesets sent back in the
post when used in the pull request creation form. Displaying the pull request
later on would reverse it again and thus show it in the 'wrong' order.
We now undo that reversing when creating the pull requests, and the stored data
will thus be the same as before.
41b4edf77b5b tried to make the displayed order of changeset consistent: The
topmost is always the latest.
That did however also reverse the ordering of the changesets sent back in the
post when used in the pull request creation form. Displaying the pull request
later on would reverse it again and thus show it in the 'wrong' order.
We now undo that reversing when creating the pull requests, and the stored data
will thus be the same as before.
fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f | ## snippet for displaying permissions overview for users
<%def name="perms_summary(permissions)">
<div id="perms" class="table">
%for section in sorted(permissions.keys()):
<div class="perms_section_head">${section.replace("_"," ").capitalize()}</div>
%if not permissions[section]:
<span class="empty_data">${_('No permissions defined yet')}</span>
%else:
<div id='tbl_list_wrap_${section}' class="yui-skin-sam">
<table id="tbl_list_${section}">
<thead>
<tr>
<th class="left">${_('Name')}</th>
<th class="left">${_('Permission')}</th>
<th class="left">${_('Edit Permission')}</th>
</thead>
<tbody>
%if section == 'global':
%for k in sorted(permissions[section], key=lambda s: s.lower()):
<tr>
<td>
${h.get_permission_name(k)}
</td>
<td>
${h.boolicon(k.split('.')[-1] != 'none')}
</td>
<td>
<a href="${h.url('edit_permission', id='default')}">${_('edit')}</a>
</td>
</tr>
%endfor
%else:
%for k, section_perm in sorted(permissions[section].items(), key=lambda s: s[1]+s[0].lower()):
<tr>
<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>
%endif
</td>
<td>
<span class="perm_tag ${section_perm.split('.')[-1]}">${section_perm}</span>
</td>
<td>
%if section == 'repositories':
<a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a>
%elif section == 'repositories_groups':
<a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a>
%endif
</td>
</tr>
%endfor
%endif
</tbody>
</table>
</div>
%endif
%endfor
</div>
</%def>
|