Skip to:
Content

BuddyPress.org

Changeset 8193


Ignore:
Timestamp:
03/28/2014 11:19:00 PM (12 years ago)
Author:
r-a-y
Message:

Activity dashboard: Add 'action' column.

This commit adds an 'Action' column to the activity dashboard. This
will give better context to the administrator when viewing the
dashboard.

Fixes #5484

Location:
trunk/bp-activity
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/admin/css/admin.css

    r6264 r8193  
    7676        margin-bottom: 1em;
    7777}
     78.column-action {
     79        width: 12%;
     80}
  • trunk/bp-activity/admin/css/admin.min.css

    r6264 r8193  
    1 .akismet-status{float:right}.akismet-status a{color:#AAA;font-style:italic}.akismet-history{margin:13px}.akismet-history div{margin-bottom:13px}.akismet-history span{color:#999}#wp-bp-activities-wrap{padding:5px 0}#bp-activities{height:120px}#bp-replyhead{font-size:1em;line-height:1.4em;margin:0}#bp-replysubmit{margin:0;padding:0 0 3px;text-align:center}#bp-replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center}#bp-replysubmit img.waiting{float:right;padding:4px 10px 0;vertical-align:top}#bp-activities-form .column-response img{float:left;margin-right:10px;margin-top:1px}.activity-errors{list-style-type:disc;margin-left:2em}#bp_activity_action div.inside,#bp_activity_content div.inside{line-height:0}#bp_activity_action h3,#bp_activity_content h3{cursor:auto}#bp_activity_action td.mceIframeContainer,#bp_activity_content td.mceIframeContainer{background-color:white}#post-body #bp-activities-action_resize,#post-body #bp-activities-content_resize{position:inherit;margin-top:-2px}#bp_activity_link input{width:99%}#bp-activities-primaryid{margin-bottom:1em}
     1.akismet-status{float:right}.akismet-status a{color:#AAA;font-style:italic}.akismet-history{margin:13px}.akismet-history div{margin-bottom:13px}.akismet-history span{color:#999}#wp-bp-activities-wrap{padding:5px 0}#bp-activities{height:120px}#bp-replyhead{font-size:1em;line-height:1.4em;margin:0}#bp-replysubmit{margin:0;padding:0 0 3px;text-align:center}#bp-replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center}#bp-replysubmit img.waiting{float:right;padding:4px 10px 0;vertical-align:top}#bp-activities-form .column-response img{float:left;margin-right:10px;margin-top:1px}.activity-errors{list-style-type:disc;margin-left:2em}#bp_activity_action div.inside,#bp_activity_content div.inside{line-height:0}#bp_activity_action h3,#bp_activity_content h3{cursor:auto}#bp_activity_action td.mceIframeContainer,#bp_activity_content td.mceIframeContainer{background-color:white}#post-body #bp-activities-action_resize,#post-body #bp-activities-content_resize{position:inherit;margin-top:-2px}#bp_activity_link input{width:99%}#bp-activities-primaryid{margin-bottom:1em}.column-action{width:12%;}
  • trunk/bp-activity/bp-activity-admin.php

    r8192 r8193  
    995995        public function __construct() {
    996996
     997                // See if activity commenting is enabled for blog / forum activity items
     998                $this->disable_blogforum_comments = bp_disable_blogforum_comments();
     999
    9971000                // Define singular and plural labels, as well as whether we support AJAX.
    9981001                parent::__construct( array(
     
    12381241                        'author'   => __( 'Author', 'buddypress' ),
    12391242                        'comment'  => __( 'Activity', 'buddypress' ),
     1243                        'action'   => __( 'Action', 'buddypress' ),
    12401244                        'response' => __( 'In Response To', 'buddypress' ),
    12411245                );
     
    13181322        function column_author( $item ) {
    13191323                echo '<strong>' . get_avatar( $item['user_id'], '32' ) . ' ' . bp_core_get_userlink( $item['user_id'] ) . '</strong>';
     1324        }
     1325
     1326        /**
     1327         * Action column markup.
     1328         *
     1329         * @since BuddyPress (2.0.0)
     1330         *
     1331         * @see WP_List_Table::single_row_columns()
     1332         *
     1333         * @param array $item A singular item (one full row).
     1334         */
     1335        function column_action( $item ) {
     1336                $actions = bp_activity_admin_get_activity_actions();
     1337
     1338                if ( isset( $actions[ $item['type'] ] ) ) {
     1339                        echo $actions[ $item['type'] ];
     1340                } else {
     1341                        printf( __( 'Unregistered action - %s', 'buddypress' ), $item['type'] );
     1342                }
    13201343        }
    13211344
Note: See TracChangeset for help on using the changeset viewer.