App.canWrite = r.canWrite
App.qualityProfiles = _.sortBy r.qualityprofiles, ['name', 'lang']
App.languages = _.extend r.languages, none: 'None'
+ _.map App.qualityProfiles, (profile) ->
+ profile.language = App.languages[profile.lang]
App.repositories = r.repositories
App.repositories.push
key: 'manual'
@options.app.codingRulesBulkChangeDropdownView.toggle()
- bulkEnabled: ->
- return false if @collection.isEmpty()
- resultLanguages = _.uniq(@collection.pluck 'lang')
- resultLanguages.length == 1
-
-
serializeData: ->
_.extend super,
canWrite: @options.app.canWrite
paging: @collection.paging
sorting: @collection.sorting
- bulkEnabled: @bulkEnabled()
return null unless @model.get('inherit') && @model.get('inherit') != 'NONE'
parentKey = @model.get('parent') + ':' + @model.get('lang')
parent = _.extend {}, _.findWhere(@options.app.qualityProfiles, key: parentKey)
- parentActiveInfo = @model.collection.findWhere(qProfile: parentKey) or {}
+ parentActiveInfo = @model.collection.findWhere(qProfile: parentKey) or new Backbone.Model()
_.extend parent, parentActiveInfo.toJSON()
parent
</ul>
<div class="navigator-actions-total">
{{t 'coding_rules.found'}}: <strong>{{paging.total}}</strong>
- {{#if canWrite}}{{#if bulkEnabled}}<a class="navigator-actions-bulk"
- title="{{t 'bulk_change'}}"><i class="icon-bulk-change"></i></a>{{/if}}{{/if}}
+ {{#if canWrite}}<a class="navigator-actions-bulk"
+ title="{{t 'bulk_change'}}"><i class="icon-bulk-change"></i></a>{{/if}}
</div>
{{#eq action 'deactivate'}}{{t 'coding_rules.deactivate_in'}}{{/eq}}
</label></h3>
{{#if qualityProfile}}
- <h3 class="readonly-field">{{qualityProfileName}}</h3>
+ <h3 class="readonly-field">{{qualityProfileName}}{{#notEq action 'change-severity'}} —
+ {{t 'are_you_sure'}}{{/notEq}}</h3>
{{else}}
<select id="coding-rules-bulk-change-profile">
{{#each availableQualityProfiles}}
- <option value="{{key}}">{{name}}</option>
+ <option value="{{key}}">{{name}} - {{language}}</option>
{{/each}}
</select>
{{/if}}
.readonly-field {
padding-top: 5px;
+ margin-left: -5px;
line-height: 1;
}