<link rel="stylesheet" href="app/wiki/css/wiki.css" type="text/css"/>

<div ng-controller="Wiki.CommitController">
  <script type="text/ng-template" id="fileCellTemplate.html">
    <div class="ngCellText">
      <a ng-href="{{row.entity.fileLink}}" class="file-name"
         title="{{row.entity.title}}">
        <span class="file-icon" ng-class="row.entity.fileClass" ng-bind-html-unsafe="row.entity.fileIconHtml"></span>
        <span ng-class="row.entity.changeClass">{{row.entity.path}}</span>
      </a>
    </div>
  </script>

  <div ng-hide="inDashboard" class="logbar" ng-controller="Wiki.NavBarController">
    <div class="wiki logbar-container">
      <ul class="nav nav-tabs">
        <li ng-show="branches.length || branch" class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"
             title="The branch to view">
            {{branch || 'branch'}}
            <span class="caret"></span>
          </a>
          <ul class="dropdown-menu">
            <li ng-repeat="otherBranch in branches">
              <a ng-href="{{branchLink(otherBranch)}}{{hash}}"
                 ng-hide="otherBranch === branch"
                 title="Switch to the {{otherBranch}} branch"
                 data-placement="bottom">
                {{otherBranch}}</a>
            </li>
          </ul>
        </li>
        <li ng-repeat="link in breadcrumbs">
          <a ng-href="{{link.href}}{{hash}}">{{link.name}}</a>
        </li>
        <li>
          <a ng-href="{{historyLink}}{{hash}}">History</a>
        </li>
        <li title="{{commitInfo.shortMessage}}" class="active">
          <a class="commit-id">{{commitInfo.commitHashText}}</a>
        </li>
        <li class="pull-right">
        <span class="commit-author">
          <i class="icon-user"></i> {{commitInfo.author}}
        </span>
        </li>
        <li class="pull-right">
          <span class="commit-date">{{commitInfo.date | date: dateFormat}}</span>
        </li>
      </ul>
    </div>
  </div>

  <div class="wiki-fixed row-fluid">
    <div class="commit-message" title="{{commitInfo.shortMessage}}">
      {{commitInfo.trimmedMessage}}
    </div>
  </div>

  <div class="row-fluid">
    <div class="span4">
      <div class="control-group">
        <button class="btn" ng-disabled="!selectedItems.length" ng-click="diff()"
                title="Compare the selected versions of the files to see how they differ"><i class="icon-exchange"></i>
          Compare
        </button>

        <!--
                <button class="btn" ng-disabled="!canRevert()" ng-click="revert()"
                        title="Revert to this version of the file"><i class="icon-exchange"></i> Revert
                </button>
        -->
      </div>
    </div>
    <div class="span8">
      <div class="control-group">
        <input class="span12 search-query" type="text" ng-model="gridOptions.filterOptions.filterText"
               placeholder="search">
      </div>
    </div>
  </div>

  <div class="form-horizontal">
    <div class="row-fluid">
      <table class="table-condensed table-striped" hawtio-simple-table="gridOptions"></table>
    </div>
  </div>

</div>
