<div class="issue-inner">

  <table class="issue-table">
    <tr>
      <td>
        <div class="issue-message">{{message}} <a class="js-issue-rule issue-rule icon-ellipsis-h"></a></div>
      </td>

      <td class="issue-table-meta-cell issue-table-meta-cell-first">
        <div class="issue-meta-list">
          <div class="issue-meta">
            <a class="issue-action issue-action-with-options js-issue-show-changelog" title="{{dt creationDate}}">
              <span class="issue-meta-label">{{fromNow creationDate}}</span>&nbsp;<i class="icon-dropdown"></i>
            </a>
          </div>

          {{#if line}}
            <div class="issue-meta">
              <span class="issue-meta-label" title="{{t 'line_number'}}">L{{line}}</span>
            </div>
          {{/if}}

          <div class="issue-meta">
            <a class="issue-action js-issue-permalink icon-link" href="{{permalink}}" target="_blank"></a>
          </div>
        </div>
      </td>
    </tr>
  </table>

  <table class="issue-table">
    <tr>
      <td>
        <div class="issue-meta-list">
          <div class="issue-meta">
            {{#inArray actions "set_severity"}}
              <a class="issue-action issue-action-with-options js-issue-set-severity">
                <span class="issue-meta-label">{{severityHelper severity}}</span>&nbsp;<i class="icon-dropdown"></i>
              </a>
            {{else}}
              {{severityHelper severity}}
            {{/inArray}}
          </div>

          <div class="issue-meta">
            {{#notEmpty transitions}}
              <a class="issue-action issue-action-with-options js-issue-transition">
                <span class="issue-meta-label">{{statusHelper status resolution}}</span>&nbsp;<i
                  class="icon-dropdown"></i>
              </a>
            {{else}}
              {{statusHelper status resolution}}
            {{/notEmpty}}
          </div>

          <div class="issue-meta">
            {{#inArray actions "assign"}}
              <a class="issue-action issue-action-with-options js-issue-assign">
                {{#if assignee}}
                  {{#ifShowAvatars}}
                    <span class="text-top">{{avatarHelper assigneeEmail 16}}</span>
                  {{/ifShowAvatars}}
                {{/if}}
                <span class="issue-meta-label">{{#if assignee}}{{default assigneeName assignee}}{{else}}{{t 'unassigned'}}{{/if}}</span>&nbsp;<i class="icon-dropdown"></i>
              </a>
            {{else}}
              {{#if assignee}}
                {{#ifShowAvatars}}
                  <span class="text-top">{{avatarHelper assigneeEmail 16}}</span>
                {{/ifShowAvatars}}
              {{/if}}
              <span class="issue-meta-label">{{#if assignee}}{{default assigneeName assignee}}{{else}}{{t 'unassigned'}}{{/if}}</span>
            {{/inArray}}
          </div>

          {{#inArray actions "assign_to_me"}}
            <a class="js-issue-assign-to-me"></a>
          {{/inArray}}

          <div class="issue-meta">
            {{#inArray actions "plan"}}
              <a class="issue-action issue-action-with-options js-issue-plan">
          <span
              class="issue-meta-label">{{#if actionPlan}}{{default actionPlanName actionPlan}}{{else}}{{t 'issue.unplanned'}}{{/if}}</span>&nbsp;<i
                  class="icon-dropdown"></i>
              </a>
            {{else}}
              <span
                  class="issue-meta-label">{{#if actionPlan}}{{default actionPlanName actionPlan}}{{else}}{{t 'issue.unplanned'}}{{/if}}</span>
            {{/inArray}}
          </div>

          {{#if debt}}
            <div class="issue-meta">
              <span class="issue-meta-label">
                {{tp 'issue.x_debt' debt}}
              </span>
            </div>
          {{/if}}

          {{#inArray actions "comment"}}
            <div class="issue-meta">
              <a class="issue-action js-issue-comment"><span
                  class="issue-meta-label">{{t 'issue.comment.formlink' }}</span></a>
            </div>
          {{/inArray}}

          {{#ifHasExtraActions actions}}
            <div class="issue-meta">
              <a class="issue-action issue-action-with-options js-issue-more">
                <span class="issue-meta-label">{{t 'more'}}</span>&nbsp;<i class="icon-dropdown"></i>
              </a>
            </div>
          {{/ifHasExtraActions}}
        </div>
      </td>

      <td class="issue-table-meta-cell">
        <div class="issue-meta js-issue-tags">
          {{#inArray actions "set_tags"}}
            <a class="issue-action issue-action-with-options js-issue-edit-tags">
              <span>
                <i class="icon-tags icon-half-transparent"></i>&nbsp;<span>{{#if tags}}{{join tags ', '}}{{else}}{{t 'issue.no_tag'}}{{/if}}</span>
              </span>&nbsp;<i class="icon-dropdown"></i>
            </a>
          {{else}}
            <span>
              <i class="icon-tags icon-half-transparent"></i>&nbsp;<span>{{#if tags}}{{join tags ', '}}{{else}}{{t 'issue.no_tag'}}{{/if}}</span>
            </span>
          {{/inArray}}
        </div>
      </td>
    </tr>
  </table>

  {{#notEmpty comments}}
    <div class="issue-comments">
      {{#each comments}}
        <div class="issue-comment" data-comment-key="{{key}}">
          <div class="issue-comment-author" title="{{userName}}">
            {{#ifShowAvatars}}{{avatarHelper email 16}}{{else}}<i class="icon-comment icon-half-transparent"></i>{{/ifShowAvatars}}&nbsp;{{userName}}
          </div>
          <div class="issue-comment-text markdown">{{{show html htmlText}}}</div>
          <div class="issue-comment-age">({{fromNow createdAt}})</div>
          <div class="issue-comment-actions">
            {{#if updatable}}
              <a class="js-issue-comment-edit icon-edit icon-half-transparent"></a>
              <a class="js-issue-comment-delete icon-delete icon-half-transparent"
                 data-confirm-msg="{{t 'issue.comment.delete_confirm_message'}}"></a>
            {{/if}}
          </div>
        </div>
      {{/each}}
    </div>
  {{/notEmpty}}

</div>

<a class="issue-navigate js-issue-navigate">
  <i class="issue-navigate-to-left icon-chevron-left"></i>
  <i class="issue-navigate-to-right icon-chevron-right"></i>
</a>
