Commit 278f88d295072c40ee08ac40a223598ddec7e207
1 parent
d9d6ea89
Exists in
2_split_by_role
Reorder Members to show up first than Admins
Signed-off-by: Tallys Martins <tallysmartins@yahoo.com.br>
Showing
1 changed file
with
17 additions
and
20 deletions
Show diff stats
app/views/profile/members.html.erb
... | ... | @@ -6,23 +6,6 @@ |
6 | 6 | <% cache_timeout(profile.members_cache_key(params), 4.hours) do %> |
7 | 7 | <div class="profile-members-tabs-container"> |
8 | 8 | <% tabs = [] %> |
9 | - <% div_admins = content_tag :div, :class => "profile-admins" do | |
10 | - render :partial => 'profile_members_list', | |
11 | - :locals => { | |
12 | - :users => @profile_admins, | |
13 | - :role => "admins" | |
14 | - } | |
15 | - end %> | |
16 | - | |
17 | - <% admins_pagination = content_tag :div, :class => "pagination-profile-admins" do | |
18 | - pagination_links @profile_admins, :param_name => 'npage' | |
19 | - end %> | |
20 | - | |
21 | - <% tabs << {:title => "#{@profile_admins.size} "+_("Administrators"), | |
22 | - :id => "admins-tab", | |
23 | - :content => (div_admins+admins_pagination) | |
24 | - } %> | |
25 | - | |
26 | 9 | |
27 | 10 | <% div_members = content_tag :div, :class => "profile-members" do |
28 | 11 | render :partial => 'profile_members_list', |
... | ... | @@ -30,24 +13,38 @@ |
30 | 13 | :users => @profile_members, |
31 | 14 | :role => "members" |
32 | 15 | } |
33 | - | |
34 | 16 | end %> |
35 | 17 | |
36 | 18 | <% members_pagination = content_tag :div, :class => "pagination-profile-members" do |
37 | 19 | pagination_links @profile_members, :param_name => 'npage' |
38 | 20 | end %> |
39 | 21 | |
40 | - | |
41 | 22 | <% tabs << {:title => "#{@profile_members.size} "+_("Members"), |
42 | 23 | :id => "members-tab", |
43 | 24 | :content => (div_members + members_pagination) |
44 | 25 | } %> |
45 | 26 | |
27 | + <% div_admins = content_tag :div, :class => "profile-admins" do | |
28 | + render :partial => 'profile_members_list', | |
29 | + :locals => { | |
30 | + :users => @profile_admins, | |
31 | + :role => "admins" | |
32 | + } | |
33 | + end %> | |
34 | + | |
35 | + <% admins_pagination = content_tag :div, :class => "pagination-profile-admins" do | |
36 | + pagination_links @profile_admins, :param_name => 'npage' | |
37 | + end %> | |
38 | + | |
39 | + <% tabs << {:title => "#{@profile_admins.size} "+_("Administrators"), | |
40 | + :id => "admins-tab", | |
41 | + :content => (div_admins+admins_pagination) | |
42 | + } %> | |
43 | + | |
46 | 44 | <%= render_tabs(tabs) %> |
47 | 45 | <% end %> |
48 | 46 | </div> |
49 | 47 | |
50 | - | |
51 | 48 | <% button_bar do %> |
52 | 49 | <%= button :back, _('Go back'), { :controller => 'profile' } %> |
53 | 50 | <% if profile.community? and user %> | ... | ... |