<table class="table">
  <tr ng-repeat="log in logs">
    <td width="20%">{{ log.create_date | date: 'yyyy-MM-dd HH:mm' }}</td>
    <td width="20%">
      <a ng-href="#/user/{{ log.username }}">
        <span class="glyphicon glyphicon-user"></span>
        {{ log.username }}
      </a>
    </td>
    <td>
      {{ log.class }}
          <span ng-switch="log.type">
            <span ng-switch-when="CREATE">created</span>
            <span ng-switch-when="UPDATE">updated</span>
            <span ng-switch-when="DELETE">deleted</span>
          </span>

          <span ng-switch="log.class">
            :
            <span ng-switch-when="Document">
              <a ng-href="#/document/view/{{ log.target }}">{{ log.message }}</a>
            </span>
            <span ng-switch-when="File">
              <a ng-if="log.message" ng-href="#/document/view/{{ log.message }}/content/file/{{ log.target }}">Open</a>
              <a ng-if="!log.message" ng-href="#/document/file/{{ log.target }}">Open</a>
            </span>
            <span ng-switch-when="Comment">
              <a ng-href="#/document/view/{{ log.message }}">See</a>
            </span>
            <span ng-switch-when="Acl">
              {{ log.message }}
            </span>
            <span ng-switch-when="Tag">
              <a href="#/tag">{{ log.message }}</a>
            </span>
            <span ng-switch-when="User">
              <a href="#/user/{{ log.message }}">{{ log.message }}</a>
            </span>
            <span ng-switch-when="Group">
              <a href="#/group/{{ log.message }}">{{ log.message }}</a>
            </span>
          </span>
    </td>
  </tr>
</table>