diff --git a/bp-templates/bp-legacy/buddypress/members/single/notifications/notifications-loop.php b/bp-templates/bp-legacy/buddypress/members/single/notifications/notifications-loop.php
index 61e0aea..4e59670 100644
a
|
b
|
|
22 | 22 | <?php endwhile; ?> |
23 | 23 | |
24 | 24 | </tbody> |
25 | | </table> |
26 | | No newline at end of file |
| 25 | </table> |
diff --git a/bp-themes/bp-default/members/single/home.php b/bp-themes/bp-default/members/single/home.php
index 39d70fb..0c48e27 100644
a
|
b
|
get_header( 'buddypress' ); ?> |
60 | 60 | elseif ( bp_is_user_settings() ) : |
61 | 61 | locate_template( array( 'members/single/settings.php' ), true ); |
62 | 62 | |
| 63 | elseif ( bp_is_user_notifications() ) : |
| 64 | locate_template( array( 'members/single/notifications.php' ), true ); |
| 65 | |
63 | 66 | // If nothing sticks, load a generic template |
64 | 67 | else : |
65 | 68 | locate_template( array( 'members/single/plugins.php' ), true ); |
diff --git a/bp-themes/bp-default/members/single/notifications.php b/bp-themes/bp-default/members/single/notifications.php
new file mode 100644
index 0000000..c91d118
-
|
+
|
|
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * BuddyPress - Users Notifications |
| 5 | * |
| 6 | * @package BuddyPress |
| 7 | * @subpackage bp-legacy |
| 8 | */ |
| 9 | |
| 10 | ?> |
| 11 | |
| 12 | <div class="item-list-tabs no-ajax" id="subnav" role="navigation"> |
| 13 | <ul> |
| 14 | <?php bp_get_options_nav(); ?> |
| 15 | |
| 16 | <li id="members-order-select" class="last filter"> |
| 17 | <?php bp_notifications_sort_order_form(); ?> |
| 18 | </li> |
| 19 | </ul> |
| 20 | </div> |
| 21 | |
| 22 | <?php |
| 23 | switch ( bp_current_action() ) : |
| 24 | |
| 25 | // Unread |
| 26 | case 'unread' : |
| 27 | bp_get_template_part( 'members/single/notifications/unread' ); |
| 28 | break; |
| 29 | |
| 30 | // Read |
| 31 | case 'read' : |
| 32 | bp_get_template_part( 'members/single/notifications/read' ); |
| 33 | break; |
| 34 | |
| 35 | // Any other |
| 36 | default : |
| 37 | bp_get_template_part( 'members/single/plugins' ); |
| 38 | break; |
| 39 | endswitch; |
diff --git a/bp-themes/bp-default/members/single/notifications/feedback-no-notifications.php b/bp-themes/bp-default/members/single/notifications/feedback-no-notifications.php
new file mode 100644
index 0000000..014947b
-
|
+
|
|
| 1 | <div id="message" class="info"> |
| 2 | |
| 3 | <?php if ( bp_is_current_action( 'unread' ) ) : ?> |
| 4 | |
| 5 | <?php if ( bp_is_my_profile() ) : ?> |
| 6 | |
| 7 | <p><?php _e( 'You have no unread notifications.', 'buddypress' ); ?></p> |
| 8 | |
| 9 | <?php else : ?> |
| 10 | |
| 11 | <p><?php _e( 'This member has no unread notifications.', 'buddypress' ); ?></p> |
| 12 | |
| 13 | <?php endif; ?> |
| 14 | |
| 15 | <?php else : ?> |
| 16 | |
| 17 | <?php if ( bp_is_my_profile() ) : ?> |
| 18 | |
| 19 | <p><?php _e( 'You have no notifications.', 'buddypress' ); ?></p> |
| 20 | |
| 21 | <?php else : ?> |
| 22 | |
| 23 | <p><?php _e( 'This member has no notifications.', 'buddypress' ); ?></p> |
| 24 | |
| 25 | <?php endif; ?> |
| 26 | |
| 27 | <?php endif; ?> |
| 28 | |
| 29 | </div> |
diff --git a/bp-themes/bp-default/members/single/notifications/notifications-loop.php b/bp-themes/bp-default/members/single/notifications/notifications-loop.php
new file mode 100644
index 0000000..4e59670
-
|
+
|
|
| 1 | <table class="notifications"> |
| 2 | <thead> |
| 3 | <tr> |
| 4 | <th class="icon"></th> |
| 5 | <th class="title"><?php _e( 'Notification', 'buddypress' ); ?></th> |
| 6 | <th class="date"><?php _e( 'Date Received', 'buddypress' ); ?></th> |
| 7 | <th class="actions"><?php _e( 'Actions', 'buddypress' ); ?></th> |
| 8 | </tr> |
| 9 | </thead> |
| 10 | |
| 11 | <tbody> |
| 12 | |
| 13 | <?php while ( bp_the_notifications() ) : bp_the_notification(); ?> |
| 14 | |
| 15 | <tr> |
| 16 | <td></td> |
| 17 | <td><?php bp_the_notification_description(); ?></td> |
| 18 | <td><?php bp_the_notification_time_since(); ?></td> |
| 19 | <td><?php bp_the_notification_action_links(); ?></td> |
| 20 | </tr> |
| 21 | |
| 22 | <?php endwhile; ?> |
| 23 | |
| 24 | </tbody> |
| 25 | </table> |
diff --git a/bp-themes/bp-default/members/single/notifications/read.php b/bp-themes/bp-default/members/single/notifications/read.php
new file mode 100644
index 0000000..85fcab7
-
|
+
|
|
| 1 | <?php if ( bp_has_notifications() ) : ?> |
| 2 | |
| 3 | <div id="pag-top" class="pagination no-ajax"> |
| 4 | <div class="pag-count" id="notifications-count-top"> |
| 5 | <?php bp_notifications_pagination_count(); ?> |
| 6 | </div> |
| 7 | |
| 8 | <div class="pagination-links" id="notifications-pag-top"> |
| 9 | <?php bp_notifications_pagination_links(); ?> |
| 10 | </div> |
| 11 | </div> |
| 12 | |
| 13 | <?php bp_get_template_part( 'members/single/notifications/notifications-loop' ); ?> |
| 14 | |
| 15 | <div id="pag-bottom" class="pagination no-ajax"> |
| 16 | <div class="pag-count" id="notifications-count-bottom"> |
| 17 | <?php bp_notifications_pagination_count(); ?> |
| 18 | </div> |
| 19 | |
| 20 | <div class="pagination-links" id="notifications-pag-bottom"> |
| 21 | <?php bp_notifications_pagination_links(); ?> |
| 22 | </div> |
| 23 | </div> |
| 24 | |
| 25 | <?php else : ?> |
| 26 | |
| 27 | <?php bp_get_template_part( 'members/single/notifications/feedback-no-notifications' ); ?> |
| 28 | |
| 29 | <?php endif; |
| 30 | No newline at end of file |
diff --git a/bp-themes/bp-default/members/single/notifications/unread.php b/bp-themes/bp-default/members/single/notifications/unread.php
new file mode 100644
index 0000000..85fcab7
-
|
+
|
|
| 1 | <?php if ( bp_has_notifications() ) : ?> |
| 2 | |
| 3 | <div id="pag-top" class="pagination no-ajax"> |
| 4 | <div class="pag-count" id="notifications-count-top"> |
| 5 | <?php bp_notifications_pagination_count(); ?> |
| 6 | </div> |
| 7 | |
| 8 | <div class="pagination-links" id="notifications-pag-top"> |
| 9 | <?php bp_notifications_pagination_links(); ?> |
| 10 | </div> |
| 11 | </div> |
| 12 | |
| 13 | <?php bp_get_template_part( 'members/single/notifications/notifications-loop' ); ?> |
| 14 | |
| 15 | <div id="pag-bottom" class="pagination no-ajax"> |
| 16 | <div class="pag-count" id="notifications-count-bottom"> |
| 17 | <?php bp_notifications_pagination_count(); ?> |
| 18 | </div> |
| 19 | |
| 20 | <div class="pagination-links" id="notifications-pag-bottom"> |
| 21 | <?php bp_notifications_pagination_links(); ?> |
| 22 | </div> |
| 23 | </div> |
| 24 | |
| 25 | <?php else : ?> |
| 26 | |
| 27 | <?php bp_get_template_part( 'members/single/notifications/feedback-no-notifications' ); ?> |
| 28 | |
| 29 | <?php endif; |
| 30 | No newline at end of file |