#------------------------------------------------------------------------------
#
-# PROJECTS ROLES
+# PROJECTS PERMISSIONS
#
#------------------------------------------------------------------------------
projects_role.criteria.name=Name contains
projects_role.role=Role Membership For New
projects_role.users=Users
projects_role.groups=Groups
-projects_role.admin=Role: Administrators
+projects_role.admin=Administrators
projects_role.admin.desc=Ability to perform administration tasks for the project by accessing its settings.
-projects_role.user=Role: Users
+projects_role.user=Users
projects_role.user.desc=Ability to browse the measures and to create/edit issues on the project.
-projects_role.codeviewer=Role: Code Viewers
+projects_role.codeviewer=Code Viewers
projects_role.codeviewer.desc=Ability to view the source code of the project.
projects_role.apply_template=Apply permission template
projects_role.apply_template.form.title=Apply permission template
def edit_users
@project=Project.by_key(params[:resource]) if params[:resource].present?
@role = params[:role]
+ render :partial => 'edit_users'
end
def edit_groups
@project=Project.by_key(params[:resource]) if params[:resource].present?
@role = params[:role]
- end
-
- def edit_default_project_groups
- bad_request('Missing role') if params[:role].blank?
- bad_request('Missing qualifier') if params[:qualifier].blank?
- end
-
- def edit_default_project_users
- bad_request('Missing role') if params[:role].blank?
- bad_request('Missing qualifier') if params[:qualifier].blank?
+ render :partial => 'edit_groups'
end
def apply_template_form
def set_users
bad_request('Missing role') if params[:role].blank?
UserRole.grant_users(params[:users], params[:role], params[:resource])
- redirect
+ render :text => '', :status => 200
end
def set_groups
<input type="hidden" name="permission" value="<%= @permission -%>"/>
<fieldset>
<div class="modal-head">
- <h2><%= message("permission_template.edit_permissions") -%></h2>
+ <h2><%= message('permission_template.edit_permissions') -%></h2>
</div>
<div class="modal-body">
+ <div id="permission-template-error" class="permission-template error" style="display:none;" />
<table>
<tbody>
<tr>
</table>
</div>
<div class="modal-foot">
- <input type="submit" onclick="SelectBox.select_all('to');" value="<%= h message("permission_template.update_permissions") -%>" id="submit-permission-template-update"/>
+ <input type="submit" onclick="SelectBox.select_all('to');" value="<%= h message('permission_template.update_permissions') -%>" id="submit-permission-template-update"/>
<a href="#" onclick="return closeModalWindow()" id="cancel-update-template"><%= h message('cancel') -%></a>
</div>
</fieldset>
},
error: function (xhr, textStatus, errorThrown) {
var htmlClass = 'permission-template';
- $j('input[id^="submit-permission-template"]').removeAttr('disabled');
- $j('.' + htmlClass + '.errors').show();
- $j('.' + htmlClass + '.errors').html(xhr.responseText);
+ $j('input[id="submit-permission-template-update"]').removeAttr('disabled');
+ $j('.' + htmlClass + '.error').show();
+ $j('.' + htmlClass + '.error').html(xhr.responseText);
}
});
</script>
<h2><%= message('permission_template.edit_permissions') -%></h2>
</div>
<div class="modal-body">
+ <div id="permission-template-error" class="permission-template error" style="display:none;" />
<table>
<tbody>
<tr>
<script>
SelectBox.init('from');
SelectBox.init('to');
+
$j("#permission-template-form").modalForm({
success: function (data) {
window.location.reload();
},
error: function (xhr, textStatus, errorThrown) {
var htmlClass = 'permission-template';
- $j('input[id^="submit-permission-template"]').removeAttr('disabled');
- $j('.' + htmlClass + '.errors').show();
- $j('.' + htmlClass + '.errors').html(xhr.responseText);
+ $j('input[id="submit-permission-template-update"]').removeAttr('disabled');
+ $j('.' + htmlClass + '.error').show();
+ $j('.' + htmlClass + '.error').html(xhr.responseText);
}
});
</script>
--- /dev/null
+<%
+ granted_groups=groups(@role, params[:resource])
+ ungranted_groups=all_groups - granted_groups
+%>
+<div>
+ <form id="permission-groups-form" action="<%= url_for :action => 'set_groups' -%>" method="post">
+ <input name="resource" value="<%= params[:resource] -%>" type="hidden"/>
+ <input name="role" value="<%= @role -%>" type="hidden"/>
+ <fieldset>
+ <div class="modal-head">
+ <h2><%= @project ? 'Edit permissions for: ' + h(@project.name) : "System #{role_name(@role)}" -%></h2>
+ </div>
+ <div class="modal-body">
+ <div id="permission-groups-error" class="permission-groups error" style="display:none;" />
+ <table>
+ <tbody>
+ <tr>
+ <td style="padding: 5px 0;" valign="top">
+ <h2>Add Groups</h2>
+ <select name="from" id="from" size="20" style="margin: 5px 0; width: 300px;" multiple="multiple">
+ <% ungranted_groups.each do |group| %>
+ <option value="<%= group ? group.id : '' -%>"><%= group_name(group) -%></option>
+ <% end %>
+ </select>
+ </td>
+ <td style="padding: 0 10px;" align="center">
+ <button id="select_right" onclick="SelectBox.move('from', 'to');SelectBox.sort('to');SelectBox.redisplay('to');return false;">select >></button><br>
+ <button id="select_right_all" onclick="SelectBox.move_all('from', 'to');return false;">select all >></button><br><br>
+ <button id="select_left" onclick="SelectBox.move('to', 'from');return false;"><< unselect</button><br>
+ <button id="select_left_all" onclick="SelectBox.move_all('to', 'from');return false;"><< unselect all</button>
+ </td>
+ <td class="box" style="padding: 5px 10px;" valign="top">
+ <h2>Role: <%= @project ? role_name(@role) : global_role_name(@role) -%></h2>
+
+ <select name="groups[]" id="to" size="20" multiple="multiple" style="margin: 5px 0pt; width: 300px;">
+ <% granted_groups.each do |group| %>
+ <option value="<%= group ? group.id : '' -%>"><%= group_name(group) -%></option>
+ <% end %>
+ </select><br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="modal-foot">
+ <input type="submit" onclick="SelectBox.select_all('to');" value="<%= h message('save') -%>" id="submit-permission-groups-update"/>
+ <a href="#" onclick="return closeModalWindow()" id="cancel-update-permission-groups"><%= h message('cancel') -%></a>
+ </div>
+ </fieldset>
+ </form>
+ <script>
+ SelectBox.init('from');
+ SelectBox.init('to');
+
+ $j("#permission-groups-form").modalForm({
+ success: function (data) {
+ window.location.reload();
+ },
+ error: function (xhr, textStatus, errorThrown) {
+ var htmlClass = 'permission-groups';
+ $j('input[id="submit-permission-groups-update"]').removeAttr('disabled');
+ $j('.' + htmlClass + '.error').show();
+ $j('.' + htmlClass + '.error').html(xhr.responseText);
+ }
+ });
+ </script>
+</div>
--- /dev/null
+<%
+ granted_users=users(@role, params[:resource])
+ ungranted_users=(all_users - granted_users)
+%>
+<form id="permission-users-form" action="<%= url_for :action => 'set_users' -%>" method="post">
+ <input name="resource" value="<%= params[:resource] -%>" type="hidden"/>
+ <input name="role" value="<%= @role -%>" type="hidden" />
+ <fieldset>
+ <div class="modal-head">
+ <h2><%= @project ? 'Edit permissions for: ' + h(@project.name) : "System #{role_name(@role)}" -%></h2>
+ </div>
+ <div class="modal-body">
+ <div id="permission-users-error" class="permission-users error" style="display:none;" />
+ <table>
+ <tbody>
+ <tr>
+ <td style="padding: 5px 0;" valign="top">
+ <h2>Add Users</h2>
+ <select name="from" id="from" size="30" style="margin: 5px 0; width: 300px;" multiple="multiple">
+ <% ungranted_users.each do |user| %>
+ <option value="<%= user.id -%>"><%= user.name -%></option>
+ <% end %>
+ </select>
+ </td>
+ <td style="padding: 0 10px;" align="center">
+ <button id="select_right" onclick="SelectBox.move('from', 'to');SelectBox.sort('to');SelectBox.redisplay('to');return false;">select >></button><br>
+ <button id="select_right_all" onclick="SelectBox.move_all('from', 'to');return false;">select all >></button><br><br>
+ <button id="select_left" onclick="SelectBox.move('to', 'from');return false;"><< unselect</button><br>
+ <button id="select_left_all" onclick="SelectBox.move_all('to', 'from');return false;"><< unselect all</button>
+ </td>
+ <td class="box" style="padding: 5px 10px;" valign="top">
+ <h2>Permission: <%= @project ? role_name(@role) : global_role_name(@role) -%></h2>
+
+ <select name="users[]" id="to" size="30" multiple="multiple" style="margin: 5px 0; width: 300px;">
+ <%= options_from_collection_for_select(granted_users, "id", "name") %>
+ </select><br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="modal-foot">
+ <input type="submit" onclick="SelectBox.select_all('to');" value="<%= h message('save') -%>" id="submit-permission-users-update"/>
+ <a href="#" onclick="return closeModalWindow()" id="cancel-update-permission-users"><%= h message('cancel') -%></a>
+ </div>
+ </fieldset>
+</form>
+<script>
+ SelectBox.init('from');
+ SelectBox.init('to');
+
+ $j("#permission-users-form").modalForm({
+ success: function (data) {
+ window.location.reload();
+ },
+ error: function (xhr, textStatus, errorThrown) {
+ var htmlClass = 'permission-users';
+ $j('input[id="submit-permission-users-update"]').removeAttr('disabled');
+ $j('.' + htmlClass + '.error').show();
+ $j('.' + htmlClass + '.error').html(xhr.responseText);
+ }
+ });
+</script>
+
+++ /dev/null
-<%
- granted_groups=default_project_group_names(params[:role], params[:qualifier])
- all_groups = ['Anyone'].concat(Api::Utils.insensitive_sort(Group.all.map{|group| group.name}))
- ungranted_groups=all_groups - granted_groups
-%>
-<div class="subtitle">» <a href="<%= url_for :action => params[:redirect], :q => params[:q], :qualifier => params[:qualifier] -%>">Back</a></div>
-<h1>Role Membership For New <%= message("qualifiers.#{params[:qualifier]}") -%></h1>
-<br/>
-<div>
- <form action="<%= url_for :action => 'set_default_project_groups' -%>" method="POST">
- <input name="role" value="<%= params[:role] -%>" type="hidden"/>
- <input name="redirect" value="projects" type="hidden"/>
- <input name="q" value="<%= params[:q] -%>" type="hidden" />
- <input name="qualifier" value="<%= params[:qualifier] -%>" type="hidden" />
- <input name="page" value="<%= params[:page] -%>" type="hidden" />
- <table>
- <tbody>
- <tr>
- <td style="padding: 5px 0;" valign="top">
- <h2>Add Groups</h2>
- <select name="from" id="from" size="20" style="margin: 5px 0; width: 300px;" multiple="multiple">
- <% ungranted_groups.each do |group| %>
- <option value="<%= h group -%>"><%= group -%></option>
- <% end %>
- </select>
- </td>
- <td style="padding: 0 10px;" align="center">
- <button id="select_right" onclick="SelectBox.move('from', 'to');SelectBox.sort('to');SelectBox.redisplay('to');return false;">select >></button><br>
- <button id="select_right_all" onclick="SelectBox.move_all('from', 'to');return false;">select all >></button><br><br>
- <button id="select_left" onclick="SelectBox.move('to', 'from');return false;"><< unselect</button><br>
- <button id="select_left_all" onclick="SelectBox.move_all('to', 'from');return false;"><< unselect all</button>
- </td>
- <td class="box" style="padding: 5px 10px;" valign="top">
- <h2>Role: <%= role_name(params[:role]) -%></h2>
-
- <select name="groups[]" id="to" size="20" multiple="multiple" style="margin: 5px 0; width: 300px;">
- <% granted_groups.each do |group| %>
- <option value="<%= h group -%>"><%= group -%></option>
- <% end %>
- </select><br>
-
- <div style="padding: 5px 0;">
- <input id="save" value="Save" onclick="SelectBox.select_all('to');submit();return false;" type="submit">
- <a href="<%= url_for :action => params[:redirect], :q => params[:q], :qualifier => params[:qualifier] -%>"><%= message 'cancel' -%></a>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- <script>
- SelectBox.init('from');
- SelectBox.init('to');
- </script>
-</div>
+++ /dev/null
-<%
- granted_users=default_project_users(params[:role], params[:qualifier])
- ungranted_users=all_users - granted_users
-%>
-<div class="subtitle">» <a href="<%= url_for :action => params[:redirect], :q => params[:q], :qualifier => params[:qualifier] -%>">Back</a></div>
-<h1>Role Membership For New <%= message("qualifiers.#{params[:qualifier]}") -%></h1>
-<br/>
-<div>
- <form action="<%= url_for :action => 'set_default_project_users' -%>" method="POST">
- <input name="role" value="<%= params[:role] -%>" type="hidden"/>
- <input name="redirect" value="projects" type="hidden"/>
- <input name="q" value="<%= params[:q] -%>" type="hidden" />
- <input name="qualifier" value="<%= params[:qualifier] -%>" type="hidden" />
- <input name="page" value="<%= params[:page] -%>" type="hidden" />
- <table>
- <tbody>
- <tr>
- <td style="padding: 5px 0;" valign="top">
- <h2>Add Users</h2>
- <select name="from" id="from" size="20" style="margin: 5px 0; width: 300px;" multiple="multiple">
- <% ungranted_users.each do |user| %>
- <option value="<%= h user.login -%>"><%= h user.name -%></option>
- <% end %>
- </select>
- </td>
- <td style="padding: 0 10px;" align="center">
- <button id="select_right" onclick="SelectBox.move('from', 'to');SelectBox.sort('to');SelectBox.redisplay('to');return false;">select >></button><br>
- <button id="select_right_all" onclick="SelectBox.move_all('from', 'to');return false;">select all >></button><br><br>
- <button id="select_left" onclick="SelectBox.move('to', 'from');return false;"><< unselect</button><br>
- <button id="select_left_all" onclick="SelectBox.move_all('to', 'from');return false;"><< unselect all</button>
- </td>
- <td class="box" style="padding: 5px 10px;" valign="top">
- <h2>Role: <%= role_name(params[:role]) -%></h2>
-
- <select name="logins[]" id="to" size="20" multiple="multiple" style="margin: 5px 0; width: 300px;">
- <% granted_users.each do |user| %>
- <option value="<%= h user.login -%>"><%= h user.name -%></option>
- <% end %>
- </select><br>
-
- <div style="padding: 5px 0;">
- <input id="save" value="Save" onclick="SelectBox.select_all('to');submit();return false;" type="submit">
- <a href="<%= url_for :action => params[:redirect], :q => params[:q], :qualifier => params[:qualifier] -%>"><%= message 'cancel' -%></a>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- <script>
- SelectBox.init('from');
- SelectBox.init('to');
- </script>
-</div>
+++ /dev/null
-<%
- granted_groups=groups(@role, params[:resource])
- ungranted_groups=all_groups - granted_groups
- if @project
- title='Role Membership For: ' + h(@project.name)
- else
- title="#{global_role_name(@role)}"
- end
-%>
-<div class="subtitle">» <a href="<%= url_for :action => params[:redirect], :q => params[:q], :qualifier => params[:qualifier] -%>">Back</a></div>
-<h1><%= title %></h1>
-<br/>
-<div>
- <form action="<%= url_for :action => 'set_groups' -%>" method="post">
- <input name="resource" value="<%= params[:resource] -%>" type="hidden"/>
- <input name="role" value="<%= @role -%>" type="hidden"/>
- <input name="redirect" value="<%= params[:redirect] -%>" type="hidden"/>
- <input name="q" value="<%= params[:q] -%>" type="hidden" />
- <input name="qualifier" value="<%= params[:qualifier] -%>" type="hidden" />
- <input name="page" value="<%= params[:page] -%>" type="hidden" />
- <table>
- <tbody>
- <tr>
- <td style="padding: 5px 0;" valign="top">
- <h2>Add Groups</h2>
- <select name="from" id="from" size="20" style="margin: 5px 0; width: 300px;" multiple="multiple">
- <% ungranted_groups.each do |group| %>
- <option value="<%= group ? group.id : '' -%>"><%= group_name(group) -%></option>
- <% end %>
- </select>
- </td>
- <td style="padding: 0 10px;" align="center">
- <button id="select_right" onclick="SelectBox.move('from', 'to');SelectBox.sort('to');SelectBox.redisplay('to');return false;">select >></button><br>
- <button id="select_right_all" onclick="SelectBox.move_all('from', 'to');return false;">select all >></button><br><br>
- <button id="select_left" onclick="SelectBox.move('to', 'from');return false;"><< unselect</button><br>
- <button id="select_left_all" onclick="SelectBox.move_all('to', 'from');return false;"><< unselect all</button>
- </td>
- <td class="box" style="padding: 5px 10px;" valign="top">
- <h2>Role: <%= @project ? role_name(@role) : global_role_name(@role) -%></h2>
-
- <select name="groups[]" id="to" size="20" multiple="multiple" style="margin: 5px 0pt; width: 300px;">
- <% granted_groups.each do |group| %>
- <option value="<%= group ? group.id : '' -%>"><%= group_name(group) -%></option>
- <% end %>
- </select><br>
-
- <div style="padding: 5px 0;">
- <input id="save" value="Save" onclick="SelectBox.select_all('to');submit();return false;" type="submit">
- <a href="<%= url_for :action => params[:redirect], :q => params[:q], :qualifier => params[:qualifier] -%>"><%= message 'cancel' -%></a>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- <script>
- SelectBox.init('from');
- SelectBox.init('to');
- </script>
-</div>
+++ /dev/null
-<%
- granted_users=users(@role, params[:resource])
- ungranted_users=(all_users - granted_users)
- if @project
- title='Role Membership For: ' + h(@project.name)
- else
- title="#{global_role_name(@role)}"
- end
-%>
-<div class="subtitle">» <a href="<%= url_for :action => params[:redirect], :q => params[:q], :qualifier => params[:qualifier] -%>">Back</a></div>
-<h1><%= title %></h1>
-<br/>
-<div id="main_content">
- <form action="<%= url_for :action => 'set_users' -%>" method="post">
- <input name="resource" value="<%= params[:resource] -%>" type="hidden"/>
- <input name="role" value="<%= @role -%>" type="hidden" />
- <input name="redirect" value="<%= params[:redirect] -%>" type="hidden" />
- <input name="q" value="<%= params[:q] -%>" type="hidden" />
- <input name="qualifier" value="<%= params[:qualifier] -%>" type="hidden" />
- <input name="page" value="<%= params[:page] -%>" type="hidden" />
- <table>
- <tbody>
- <tr>
- <td style="padding: 5px 0;" valign="top">
- <h2>Add Users</h2>
- <select name="from" id="from" size="30" style="margin: 5px 0; width: 300px;" multiple="multiple">
- <% ungranted_users.each do |user| %>
- <option value="<%= user.id -%>"><%= user.name -%></option>
- <% end %>
- </select>
- </td>
- <td style="padding: 0 10px;" align="center">
- <button id="select_right" onclick="SelectBox.move('from', 'to');SelectBox.sort('to');SelectBox.redisplay('to');return false;">select >></button><br>
- <button id="select_right_all" onclick="SelectBox.move_all('from', 'to');return false;">select all >></button><br><br>
- <button id="select_left" onclick="SelectBox.move('to', 'from');return false;"><< unselect</button><br>
- <button id="select_left_all" onclick="SelectBox.move_all('to', 'from');return false;"><< unselect all</button>
- </td>
- <td class="box" style="padding: 5px 10px;" valign="top">
- <h2>Role: <%= @project ? role_name(@role) : global_role_name(@role) -%></h2>
-
- <select name="users[]" id="to" size="30" multiple="multiple" style="margin: 5px 0; width: 300px;">
- <%= options_from_collection_for_select(granted_users, "id", "name") %>
- </select><br>
-
- <div style="padding: 5px 0;">
- <input id="save" value="Save" onclick="SelectBox.select_all('to');submit();return false;" type="submit">
- <a href="<%= url_for :action => params[:redirect], :q => params[:q], :qualifier => params[:qualifier] -%>"><%= message 'cancel' -%></a>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- <script>
- SelectBox.init('from');
- SelectBox.init('to');
- </script>
-</div>
<span class="small gray"><%= message('global_permissions.' + global_permission_key + '.desc') -%></span></td>
<td valign="top" style="word-break:break-all;width:30%;">
<span><%= users(global_permission_key).map(&:name).join(', ') -%></span>
- (<%= link_to "select", {:action => 'edit_users', :role => global_permission_key, :redirect => 'global'}, :class => 'link-action', :id => "select-users-#{global_permission_key}" -%>)
+ (<%= link_to message('select'), {:action => :edit_users, :role => global_permission_key},
+ :id => "select-users-#{global_permission_key}", :class => 'open-modal link-action', 'modal-width' => '760px' %>)<br/>
</td>
<td valign="top" style="word-break:break-all;width:30%;">
<span><%= groups(global_permission_key).map{|g| group_name(g)}.join(', ') %></span>
- (<%= link_to "select", {:action => 'edit_groups', :role => global_permission_key, :redirect => 'global'}, :class => 'link-action', :id => "select-groups-#{global_permission_key}" -%>)
+ (<%= link_to message('select'), {:action => :edit_groups, :role => global_permission_key},
+ :id => "select-groups-#{global_permission_key}", :class => 'open-modal link-action', 'modal-width' => '760px' %>)<br/>
</td>
</tr>
<% end %>
groups=Api::Utils.insensitive_sort(project.group_roles.select { |gr| gr.role=='admin' }.map { |gr| group_name(gr.group) })
%>
<span id="u-admin-<%= u project.kee -%>"><%= users.join(', ') %></span>
- (<a href="<%= ApplicationController.root_context -%>/roles/edit_users?redirect=projects&role=admin&resource=<%= project.id -%>&q=<%= u params[:q] -%>&qualifier=<%= @qualifier -%>&page=<%= params[:page] -%>" class="link-action" id="selectu-admin-<%= u project.kee -%>">select users</a>)<br/>
+ (<%= link_to message('select users'), {:action => :edit_users, :role => 'admin', :resource => project.id},
+ :id => "selectu-admin-#{u project.kee}", :class => 'open-modal link-action', 'modal-width' => '760px' %>)<br/>
<span id="g-admin-<%= u project.kee -%>"><%= groups.join(', ') %></span>
- (<a href="<%= ApplicationController.root_context -%>/roles/edit_groups?redirect=projects&role=admin&resource=<%= project.id -%>&q=<%= u params[:q] -%>&qualifier=<%= @qualifier -%>&page=<%= params[:page] -%>" class="link-action" id="selectg-admin-<%= u project.kee -%>">select groups</a>)
+ (<%= link_to message('select groups'), {:action => :edit_groups, :role => 'admin', :resource => project.id},
+ :id => "selectg-admin-#{u project.kee}", :class => 'open-modal link-action', 'modal-width' => '760px' %>)<br/>
</td>
<td valign="top">
<%
groups=Api::Utils.insensitive_sort(project.group_roles.select { |gr| gr.role=='user' }.map { |gr| group_name(gr.group) })
%>
<span id="u-user-<%= u project.kee -%>"><%= users.join(', ') %></span>
- (<a href="<%= ApplicationController.root_context -%>/roles/edit_users?redirect=projects&role=user&resource=<%= project.id -%>&q=<%= u params[:q] -%>&qualifier=<%= @qualifier -%>&page=<%= params[:page] -%>" class="link-action" id="selectu-user-<%= u project.kee -%>">select users</a>)<br/>
+ (<%= link_to message('select users'), {:action => :edit_users, :role => 'user', :resource => project.id},
+ :id => "selectu-user-#{u project.kee}", :class => 'open-modal link-action', 'modal-width' => '760px' %>)<br/>
<span id="g-user-<%= u project.kee -%>"><%= groups.join(', ') %></span>
- (<a href="<%= ApplicationController.root_context -%>/roles/edit_groups?redirect=projects&role=user&resource=<%= project.id -%>&q=<%= u params[:q] -%>&qualifier=<%= @qualifier -%>&page=<%= params[:page] -%>" class="link-action" id="selectg-user-<%= u project.kee -%>">select groups</a>)
+ (<%= link_to message('select groups'), {:action => :edit_groups, :role => 'user', :resource => project.id},
+ :id => "selectg-user-#{u project.kee}", :class => 'open-modal link-action', 'modal-width' => '760px' %>)<br/>
</td>
<td valign="top">
<%
groups=Api::Utils.insensitive_sort(project.group_roles.select { |gr| gr.role=='codeviewer' }.map { |gr| group_name(gr.group) })
%>
<span id="u-codeviewer-<%= u project.kee -%>"><%= users.join(', ') %></span>
- (<a href="<%= ApplicationController.root_context -%>/roles/edit_users?redirect=projects&role=codeviewer&resource=<%= project.id -%>&q=<%= u params[:q] -%>&qualifier=<%= @qualifier -%>&page=<%= params[:page] -%>" class="link-action" id="selectu-codeviewer-<%= u project.kee -%>">select users</a>)<br/>
+ (<%= link_to message('select users'), {:action => :edit_users, :role => 'codeviewer', :resource => project.id},
+ :id => "selectu-codeviewer-#{u project.kee}", :class => 'open-modal link-action', 'modal-width' => '760px' %>)<br/>
<span id="g-codeviewer-<%= u project.kee -%>"><%= groups.join(', ') %></span>
- (<a href="<%= ApplicationController.root_context -%>/roles/edit_groups?redirect=projects&role=codeviewer&resource=<%= project.id -%>&q=<%= u params[:q] -%>&qualifier=<%= @qualifier -%>&page=<%= params[:page] -%>" class="link-action" id="selectg-codeviewer-<%= u project.kee -%>">select groups</a>)
+ (<%= link_to message('select groups'), {:action => :edit_groups, :role => 'codeviewer', :resource => project.id},
+ :id => "selectg-codeviewer-#{u project.kee}", :class => 'open-modal link-action', 'modal-width' => '760px' %>)<br/>
</td>
</tr>
<%