## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>

<%block name="title">
    ${_('Show Notification')} ${c.authuser.username}
</%block>

<%def name="breadcrumbs_links()">
    ${h.link_to(_('Notifications'),h.url('notifications'))}
    &raquo;
    ${_('Show Notification')}
</%def>

<%block name="header_menu">
    ${self.menu('admin')}
</%block>

<%def name="main()">
<div class="box">
    <!-- box / title -->
    <div class="title">
        ${self.breadcrumbs()}
    </div>
    <div class="table">
      <div id="notification_${c.notification.notification_id}">
        <div class="notification-header">
          <div class="gravatar">
            ${h.gravatar(c.notification.created_by_user.email, size=24)}
          </div>
          <div class="desc">
              ${c.notification.description}
          </div>
          <div class="delete-notifications">
            <span id="${c.notification.notification_id}" class="delete-notification action"><i class="icon-minus-circled" id="yui-gen24"></i></span>
          </div>
        </div>
        <div class="notification-body">
        <div class="notification-subject">${h.literal(c.notification.subject)}</div>
        %if c.notification.body:
            ${h.rst_w_mentions(c.notification.body)}
        %endif
        </div>
      </div>
    </div>
</div>
<script type="text/javascript">
var url = "${url('notification', notification_id='__NOTIFICATION_ID__')}";
var main = "${url('notifications')}";
   $('.delete-notification').click(function(e){
       var notification_id = e.currentTarget.id;
       deleteNotification(url,notification_id,[function(){window.location=main}]);
   });
</script>
</%def>
