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,23 +6,6 @@ | ||
6 | <% cache_timeout(profile.members_cache_key(params), 4.hours) do %> | 6 | <% cache_timeout(profile.members_cache_key(params), 4.hours) do %> |
7 | <div class="profile-members-tabs-container"> | 7 | <div class="profile-members-tabs-container"> |
8 | <% tabs = [] %> | 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 | <% div_members = content_tag :div, :class => "profile-members" do | 10 | <% div_members = content_tag :div, :class => "profile-members" do |
28 | render :partial => 'profile_members_list', | 11 | render :partial => 'profile_members_list', |
@@ -30,24 +13,38 @@ | @@ -30,24 +13,38 @@ | ||
30 | :users => @profile_members, | 13 | :users => @profile_members, |
31 | :role => "members" | 14 | :role => "members" |
32 | } | 15 | } |
33 | - | ||
34 | end %> | 16 | end %> |
35 | 17 | ||
36 | <% members_pagination = content_tag :div, :class => "pagination-profile-members" do | 18 | <% members_pagination = content_tag :div, :class => "pagination-profile-members" do |
37 | pagination_links @profile_members, :param_name => 'npage' | 19 | pagination_links @profile_members, :param_name => 'npage' |
38 | end %> | 20 | end %> |
39 | 21 | ||
40 | - | ||
41 | <% tabs << {:title => "#{@profile_members.size} "+_("Members"), | 22 | <% tabs << {:title => "#{@profile_members.size} "+_("Members"), |
42 | :id => "members-tab", | 23 | :id => "members-tab", |
43 | :content => (div_members + members_pagination) | 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 | <%= render_tabs(tabs) %> | 44 | <%= render_tabs(tabs) %> |
47 | <% end %> | 45 | <% end %> |
48 | </div> | 46 | </div> |
49 | 47 | ||
50 | - | ||
51 | <% button_bar do %> | 48 | <% button_bar do %> |
52 | <%= button :back, _('Go back'), { :controller => 'profile' } %> | 49 | <%= button :back, _('Go back'), { :controller => 'profile' } %> |
53 | <% if profile.community? and user %> | 50 | <% if profile.community? and user %> |