Show More
@@ -88,15 +88,15 b' class AuthnRootResource(AuthnResourceBas' | |||
|
88 | 88 | # TODO: Store this info in the resource element. |
|
89 | 89 | return self._resource_name_map[resource_name] |
|
90 | 90 | |
|
91 | def get_sorted_list(self): | |
|
91 | def get_sorted_list(self, sort_key=None): | |
|
92 | 92 | """ |
|
93 | 93 | Returns a sorted list of sub resources for displaying purposes. |
|
94 | 94 | """ |
|
95 | def sort_key(resource): | |
|
95 | def default_sort_key(resource): | |
|
96 | 96 | return str.lower(safe_str(resource.display_name)) |
|
97 | 97 | |
|
98 | 98 | active = [item for item in self] |
|
99 | return sorted(active, key=sort_key) | |
|
99 | return sorted(active, key=sort_key or default_sort_key) | |
|
100 | 100 | |
|
101 | 101 | def get_nav_list(self, sort=True): |
|
102 | 102 | """ |
@@ -254,7 +254,7 b' input[type="button"] {' | |||
|
254 | 254 | .btn-social { |
|
255 | 255 | &:extend(.btn-default); |
|
256 | 256 | margin: 5px 5px 5px 0px; |
|
257 |
min-width: 1 |
|
|
257 | min-width: 160px; | |
|
258 | 258 | } |
|
259 | 259 | |
|
260 | 260 | // TODO: johbo: check these exceptions |
@@ -29,7 +29,7 b'' | |||
|
29 | 29 | |
|
30 | 30 | <div class="sidebar"> |
|
31 | 31 | <ul class="nav nav-pills nav-stacked"> |
|
32 |
% for item in resource.get_root().get_nav_list( |
|
|
32 | % for item in resource.get_root().get_nav_list(): | |
|
33 | 33 | <li ${'class=active' if item == resource else ''}> |
|
34 | 34 | <a href="${request.resource_path(item, route_name='auth_home')}">${item.display_name}</a> |
|
35 | 35 | </li> |
@@ -32,8 +32,8 b'' | |||
|
32 | 32 | <div id="register" class="right-column"> |
|
33 | 33 | <!-- login --> |
|
34 | 34 | <div class="sign-in-title"> |
|
35 |
% if |
|
|
36 |
<h1>${_('Create an account linked with {}').format( |
|
|
35 | % if external_auth_provider: | |
|
36 | <h1>${_('Create an account linked with {}').format(external_auth_provider)}</h1> | |
|
37 | 37 | % else: |
|
38 | 38 | <h1>${_('Create an account')}</h1> |
|
39 | 39 | % endif |
@@ -50,7 +50,9 b'' | |||
|
50 | 50 | <br /> |
|
51 | 51 | %endif |
|
52 | 52 | |
|
53 |
% if |
|
|
53 | % if external_auth_provider: | |
|
54 | ## store internal marker about external identity | |
|
55 | ${h.hidden('external_identity', external_auth_provider)} | |
|
54 | 56 |
|
|
55 | 57 | <div style="display: none"> |
|
56 | 58 | % endif |
@@ -69,7 +71,7 b'' | |||
|
69 | 71 | <br /> |
|
70 | 72 | %endif |
|
71 | 73 | |
|
72 |
% if |
|
|
74 | % if external_auth_provider: | |
|
73 | 75 | ## hide password prompts for social auth |
|
74 | 76 | </div> |
|
75 | 77 | % endif |
General Comments 0
You need to be logged in to leave comments.
Login now