measure_filter.criteria.name=Name
measure_filter.criteria.language=Language
measure_filter.criteria.metric=Metric
+measure_filter.criteria.project=Project
measure_filter.criteria.age.from_date=From date
measure_filter.criteria.age.to_date=To date
measure_filter.criteria.age.note=year-month-day (2012-01-31)
widget.resource_id=project
widget.welcome.name=Welcome
-widget.welcome.description=
+widget.welcome.description=Welcome message used to provide links to the most valuable resources like documentation and support
widget.welcome.html=<h3>Welcome to Sonar Dashboard</h3>\
<p>Since you are able to read this, it means that you have successfully started your Sonar server. Well done!</p>\
<p>If you have not removed this text, it also means that you have not yet played much with Sonar. So here are a few pointers for your next step:</p>\
}
var hiddenConditionIndexes = [<%= hidden_condition_indexes.join(',') -%>];
$j(document).ready(function () {
- $j('#select-lang').select2({allowClear:true, width:'100%', placeholder:'<%= message 'measure_filter.languages' -%>'});
- $j('#select-qualifiers').select2({allowClear:true, width:'100%', placeholder:'Resources'});
+ $j('#select-lang').select2({allowClear: true, width: '100%', placeholder: '<%= message 'measure_filter.languages' -%>'});
+ $j('#select-qualifiers').select2({allowClear: true, width: '100%', placeholder: 'Resources'});
$j('#more-criteria')
- .select2({allowClear:true, width:'100%', placeholder:'<%= message 'measure_filter.more_criteria' -%>'})
+ .select2({allowClear: true, width: '100%', placeholder: '<%= message 'measure_filter.more_criteria' -%>'})
.on("change", function (e) {
$j("#criteria-" + e.val).insertBefore($j("#more-td")).show();
- if (e.val == 'lang') {
+ if (e.val == 'lang' || e.val == 'project') {
$j("#select-" + e.val).select2("enable");
$j("#select-" + e.val).select2("focus");
}
if @filter.display
%>
<input type="hidden" name="display" value="<%= @filter.display.key -%>"/>
- <%
+ <%
@filter.display.url_params.each do |k_v_array|
if k_v_array[1].is_a?(String)
- %>
+ %>
<%= hidden_field_tag k_v_array[0], k_v_array[1] -%>
<% else
k_v_array[1].each do |string_val|
<li class="sidebar-title">
<%= @filter.name.present? ? h(@filter.name) : 'New Search' -%>
</li>
- <li>
- <%= resource_select_tag 'baseId', :resource_type_property => 'supportsGlobalDashboards', :width => '100%', :selected_resource => @filter.base_resource, :placeholder => 'Path' -%>
- </li>
<li>
<%
qualifiers = Api::Utils.java_facade.getResourceTypesForFilter().map do |resource_type|
%>
<%= select_tag 'qualifiers[]', options_for_select(qualifiers, @filter.criteria['qualifiers']||''), :multiple => true, :id => 'select-qualifiers' -%>
</li>
+ <li id="criteria-project" <%= "style='display:none'" unless @filter.base_resource -%>>
+ <%= resource_select_tag 'baseId', :resource_type_property => 'supportsGlobalDashboards', :width => '100%', :selected_resource => @filter.base_resource, :placeholder => message('project'), :html_id => 'select-project' -%>
+ </li>
<li id="criteria-lang" <%= "style='display:none'" unless @filter.criteria('languages') -%>>
<% languages = [['', '']].concat(Api::Utils.languages.map { |lang| [lang.name, lang.key] }) %>
<%= select_tag 'languages[]', options_for_select(languages, @filter.criteria['languages']), :multiple => true, :id => 'select-lang' -%>
<option value="lang"><%= message 'measure_filter.criteria.language' -%></option>
<option value="metric"><%= message 'measure_filter.criteria.metric' -%></option>
<option value="name"><%= message 'measure_filter.criteria.name' -%></option>
+ <option value="project"><%= message 'measure_filter.criteria.project' -%></option>
</select>
</li>
<li>