| 134 |
} |
} |
| 135 |
|
|
| 136 |
/** |
/** |
| 137 |
* Implementation of space->links(). |
* Implementation of space->user_links(). |
| 138 |
*/ |
*/ |
| 139 |
function links(&$links) { |
function user_links() { |
| 140 |
$links['subscribe'] = spaces_og_subscription_link(); |
$links = array(); |
| 141 |
|
if ($subscribe = spaces_og_subscription_link()) { |
| 142 |
|
$links['subscribe'] = $subscribe; |
| 143 |
|
} |
| 144 |
|
return $links; |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
/** |
| 148 |
|
* Implementation of space->admin_links(). |
| 149 |
|
*/ |
| 150 |
|
function admin_links() { |
| 151 |
$item = menu_get_item("og/users/{$this->sid}/faces"); |
$item = menu_get_item("og/users/{$this->sid}/faces"); |
| 152 |
if ($item['access']) { |
if ($item && $item['access']) { |
| 153 |
$links['members'] = array( |
$links['members'] = array( |
| 154 |
'title' => t('Members'), |
'title' => t('Members'), |
| 155 |
'href' => "og/users/{$this->sid}/faces", |
'href' => "og/users/{$this->sid}/faces", |
|
'attributes' => array('class' => 'members') |
|
| 156 |
); |
); |
| 157 |
} |
} |
| 158 |
|
|
| 159 |
if ($this->admin_access()) { |
$item = menu_get_item("node/{$this->sid}/edit"); |
| 160 |
|
if ($item && $item['access']) { |
| 161 |
// Add settings link for administering spaces |
// Add settings link for administering spaces |
| 162 |
$links['settings'] = array( |
$links['settings'] = array( |
| 163 |
'title' => t('Settings'), |
'title' => t('@type settings', array('@type' => node_get_types('name', $this->group->type))), |
| 164 |
'href' => 'node/'. $this->sid .'/edit', |
'href' => "node/{$this->sid}/edit", |
| 165 |
'attributes' => array('class' => 'settings'), |
); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
$item = menu_get_item("node/{$this->sid}/spaces/features"); |
| 169 |
|
if ($item && $item['access']) { |
| 170 |
|
$links['features'] = array( |
| 171 |
|
'title' => t('Customize features'), |
| 172 |
|
'href' => "node/{$this->sid}/spaces/features", |
| 173 |
); |
); |
| 174 |
} |
} |
| 175 |
|
return $links; |
| 176 |
} |
} |
| 177 |
|
|
| 178 |
/** |
/** |