# HG changeset patch # User Mads Kiilerich # Date 2017-06-18 01:09:18 # Node ID 80ae9f5e9b326dde1da9ed7ed1564a9c2e3bd151 # Parent f2c7bf6f72d5615e9f9bd5504dee62df1e497ad0 notifications: remove custom 'container' class to avoid conflict with Bootstrap ... and rewrite things to use plain Bootstrap Most of the markup and styling turned out to be easy to replace with plain Bootstrap markup. diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css --- a/kallithea/public/css/style.css +++ b/kallithea/public/css/style.css @@ -2956,46 +2956,6 @@ input.status_change_radio { border-radius: 4px !important; } -.notification-header { - padding-top: 6px; -} -.notification-header .desc { - font-size: 16px; - height: 24px; - float: left -} -.notification-list .container.unread { - background: none repeat scroll 0 0 rgba(255, 255, 180, 0.6); -} -.notification-header .gravatar { - background: none repeat scroll 0 0 transparent; - padding: 0px 0px 0px 8px; -} -.notification-list .container .notification-header .desc { - font-weight: bold; - font-size: 17px; -} -.notification-header .delete-notifications { - float: right; - padding-top: 8px; - cursor: pointer; -} -.notification-header .read-notifications { - float: right; - padding-top: 8px; - cursor: pointer; -} -.notification-subject { - clear: both; - border-bottom: 1px solid #eee; - padding: 5px 0px; -} - -.notification-body { - clear: both; - margin: 34px 2px 2px 8px -} - /**** PULL REQUESTS *****/ diff --git a/kallithea/public/js/base.js b/kallithea/public/js/base.js --- a/kallithea/public/js/base.js +++ b/kallithea/public/js/base.js @@ -971,7 +971,7 @@ var deleteNotification = function(url, n var readNotification = function(url, notification_id, callbacks){ var success = function(o){ var $obj = $("#notification_"+notification_id); - $obj.removeClass('unread'); + $obj.removeClass('list-group-item-warning'); $obj.find('.read-notification').remove(); _run_callbacks(callbacks); }; diff --git a/kallithea/templates/admin/notifications/notifications.html b/kallithea/templates/admin/notifications/notifications.html --- a/kallithea/templates/admin/notifications/notifications.html +++ b/kallithea/templates/admin/notifications/notifications.html @@ -21,9 +21,9 @@
%if c.notifications: ${_('Mark All Read')} diff --git a/kallithea/templates/admin/notifications/notifications_data.html b/kallithea/templates/admin/notifications/notifications_data.html --- a/kallithea/templates/admin/notifications/notifications_data.html +++ b/kallithea/templates/admin/notifications/notifications_data.html @@ -1,27 +1,18 @@ - %if c.notifications: -<% -unread = lambda n:{False:'unread'}.get(n) -%> -
+
%for notification in c.notifications: -
-
+
${h.gravatar_div(notification.notification.created_by_user.email, size=24)} - + ${notification.notification.description} - - + + %if not notification.read: + ${_('Mark as read')} + %endif + ${_('Delete')} - %if not notification.read: - - - - %endif -
-
%endfor
diff --git a/kallithea/templates/admin/notifications/show_notification.html b/kallithea/templates/admin/notifications/show_notification.html --- a/kallithea/templates/admin/notifications/show_notification.html +++ b/kallithea/templates/admin/notifications/show_notification.html @@ -22,17 +22,17 @@
-
+
${h.gravatar_div(c.notification.created_by_user.email, size=24)} - + ${c.notification.description} - - - + ${_('Delete')}
-
-
${h.literal(c.notification.subject)}
+
+ %if c.notification.subject: +
${h.literal(c.notification.subject)}
+ %endif
%if c.notification.body: ${h.render_w_mentions(c.notification.body)}