<div class="modal_prev_wrap" ng-class="{modal_prev_active_wrap: nav.hasPrev}" ng-click="nav.prev($event)">
  <div class="modal_prev"></div>
</div>
<div class="modal_next_wrap" ng-class="{modal_next_active_wrap: nav.hasNext}" ng-click="nav.next($event)">
  <div class="modal_next"></div>
</div>
<div class="modal_close_wrap modal_close_wrap_wnext" ng-click="$close()">
  <div class="modal_close"></div>
</div>

<div class="media_modal_bottom_panel_wrap">
  <div class="media_modal_bottom_panel">
    <div class="media_modal_bottom_actions">
      <a class="media_modal_action_btn" ng-click="download()" title="{{'media_modal_download' | i18n}}">
        <i class="media_modal_action_btn_download"></i>
      </a>
      <a class="media_modal_action_btn" ng-if="canForward" ng-click="forward()"  title="{{'media_modal_forward' | i18n}}">
        <i class="media_modal_action_btn_forward"></i>
      </a>
      <a class="media_modal_action_btn" ng-if="canDelete" ng-click="delete()" title="{{'media_modal_delete' | i18n}}">
        <i class="media_modal_action_btn_delete"></i>
      </a>
    </div>

    <div class="media_modal_info_wrap pull-left" ng-if="!webpageID && photo.user_id">
      <a class="media_modal_author_photo pull-left" my-peer-photolink="photo.user_id" img-class="media_modal_author_photo" watch="true"></a>
      <div class="media_modal_author_name">
        <a class="media_modal_author" my-peer-link="photo.user_id" peer-watch="true"></a>
      </div>
      <div class="media_modal_date" ng-if="photo.date > 0" ng-switch="messageID > 0">
        <a ng-switch-when="true" class="media_modal_date" ng-click="goToMessage()" ng-bind="photo.date | dateOrTime :true"></a>
        <span ng-switch-default ng-bind="photo.date | dateOrTime :true"></span>
      </div>
    </div>

    <div class="media_modal_info_wrap pull-left" ng-if="webpageID">
      <div class="media_modal_author_name">
        <a class="media_modal_author" href="{{webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="webpage.rTitle"></a>
      </div>
      <div class="media_modal_date"  ng-bind="webpage.site_name || webpage.display_url"></div>
    </div>

    <div class="media_modal_title_wrap" ng-switch="count > 1 &amp;&amp; pos > 0">
      <my-i18n ng-switch-when="true" msgid="media_modal_photo_index">
        <my-i18n-param name="pos" ng-bind="pos"></my-i18n-param>
        <my-i18n-param name="count" ng-bind="count"></my-i18n-param>
      </my-i18n>
      <my-i18n ng-switch-default msgid="media_modal_photo">
    </div>
  </div>
</div>

<div class="modal-dialog" my-modal-nav next="nav.next()" prev="nav.prev()">
  <div class="modal-content">
    <div my-modal-width="{{photo.full.modalWidth}}" class="media_modal_wrap photo_modal_wrap" my-modal-position animation="no">

      <div class="modal-body">

        <div class="photo_modal_image_wrap" my-load-full-photo full-photo="photo.full" thumb-location="photo.thumb.location" ng-click="nav.next()"></div>

      </div>

    </div>
  </div>
</div>

