aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/hbs/issues/issue.hbs
blob: 02de98970cadfe14c0d0db2f9ae5bb452906e0a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<div class="code-issue code-issue-collapsed" data-issue-key="{{key}}" data-issue-component="{{component}}" data-issue-rule="{{rule}}">
  <div class="code-issue-name code-issue-toggle">
    <div class="code-issue-name-rule">
      {{severityIcon severity}}&nbsp;<span class="rulename">{{message}}</span>
    </div>

    <div class="code-issue-permalink">
      <a target="_blank" href="../issue/show/{{key}}?layout=false">
        <i class="icon-link"></i>
      </a>
    </div>
  </div>


  <ul class="code-issue-actions code-issue-list">
    {{#inArray actions "comment"}}
      <li>
        <a id="issue-comment" class="link-action">{{translate "actions.comment" }}</a>
      </li>
    {{/inArray}}


    <li>
      {{statusIcon status}}{{translate "statuses" status}}
      {{#if resolution}}({{translate "resolutions" resolution}}){{/if}}

      {{#ifNotEmpty transitions}}
        {{#each transitions}}
          <a class="link-action issue-transition spacer-left" data-transition="{{this}}">{{translate "transitions" this}}</a>
        {{/each}}
      {{/ifNotEmpty}}
    </li>


    {{#inArray actions "assign"}}
    <li>
      {{#if assigneeName}}
        <a id="issue-assign" class="link-action">{{t 'assigned_to'}}</a> {{assigneeName}}</li>
      {{else}}
        <a id="issue-assign" class="link-action">{{translate "actions.assign" }}</a>
        {{#inArray actions "assign_to_me"}}
          [<a id="issue-assign-to-me" class="link-action">{{translate "actions.assign_to_me" }}</a>]
        {{/inArray}}
      {{/if}}
      </li>
    {{else}}
      {{#if assigneeName}}
        <li>{{t 'assigned_to'}} <strong>{{assigneeName}}</strong></li>
      {{/if}}
    {{/inArray}}


    {{#inArray actions "plan"}}
      <li>
        {{#if actionPlanName}}
          <a id="issue-plan" class="link-action">{{t 'issue.planned_for'}}</a> {{actionPlanName}}
        {{else}}
          <a id="issue-plan" class="link-action">{{t 'issue.do_plan'}}</a>
        {{/if}}
      </li>
    {{else}}
      {{#if actionPlanName}}
        <li>{{t 'issue.planned_for'}} <strong>{{actionPlanName}}</strong></li>
      {{/if}}
    {{/inArray}}


    {{#ifHasExtraActions actions}}
      <li>
        <div class="dropdown">
          <a class="link-action link-more" onclick="showDropdownMenuOnElement($j(this).next('.dropdown-menu')); return false;">{{t 'more_actions'}}</a>
          <ul style="display: none" class="dropdown-menu">
            {{#inArray actions "set_severity"}}
              <li>
                <a id="issue-set-severity" class="link-action spacer-right">{{translate "actions.set_severity"}}</a>
              </li>
            {{/inArray}}
            {{#pluginActions actions}}
              <li>
                <a class="link-action spacer-right issue-action" data-action="{{this}}">{{translate "actions" this}}</a>
              </li>
            {{/pluginActions}}
          </ul>
        </div>
      </li>
    {{else}}
      {{#inArray actions "set_severity"}}
        <li>
          <a id="issue-set-severity" class="link-action">{{translate "actions.set_severity"}}</a>
        </li>
      {{/inArray}}
    {{/ifHasExtraActions}}

    {{#if debt}}
      <li>{{t 'issue.technical_debt_short'}}: {{debt}}</li>
    {{/if}}

    {{#if reporterName}}<li>{{t 'reporter'}}: {{reporterName}}</li>{{/if}}
    {{#if author}}<li>{{t 'author'}}: {{author}}</li>{{/if}}
  </ul>

  <div class="code-issue-form"></div>


  <div class="code-issue-details">
    <ul class="tabs">
      <li>
        <a href="#tab-issue-rule">{{t 'rule'}}</a>
      </li>
      <li>
        <a href="#tab-issue-changelog">{{t 'changelog'}}</a>
      </li>
    </ul>

    <div id="tab-issue-rule">
      <div class="rule-desc"></div>
    </div>

    <div id="tab-issue-changelog"></div>
  </div>


  <div class="code-issue-comments">
    {{#each comments}}
      <div class="code-issue-comment" data-comment-key="{{key}}">
        <h4>
          <i class="icon-comment"></i>
          <b>{{userName}}</b>
          ({{fCreatedAge}})

          {{#if updatable}}
            &nbsp;&nbsp;
            <a class="link-action issue-comment-edit">{{t 'edit'}}</a>&nbsp;
            <a class="link-action link-red spacer-right issue-comment-delete"
               data-confirm-msg="<%= h message('issue.comment.delete_confirm_message') -%>">{{t 'delete'}}</a>
          {{/if}}
        </h4>
        {{{html}}}
      </div>
    {{/each}}
  </div>
</div>