Skip to:
Content

BuddyPress.org

Changeset 2133


Ignore:
Timestamp:
11/26/2009 11:02:14 AM (15 years ago)
Author:
apeatling
Message:

Added a generic mini css class for all activity items that should be smaller in the stream.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r2132 r2133  
    450450        global $activities_template;
    451451
    452         return apply_filters( 'bp_get_activity_css_class', $activities_template->activity->component_name . ' ' . $activities_template->activity->component_action );
     452        $mini_activity_actions = apply_filters( 'bp_activity_mini_activity_actions', array(
     453            'friendship_accepted',
     454            'friendship_created',
     455            'new_blog',
     456            'joined_group',
     457            'created_group',
     458            'new_member'
     459        ) );
     460
     461        $mini_class = '';
     462        if ( in_array( $activities_template->activity->component_action, (array)$mini_activity_actions ) )
     463            $mini_class = ' mini';
     464
     465        return apply_filters( 'bp_get_activity_css_class', $activities_template->activity->component_name . ' ' . $activities_template->activity->component_action . $mini_class );
    453466    }
    454467
  • trunk/bp-themes/bp-default/_inc/css/screen.css

    r2131 r2133  
    13031303    }
    13041304
    1305     .activity-list li.friendship_created,
    1306     .activity-list li.joined_group,
    1307     .activity-list li.new_member {
     1305    .activity-list li.mini {
    13081306        font-size: 11px;
    13091307    }
    1310         .activity-list li.friendship_created .activity-avatar img.avatar,
    1311         .activity-list li.joined_group .activity-avatar img.avatar,
    1312         .activity-list li.new_member .activity-avatar img.avatar {
     1308        .activity-list li.mini .activity-avatar img.avatar {
    13131309            width: 20px;
    13141310            height: 20px;
     
    13161312        }
    13171313
    1318         .activity-list li.friendship_created .activity-content p,
    1319         .activity-list li.joined_group .activity-content p,
    1320         .activity-list li.new_member .activity-content p {
     1314        .activity-list li.mini .activity-content p {
    13211315            margin: 0;
    13221316            float: left;
    13231317        }
    13241318
    1325         .activity-list li.friendship_created .activity-meta,
    1326         .activity-list li.joined_group .activity-meta,
    1327         .activity-list li.new_member .activity-meta {
     1319        .activity-list li.mini .activity-meta {
    13281320            float: right;
    13291321        }
    13301322
    1331         .activity-list li.friendship_created .activity-comments,
    1332         .activity-list li.joined_group .activity-comments,
    1333         .activity-list li.new_member .activity-comments {
     1323        .activity-list li.mini .activity-comments {
    13341324            clear: left;
    13351325        }
    1336 
    1337 
    1338 
    13391326
    13401327    .activity-list li div.activity-avatar {
Note: See TracChangeset for help on using the changeset viewer.