{extends "frame.tpl"}

{block "css-entry" append}
   {encore_entry_link_tags entry='board' build='admin'}
{/block}

{block "content"}
   <div class="container-fluid board-changelog">
      <h3>Changelog</h3>

      <div id="changelog" {if $deploy_time}data-deploytime="{$deploy_time}"{/if}>
         <div data-template></div>
         <div class="text-center">
            <button type="button" class="btn btn-loader btn-primary" data-loader>{'loadMore'|translate:'board'}</button>
         </div>
      </div>
   </div>
   <script id="changelogTemplate" type="text/x-dot-template">
      {literal}
         {{? it.length > 0}}
         {{~it :item :index}}
         <div class="panel panel-default {{? new Date('{/literal}{$changelog_time}{literal}') < new Date(item.date) }}changed{{?}}">
            <div class="panel-body">
               <div class="date">{{= (new Date(item.date)).toLocaleString('cs-CZ', {day: 'numeric', month: 'long'}) }}</div>

               <div class="changelog-item">
                  <span class="type type-{{= item.type[0].toLowerCase() }}">{{= item.type }}</span>
                  <h5>{{= item.title}}</h5>
                  <div class="description">
                     {{= item.descr || ""}}
                  </div>
               </div>
            </div>
         </div>
         {{~}}
         {{?}}
      {/literal}
   </script>
{/block}

{block "js-onready" append}
   {encore_entry_script_tags entry='board' build='admin'}
{/block}
