Project

General

Profile

Actions

Feature #14969

closed

'Campus' filter support for the activity directory

Added by Boone Gorges over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Home Page
Target version:
Start date:
2021-11-16
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Hi Ray - I came across this while making some changes today: https://github.com/cuny-academic-commons/cac/blob/07f5167714bc7bfbcf159de0fd6d43e8bb78f341/wp-content/themes/bp-nelo/parts/home/activity.php#L176

How can we add '?campus=' support to the activity directory? It's going to be ugly. Something like:

'filter_query' => [
  'relation' => 'OR',
  'campus_members' => [
    'column' => 'user_id',
    'value' => members_of_campus( $campus ),
    'compare' => 'IN',
  ],
  'campus_groups' => [
    'relation' => 'AND',
    [
      'column' => 'item_id',
      'value' => groups_of_campus( $campus ),
      'compare' => 'IN',
    ],
    [
      'column' => 'component',
      'value' => 'groups',
    ]
  ],
  'campus_sites' => [
    'relation' => 'AND',
    [
      'column' => 'item_id',
      'value' => sites_of_campus( $campus ),
      'compare' => 'IN',
    ],
    [
      'column' => 'component',
      'value' => 'blogs',
    ]
  ],
]

Does this seem like the right approach? Can you have a go at it? Or are we going to have to scrap it for 1.19.0?


Files

my-commons-campuses.mov (43.8 MB) my-commons-campuses.mov Colin McDonald, 2021-12-10 09:59 AM
Actions

Also available in: Atom PDF