<ion-view title="查看公文" hide-tabs hide-back-button="true">
  
  <ion-nav-buttons side="left">
    <button class="button back-button button-clear header-item" ng-if="hasBackView()" ng-click="$ionicGoBack()"  nav-direction="back">
      <i class="icon ion-ios-arrow-back"></i>
      返回
    </button>
    <button class="button back-button button-clear header-item" ng-if="!hasBackView()" ui-sref="docs.published" nav-direction="back">
      <i class="icon ion-ios-arrow-back"></i>
      公文
    </button>
  </ion-nav-buttons>

  <ion-content>
    <div class="padding-horizontal">
      <h4>{{docs.subject}}</h4>
    </div>
    <div class="padding-horizontal clearfix detail-info">
      <span class="positive fr" ng-click="showInfoDetail = !showInfoDetail">
        {{ showInfoDetail ? '隐藏' : '查看' }}详细
      </span>

      <p ng-bind-html="docs.addtime"></p>
      <div ng-show="showInfoDetail">
        <p>发布人：{{docs.author|userInfo:'realname'}}</p>
        <p>审核人：{{docs.approver}}</p>
      </div>
    </div>
    <!-- 文章内容 -->
    <div class="padding editor-content" img-preview  ng-bind-html="docs.content"></div>
    <!-- 超链接内容 -->
    
    <!-- 附件 -->
    <attach-list attach="attach" ng-if="docs.attachmentid" class="list-inset"></attach-list>

    <div class="padding">
      <button class="button button-block button-assertive" ng-click="sign(docs.docid)" ng-if="docs.issign=='0'" ng-disabled="signing">签收</button>
      <button class="button button-block" disabled ng-if="docs.issign!='0'">已签收</button>
    </div>
  </ion-content>

</ion-view>
