<div class="cphot">
  {{view "select" content=histories selection=schoolyear class="select srkjb" optionValuePath="content.id" optionLabelPath="content.text"}}
  <ul class="cptype">
    {{#each category in categories}}
    <li {{action 'switchCategory' category}} {{bind-attr class='category.classH'}}>{{category.name}}</li>
    {{/each}}
  </ul>
</div>
<div class="cphonr2">
    {{#if albums.length}}
    {{#each album in albums}}
	<div class="album">
		<p class="tnr">
        <b class="tnr_t">
          <span class="toggle">{{album.entity.sName}}</span>
          {{~#if album.downAll~}}
          {{~#if controller.schoolyear.subscribe~}}
          &nbsp;<font {{action 'downloadAlbum' album}} class="download_all">[批量下载]</font>
          {{~/if~}}
          {{~/if~}}
        </b>
        <em class="tnr_hr toggle"></em>
        <span class="tnr_arb toggle"></span>
    </p>
		<ul class="cphocn">
			{{#each photo in album.photos}}
			<li>
        <div {{action 'view' photo.entity}} style="float: left;">
            {{image-local src=photo.entity.filepath thumbq='100' maxWidth='230' maxHeight='170' online=controller.session.online type='image'}}
        </div>
        <p class="zi">{{photo.entity.filename}}</p>
        <p class="zi">创建于：{{formatDate photo.entity.intime pattern="YYYY-MM-DD hh:mm"}}</p>
        {{#if photo.state.isLoaded}}
        {{#if session.ISO}}
        {{^}}
        {{#if photo.state.text}}
        <p class="down">{{fetch-state model=photo file=photo.entity.filepath }}</p>
        {{/if}}
        {{/if}}
        {{^}}
        {{#if controller.session.online}}
        {{~#if controller.schoolyear.subscribe~}}
        <p class="downan" {{action 'download' photo}}>
              <img src="assets/images/load_icon.png" />
          </p>
        {{/if}}
        {{/if}}
        {{/if}}
      </li>
			{{/each}}
		</ul>
	</div>
    {{/each}}
    {{^}}
    {{#if controller.session.online}}
    没有符合要求的数据
    {{^}}
    没有本地数据，请切换到在线状态下载数据后查看
    {{/if}}
    {{/if}}
</div>