<commit_before>@(issue: model.Issue,
  comments: List[model.IssueComment],
  issueLabels: List[model.Label],
  collaborators: List[String],
  milestones: List[model.Milestone],
  labels: List[model.Label],
  hasWritePermission: Boolean,
  repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
@import context._
@import view.helpers._
@html.main("%s - Issue #%d - %s/%s".format(issue.title, issue.issueId, repository.owner, repository.name)){
  @html.header("issues", repository)
  @tab("issues", repository)
  <ul class="nav nav-tabs">
    <li class="pull-left"><a href="@url(repository)/issues"><i class="icon-arrow-left"></i> Back to issue list</a></li>
    <li class="pull-right">Issue #@issue.issueId</li>
  </ul>
  <div class="row-fluid">
    <div class="span10">
      <div class="box">
        <div class="box-content" style="padding: 0px;">
          <div class="issue-header">
            @if(hasWritePermission || loginAccount.map(_.userName == issue.openedUserName).getOrElse(false)){
              <span class="pull-right"><a class="btn btn-small" href="#" id="edit">Edit</a></span>
            }
            <div class="small muted">
              <a href="@url(issue.openedUserName)" class="username">@issue.openedUserName</a> opened this issue @datetime(issue.registeredDate)
            </div>
            <h4 id="issueTitle">@issue.title</h4>
          </div>
          <div class="issue-info">
            <span id="label-assigned">
              @issue.assignedUserName.map { userName =>
                <a href="@url(userName)" class="username strong">@userName</a> is assigned
              }.getOrElse("No one is assigned")
            </span>
            @if(hasWritePermission){
              @helper.html.dropdown {
                <li><a href="javascript:void(0);" class="assign" data-name=""><i class="icon-remove-circle"></i> Clear assignee</a></li>
                <li class="divider"></li>
                @collaborators.map { collaborator =>
                  <li><a href="javascript:void(0);" class="assign" data-name="@collaborator"><i class="icon-white"></i> @collaborator</a></li>
                }
              }
            }
            <div class="pull-right">
              <span id="label-milestone">
                @issue.milestoneId.map { milestoneId =>
                  @milestones.find(_.milestoneId == milestoneId).map { milestone =>
                    Milestone: <strong>@milestone.title</strong>
                  }
                }.getOrElse("No milestone")
              </span>
              @if(hasWritePermission){
                @helper.html.dropdown {
                  <li><a href="javascript:void(0);" class="milestone" data-id=""><i class="icon-remove-circle"></i> No milestone</a></li>
                  <li class="divider"></li>
                  @milestones.map { milestone =>
                    <li><a href="javascript:void(0);" class="milestone" data-id="@milestone.milestoneId"><i class="icon-white"></i> @milestone.title</a></li>
                  }
                }
              }
            </div>
          </div>
          <div class="issue-content" id="issueContent">
            @markdown(issue.content getOrElse "No description given.", repository, false, true, true)
          </div>
        </div>
      </div>
      @comments.map { comment =>
        <div class="box issue-comment-box" id="comment-@comment.commentId">
          <div class="box-header-small">
            <i class="icon-comment"></i>
            <a href="@url(comment.commentedUserName)" class="username strong">@comment.commentedUserName</a> commented
            <span class="pull-right">
              @datetime(comment.registeredDate)
              @if(hasWritePermission || loginAccount.map(_.userName == comment.commentedUserName).getOrElse(false)){
                <a href="#" data-comment-id="@comment.commentId"><i class="icon-pencil"></i></a>
              }
            </span>
          </div>
          <div class="box-content"class="issue-content" id="commentContent-@comment.commentId">
            @markdown(comment.content, repository, false, true, true)
          </div>
        </div>
        @comment.action.map { action =>
        <div class="small issue-comment-action">
          @if(action == "close"){
            <span class="label label-important">Closed</span>
            <a href="@url(comment.commentedUserName)" class="username strong">@comment.commentedUserName</a> closed the issue @datetime(comment.registeredDate)
          } else {
            <span class="label label-success">Reopened</span>
            <a href="@url(comment.commentedUserName)" class="username strong">@comment.commentedUserName</a> reopened the issue @datetime(comment.registeredDate)
          }
        </div>
        }
      }
      @if(loginAccount.isDefined){
        <form action="@url(repository)/issue_comments/new" method="POST" validate="true">
          <div class="box">
            <div class="box-content">
              @helper.html.preview(repository, "", false, true, true, "width: 730px; height: 100px;")
            </div>
          </div>
          <input type="hidden" name="issueId" value="@issue.issueId"/>
          <input type="submit" class="btn btn-success" value="Comment"/>
          @if(hasWritePermission || issue.openedUserName == loginAccount.get.userName){
            <input type="submit" class="btn" value="@{if(issue.closed) "Reopen" else "Close"}" id="action"/>
          }
        </form>
      }
    </div>
    <div class="span2">
      @if(issue.closed) {
        <span class="label label-important issue-status">Closed</span>
      } else {
        <span class="label label-success issue-status">Open</span>
      }
      <div class="small" style="text-align: center;">
        <strong>@comments.size</strong> @plural(@comments.size, "comment")
      </div>
      <hr/>
      <div style="margin-bottom: 8px;">
      <strong>Labels</strong>
      @if(hasWritePermission){
        <div class="pull-right">
          @helper.html.dropdown {
            @labels.map { label =>
              <li>
                <a href="#" class="toggle-label" data-label-id="@label.labelId">
                  <i class="@{if(issueLabels.exists(_.labelId == label.labelId)) "icon-ok" else "icon-white"}"></i>
                  <span class="label" style="background-color: #@label.color;">&nbsp;</span>
                  @label.labelName
                </a>
              </li>
            }
            </ul>
          }
        </div>
      }
      </div>
      <ul class="label-list nav nav-pills nav-stacked"><commit_msg>Small fix.<commit_after>@(issue: model.Issue,
  comments: List[model.IssueComment],
  issueLabels: List[model.Label],
  collaborators: List[String],
  milestones: List[model.Milestone],
  labels: List[model.Label],
  hasWritePermission: Boolean,
  repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
@import context._
@import view.helpers._
@html.main("%s - Issue #%d - %s/%s".format(issue.title, issue.issueId, repository.owner, repository.name)){
  @html.header("issues", repository)
  @tab("issues", repository)
  <ul class="nav nav-tabs">
    <li class="pull-left"><a href="@url(repository)/issues"><i class="icon-arrow-left"></i> Back to issue list</a></li>
    <li class="pull-right">Issue #@issue.issueId</li>
  </ul>
  <div class="row-fluid">
    <div class="span10">
      <div class="box">
        <div class="box-content" style="padding: 0px;">
          <div class="issue-header">
            @if(hasWritePermission || loginAccount.map(_.userName == issue.openedUserName).getOrElse(false)){
              <span class="pull-right"><a class="btn btn-small" href="#" id="edit">Edit</a></span>
            }
            <div class="small muted">
              <a href="@url(issue.openedUserName)" class="username">@issue.openedUserName</a> opened this issue @datetime(issue.registeredDate)
            </div>
            <h4 id="issueTitle">@issue.title</h4>
          </div>
          <div class="issue-info">
            <span id="label-assigned">
              @issue.assignedUserName.map { userName =>
                <a href="@url(userName)" class="username strong">@userName</a> is assigned
              }.getOrElse("No one is assigned")
            </span>
            @if(hasWritePermission){
              @helper.html.dropdown {
                <li><a href="javascript:void(0);" class="assign" data-name=""><i class="icon-remove-circle"></i> Clear assignee</a></li>
                <li class="divider"></li>
                @collaborators.map { collaborator =>
                  <li><a href="javascript:void(0);" class="assign" data-name="@collaborator"><i class="icon-white"></i> @collaborator</a></li>
                }
              }
            }
            <div class="pull-right">
              <span id="label-milestone">
                @issue.milestoneId.map { milestoneId =>
                  @milestones.find(_.milestoneId == milestoneId).map { milestone =>
                    Milestone: <strong>@milestone.title</strong>
                  }
                }.getOrElse("No milestone")
              </span>
              @if(hasWritePermission){
                @helper.html.dropdown {
                  <li><a href="javascript:void(0);" class="milestone" data-id=""><i class="icon-remove-circle"></i> No milestone</a></li>
                  <li class="divider"></li>
                  @milestones.map { milestone =>
                    <li><a href="javascript:void(0);" class="milestone" data-id="@milestone.milestoneId"><i class="icon-white"></i> @milestone.title</a></li>
                  }
                }
              }
            </div>
          </div>
          <div class="issue-content" id="issueContent">
            @markdown(issue.content getOrElse "No description given.", repository, false, true, true)
          </div>
        </div>
      </div>
      @comments.map { comment =>
        <div class="box issue-comment-box" id="comment-@comment.commentId">
          <div class="box-header-small">
            <i class="icon-comment"></i>
            <a href="@url(comment.commentedUserName)" class="username strong">@comment.commentedUserName</a> commented
            <span class="pull-right">
              @datetime(comment.registeredDate)
              @if(hasWritePermission || loginAccount.map(_.userName == comment.commentedUserName).getOrElse(false)){
                <a href="#" data-comment-id="@comment.commentId"><i class="icon-pencil"></i></a>
              }
            </span>
          </div>
          <div class="box-content"class="issue-content" id="commentContent-@comment.commentId">
            @markdown(comment.content, repository, false, true, true)
          </div>
        </div>
        @comment.action.map { action =>
        <div class="small issue-comment-action">
          @if(action == "close"){
            <span class="label label-important">Closed</span>
            <a href="@url(comment.commentedUserName)" class="username strong">@comment.commentedUserName</a> closed the issue @datetime(comment.registeredDate)
          } else {
            <span class="label label-success">Reopened</span>
            <a href="@url(comment.commentedUserName)" class="username strong">@comment.commentedUserName</a> reopened the issue @datetime(comment.registeredDate)
          }
        </div>
        }
      }
      @if(loginAccount.isDefined){
        <form action="@url(repository)/issue_comments/new" method="POST" validate="true">
          <div class="box">
            <div class="box-content">
              @helper.html.preview(repository, "", false, true, true, "width: 730px; height: 100px;")
            </div>
          </div>
          <input type="hidden" name="issueId" value="@issue.issueId"/>
          <input type="submit" class="btn btn-success" value="Comment"/>
          @if(hasWritePermission || issue.openedUserName == loginAccount.get.userName){
            <input type="submit" class="btn" value="@{if(issue.closed) "Reopen" else "Close"}" id="action"/>
          }
        </form>
      }
    </div>
    <div class="span2">
      @if(issue.closed) {
        <span class="label label-important issue-status">Closed</span>
      } else {
        <span class="label label-success issue-status">Open</span>
      }
      <div class="small" style="text-align: center;">
        <strong>@comments.size</strong> @plural(comments.size, "comment")
      </div>
      <hr/>
      <div style="margin-bottom: 8px;">
      <strong>Labels</strong>
      @if(hasWritePermission){
        <div class="pull-right">
          @helper.html.dropdown {
            @labels.map { label =>
              <li>
                <a href="#" class="toggle-label" data-label-id="@label.labelId">
                  <i class="@{if(issueLabels.exists(_.labelId == label.labelId)) "icon-ok" else "icon-white"}"></i>
                  <span class="label" style="background-color: #@label.color;">&nbsp;</span>
                  @label.labelName
                </a>
              </li>
            }
            </ul>
          }
        </div>
      }
      </div>
      <ul class="label-list nav nav-pills nav-stacked">
{'fraction_non_alphanumeric': 0.16729464958553128, 'fraction_numerical': 0.002562170308967596, 'mean_word_length': 2.234462588349988, 'pattern_counts': {'":': 0, '<': 267, '<?xml version=': 0, '>': 283, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5511358', 'n_tokens_mistral': 3911, 'n_tokens_neox': 3754, 'n_words': 670}