parent
57f2cf0e44
commit
0af1678515
@ -0,0 +1,7 @@ |
||||
<% users_by_role.keys.sort.each do |role| %> |
||||
<%=h role %>: <%= users_by_role[role].sort.collect{ |u| link_to_user u }.join("; ") %> |
||||
<% if users_by_role[role].count < count_users_by_role[role] %> |
||||
... (<%= count_users_by_role[role] - users_by_role[role].count %> more) |
||||
<% end %> |
||||
<br /> |
||||
<% end %> |
@ -1,11 +1,17 @@ |
||||
<h2 class="page-layout-only"><%=l(:label_member_plural)%></h2> |
||||
<h3><%=l(:label_member_plural)%></h3> |
||||
<% if users_by_role.any? %> |
||||
<div class="members overview"> |
||||
<div class="members overview" id="users_per_role"> |
||||
<p> |
||||
<% users_by_role.keys.sort.each do |role| %> |
||||
<%=h role %>: <%= users_by_role[role].sort.collect{ |u| link_to_user u }.join(", ") %><br /> |
||||
<% end %> |
||||
<%= render :partial => "members", |
||||
:locals => { :users_by_role => users_by_role(50), |
||||
:count_users_by_role => count_users_by_role } %> |
||||
</p> |
||||
<p> |
||||
<%= link_to("Show all", { :controller => 'my_projects_overviews', |
||||
:action => 'show_all_members', |
||||
:id => project.id }, |
||||
:class => "all" ) %> |
||||
</p> |
||||
</div> |
||||
<% end %> |
||||
|
@ -0,0 +1,22 @@ |
||||
/*globals jQuery, I18n*/ |
||||
|
||||
var MyProjectPage = (function ($) { |
||||
var init; |
||||
|
||||
init = function () { |
||||
$('#users_per_role .all').click(function () { |
||||
$('#users_per_role').html(''); |
||||
}); |
||||
|
||||
$.ajaxAppend({ |
||||
trigger: '.all', |
||||
indicator_class: 'ajax-indicator', |
||||
load_target: '#users_per_role', |
||||
loading_text: I18n.t("js.ajax.loading"), |
||||
loading_class: 'box loading' |
||||
}); |
||||
}; |
||||
|
||||
$('document').ready(init); |
||||
|
||||
}(jQuery)); |
Loading…
Reference in new issue