<div class="notification-panel-title"><span translate>Your notifications</span><a ng-click="CloseNotificationPanel()"><i class="ic-arrow-right"></i></a></div>

<div class="actions-container">
    <a href="#/notifications" ng-click="goToNoficiationsPage()" class="ekup-button ekup-button-secondary" translate>See all notifications</a>
    <button ng-if="Notifications.length > 1" ng-click="doDismissAll()" class="ekup-button ekup-button-secondary ekup-error-button" translate>Hide all</button>
</div>

<div ng-if="Notifications.length == 0" style="text-align: center; padding: 20px;" translate>
    No notifications
</div>

<ul class="notification">
    <li ng-repeat="item in Notifications track by item.ID" id="notification-item-{{item.ID}}" class="card item {{item.Type.toLowerCase()}} {{item.HasBeenSeen == false ? 'new' : ''}}">
        <div class="title"><i class="{{GetItemIcon(item.Type)}}"></i><span>{{item.Title}}</span><a ng-if="item.HasBeenSeen == false" class="markAsRead" ng-click="flagAsSeen(item.ID)"><i class="ic-eye"></i></a></div>
        <div>
            <div class="relative-date">{{RelativeDate(item.Timestamp)}}</div>
            <div ng-if="item.Action != 'update:new'" class="message">{{item.Message}}</div>
            <div ng-show="item.DownloadLink != null">
                <div translate>If the backup file was not downloaded automatically, <a href="{{item.DownloadLink}}" target="_blank">right click and choose &quot;Save as …&quot;</a></div>
            </div>
            <div ng-if="item.Action != 'update:new'" class="actions-container">
                <button ng-click="doDismiss(item.ID)" class="ekup-button ekup-{{item.Type.toLowerCase()}}-button" translate>Hide</button>

                <button ng-if="item.Action == 'backup:show-log'" ng-click="doShowLog(item.BackupID)" class="ekup-button ekup-{{item.Type.toLowerCase()}}-button" translate>Show</button>

                <button ng-if="item.Message.indexOf('please run repair') > 0" ng-click="doRepair(item.BackupID)" class="ekup-button ekup-{{item.Type.toLowerCase()}}-button" translate>Repair</button>

                <button ng-if="item.Action.indexOf('bug-report:created:') == 0 &amp;&amp; item.DownloadLink == null" ng-click="doDownloadBugreport(item)" class="ekup-button ekup-{{item.Type.toLowerCase()}}-button" translate>Download</button>
            </div>


            <div ng-if="item.Action == 'update:new'">
                <div class="message" translate translate-params-message="item.Message">New update found: {{message}}</div>

                <progress-bar ng-show="state.updaterState == 'Downloading'" ng-text="'Downloading update…' | translate" ng-progress="state.updateDownloadProgress"></progress-bar>

                <div class="actions-container">
                    <button ng-click="doDismiss(item.ID)" class="ekup-button ekup-button-secondary ekup-error-button" translate>Hide</button>
                    <button ng-if="!state.updateReady &amp;&amp; state.updaterState == 'Waiting'" ng-click="doInstallUpdate(item.ID)" class="ekup-button ekup-button-secondary " translate>Install</button>
                    <button ng-if="state.updateReady &amp;&amp; state.updaterState == 'Waiting'" ng-click="doActivateUpdate(item.ID)" class="ekup-button ekup-button-secondary " translate>Activate</button>
                    <button ng-if="state.updaterState == 'Downloading'" class="ekup-button ekup-button-secondary " ng-disabled="true" ng-click="" translate>Downloading …</button>
                    <button ng-if="state.updaterState == 'Checking'" class="ekup-button ekup-button-secondary" ng-disabled="true" ng-click="" translate>Verifying …</button>
                    <button ng-click="doShowUpdate()" class="ekup-button ekup-button-secondary " translate>Show</button>
                </div>
            </div>
        </div>
    </li>
</ul>

<iframe style="display: none" ng-src="{{DownloadLink}}"></iframe>
