projects_role.codeviewer=Role: 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 apply_template_form
bad_request('There are currently no results to apply the permission template to') if params[:projects].blank?
- @permission_templates = Internal.permission_templates.selectAllPermissionTemplates().collect {|pt| [pt.name, pt.id]}
+ @permission_templates = Internal.permission_templates.selectAllPermissionTemplates().collect {|pt| [pt.name, pt.key]}
render :partial => 'apply_template_form', :locals => {:components => params[:projects], :qualifier => params[:qualifier] || 'TRK'}
end
def apply_template
verify_post_request
- require_parameters :template_id
+ require_parameters :template_key
Internal.permissions.applyPermissionTemplate(params)
redirect_to :action => 'projects'
end
<input type="hidden" name="components" id="apply-template-components" value="<%= components.join(',') %>"/>
<fieldset>
<div class="modal-head">
- <h2><%= message('roles.apply_template.form.title', {:params => ''}) -%></h2>
+ <h2><%= message('projects_role.apply_template.form.title', {:params => ''}) -%></h2>
</div>
<div class="modal-body">
<div class="apply-template errors error" style="display:none;"/>
<div class="modal-field">
<span><%= "Select the template to apply to #{components.size} #{message('qualifier.' + qualifier)}(s):" %></span><br/>
- <%= select_tag('template_id', options_for_select(@permission_templates, -1)) %>
+ <%= select_tag('template_key', options_for_select(@permission_templates, -1)) %>
</div>
</div>
<div class="modal-foot">