Currently, if you use the "Is member an admin in a group" field on a node view, it appears to check if the node author is an admin of the group node, which is always the case and rather awkward.

The attached patch uses the currently logged in user on a node view, so you can make a view of group nodes with "admin" next to the groups you're an admin of.

Comments

msonnabaum’s picture

StatusFileSize
new1.51 KB

Forgot the break in the first patch, which broke user views. New patch attached.

amitaibu’s picture

Status: Active » Needs work

Looks reasonable.

+        $is_admin = $user->og_groups[$values->nid]['is_admin'];

Use !empty();

+      return t('admin ');

You have extra space in the string.

Also, please add some docs that explain the reason for the switch().

msonnabaum’s picture

StatusFileSize
new1.73 KB

Updated patch as per your requests.

amitaibu’s picture

Title: is_admin field on node views » Fix "Is member an admin in a group" on node base table
Status: Needs work » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.