Files @ 80a15e10857a
Branch filter:

Location: kallithea/kallithea/templates/admin/notifications/notifications.html

domruf
style: in preparation for bootstrap, replace kallithea box with bootstrap compatible panel

This is a subset of a bigger changeset. The subset was extracted by Mads Kiilerich, mostly by:

sed -i \
-e 's,<div\(.*\) class="box",<div\1 class="panel panel-primary",g' \
`hg mani`
## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>

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

<%def name="breadcrumbs_links()">
    ${_('My Notifications')}
</%def>

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

<%def name="main()">
<div class="panel panel-primary">
    <!-- box / title -->
    <div class="title">
        ${self.breadcrumbs()}
    </div>

      <div style="padding:14px 18px;text-align: right;float:left">
      <span id='all' class="btn btn-default btn-sm"><a href="${h.url.current()}">${_('All')}</a></span>
      <span id='comment' class="btn btn-default btn-sm"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span>
      <span id='pull_request' class="btn btn-default btn-sm"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull Requests')}</a></span>
      </div>
      %if c.notifications:
      <div style="padding:14px 18px;text-align: right;float:right">
      <span id='mark_all_read' class="btn btn-default btn-sm">${_('Mark All Read')}</span>
      </div>
      %endif
  <div id='notification_data'>
    <%include file='notifications_data.html'/>
  </div>
</div>
<script type="text/javascript">
var url_delete = "${url('notification_delete', notification_id='__NOTIFICATION_ID__')}";
var url_read = "${url('notification_update', notification_id='__NOTIFICATION_ID__')}";
var run = function(){
  $('.delete-notification').click(function(e){
    var notification_id = e.currentTarget.id;
    deleteNotification(url_delete,notification_id);
  });
  $('.read-notification').click(function(e){
    var notification_id = e.currentTarget.id;
    readNotification(url_read,notification_id);
  });
}
run();
$('#mark_all_read').click(function(){
    var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}";
    asynchtml(url, $('#notification_data'), function(){run();});
});

var current_filter = "${c.current_filter}";
$('#'+current_filter).addClass('active');
</script>
</%def>