<div class="coding-rules-detail-description rule-desc markdown">{{{htmlDesc}}}</div>

{{#unless isEditable}}
  {{#unless isManual}}
    <div class="coding-rules-detail-description coding-rules-detail-description-extra">
      <div id="coding-rules-detail-description-extra">
        {{#if htmlNote}}
          <div class="rule-desc marginbottom10 markdown">{{{htmlNote}}}</div>
        {{/if}}
        {{#if canWrite}}
          <div class="button-group">
            <button id="coding-rules-detail-extend-description">{{t 'coding_rules.extend_description'}}</button>
          </div>
        {{/if}}
      </div>

      {{#if canWrite}}
        <div class="coding-rules-detail-extend-description-form hidden">
          <table class="width100">
            <tbody>
            <tr>
              <td class="width100" colspan="2">
                <textarea id="coding-rules-detail-extend-description-text" rows="4"
                          style="width: 100%; margin-bottom: 4px;">{{mdNote}}</textarea>
              </td>
            </tr>
            <tr>
              <td>
                <div class="button-group">
                  <button id="coding-rules-detail-extend-description-submit">{{t 'save'}}</button>
                  {{#if mdNote}}
                    <button id="coding-rules-detail-extend-description-remove"
                            class="button-red">{{t 'remove'}}</button>
                  {{/if}}
                </div>
                <a id="coding-rules-detail-extend-description-cancel" class="action">{{t 'cancel'}}</a>
              </td>
              <td class="text-right">
                {{> '_markdown-tips' }}
              </td>
            </tr>
            </tbody>
          </table>
        </div>
      {{/if}}
    </div>
  {{/unless}}
{{/unless}}
