]> source.dussan.org Git - sonarqube.git/blob
b5d4295ccfad3d9c7bc5b1bdd2508f44f5bb8b7e
[sonarqube.git] /
1 <script id="coding-rules-detail-quality-profile-template" type="text/x-handlebars-template">
2   <div class="coding-rules-detail-quality-profile-name">{{name}}</div>
3
4   {{#if parent}}
5     <div class="coding-rules-detail-quality-profile-inheritance">
6       <i class="icon-inheritance"></i> {{t 'coding_rules.inherits'}} <strong>{{parent.name}}</strong>
7     </div>
8   {{/if}}
9
10   <ul class="coding-rules-detail-parameters coding-rules-detail-quality-profile-parameters">
11     <li class="coding-rules-detail-parameter">
12       <h3 class="coding-rules-detail-parameter-name">{{t 'severity'}}</h3>
13       <div class="coding-rules-detail-parameter-description">
14         <select class="coding-rules-detail-quality-profile-severity">
15           {{#each severities}}
16             <option value="{{this}}">{{t 'severity' this}}</option>
17           {{/each}}
18         </select>
19         {{#if parent}}
20           {{#notEq severity parent.severity}}
21             {{t 'coding_rules.original'}} {{severityIcon parent.severity}}{{t 'severity' parent.severity}}
22           {{/notEq}}
23         {{/if}}
24       </div>
25     </li>
26     {{#each parameters}}
27       <li class="coding-rules-detail-parameter">
28         <h3 class="coding-rules-detail-parameter-name">{{key}}</h3>
29         <div class="coding-rules-detail-parameter-description">
30           <input type="text" value="{{value}}">
31           {{#if ../parent}}
32             {{#notEq value original}}
33               {{t 'coding_rules.original'}} {{original}}
34             {{/notEq}}
35           {{/if}}
36         </div>
37       </li>
38     {{/each}}
39   </ul>
40
41   <div class="coding-rules-detail-quality-profile-note">
42     {{#if note}}
43       <blockquote class="rule-desc">
44         <cite>
45           <b>{{note.username}}</b> ({{note.fCreationDate}}) &nbsp;|&nbsp;
46           <a class="coding-rules-detail-quality-profile-note-edit link-action">{{t 'edit'}}</a>&nbsp;
47           <a class="coding-rules-detail-quality-profile-note-delete link-action">{{t 'delete'}}</a>
48         </cite>
49         {{{note.html}}}
50       </blockquote>
51     {{else}}
52       <a class="coding-rules-detail-quality-profile-note-add link-action">{{t 'coding_rules.add_note'}}</a>
53     {{/if}}
54   </div>
55
56   <div class="coding-rules-detail-quality-profile-note-form admin">
57     <table class="width100 table">
58       <tbody>
59       <tr>
60         <td class="width100" colspan="2">
61           <textarea class="coding-rules-detail-quality-profile-note-text" rows="4" style="width: 100%;">{{#if note}}{{note.raw}}{{/if}}</textarea>
62         </td>
63       </tr>
64       <tr>
65         <td>
66           <button class="coding-rules-detail-quality-profile-note-submit">
67             {{#if note}}{{t 'update'}}{{else}}{{t 'coding_rules.add_note'}}{{/if}}
68           </button>
69           <a class="coding-rules-detail-quality-profile-note-cancel action">{{t 'cancel'}}</a>
70         </td>
71         <td class="right">
72           <%= render :partial => 'markdown/tips' -%>
73         </td>
74       </tr>
75       </tbody>
76     </table>
77   </div>
78
79   <div class="button-group coding-rules-detail-quality-profile-actions">
80     <button>{{t 'update'}}</button>
81     {{#if parent}}
82       <button class="button-red">{{t 'coding_rules.revert_to_parent_definition'}}</button>
83     {{/if}}
84     <button class="button-red">{{t 'coding_rules.deactivate_quality_profile'}}</button>
85   </div>
86 </script>