quality_profiles.associated_projects=Associated projects
quality_profiles.no_projects_associated_to_profile_x=No projects are explicitly associated to the profile "{0}".
quality_profiles.projects_warning=List of projects explicitly associated to this Quality profile :
-quality_profiles.no_permalinks=No permalinks
quality_profiles.including_x_overriding.suffix=, incl. {0} overriding
quality_profiles.profile_cant_be_edited=This profile can not be edited.
quality_profiles.set_parent=Set parent
quality_profiles.with_same_configuration=With same configuration
quality_profiles.x_rules_only_in={0} rules only in
quality_profiles.x_rules_have_different_configuration={0} rules have a different configuration
+quality_profiles.export_all_rules=All rules
#------------------------------------------------------------------------------
else
profile = Profile.find_by_name_and_language(CGI::unescape(params[:name]), language)
end
- exporter_key = params[:format]
- result = java_facade.exportProfile(profile.id, exporter_key)
- send_data(result, :type => java_facade.getProfileExporterMimeType(exporter_key), :disposition => 'inline')
+ if (params[:format].blank?)
+ result = java_facade.backupProfile(profile.id)
+ send_data(result, :type => 'text/xml', :disposition => 'inline')
+ else
+ exporter_key = params[:format]
+ result = java_facade.exportProfile(profile.id, exporter_key)
+ send_data(result, :type => java_facade.getProfileExporterMimeType(exporter_key), :disposition => 'inline')
+ end
end
#
<div class="tabs-panel marginbottom10 ">
<% exporters=controller.java_facade.getProfileExportersForLanguage(@profile.language) %>
- <% if exporters.empty? %>
- <p><%= message('quality_profiles.no_permalinks') -%></p>
- <% else %>
- <br/>
- <table class="data without-header marginbottom10" id="permalinks-table">
- <tbody>
- <% exporters.to_a.sort{|x,y| x.getName() <=> y.getName()}.each do |exporter| %>
- <tr class="<%= cycle('even','odd') -%>">
- <td width="1%" nowrap>
- <%= h exporter.getName() -%>
- </td>
- <td>
- <% permalink=url_for :controller => 'profiles', :action => 'export', :language => @profile.language, :name => url_encode(@profile.name), :format => exporter.getKey(), :only_path => false %>
- <span class="small"><%= link_to permalink, permalink, :id => "export_" + exporter.getKey().to_s + "_" + u(@profile.key) %></span>
- </td>
- </tr>
- <% end %>
- </tbody>
- </table>
- <% end %>
-</div>
\ No newline at end of file
+ <br/>
+ <table class="data without-header marginbottom10" id="permalinks-table">
+ <tbody>
+ <tr class="odd">
+ <td width="1%" nowrap>
+ <%= message('quality_profiles.export_all_rules') -%>
+ </td>
+ <td>
+ <% permalink = url_for :controller => 'profiles', :action => 'export', :language => @profile.language, :name => url_encode(@profile.name), :only_path => false %>
+ <span class="small"><%= link_to permalink, permalink %></span>
+ </td>
+ </tr>
+ <% exporters.to_a.sort{|x,y| x.getName() <=> y.getName()}.each do |exporter| %>
+ <tr class="<%= cycle('even','odd') -%>">
+ <td width="1%" nowrap>
+ <%= h exporter.getName() -%>
+ </td>
+ <td>
+ <% permalink=url_for :controller => 'profiles', :action => 'export', :language => @profile.language, :name => url_encode(@profile.name), :format => exporter.getKey(), :only_path => false %>
+ <span class="small"><%= link_to permalink, permalink, :id => "export_" + exporter.getKey().to_s + "_" + u(@profile.key) %></span>
+ </td>
+ </tr>
+ <% end %>
+ </tbody>
+ </table>
+</div>