+ function show_hub_summary(&$hub, $editing = false) {
+ if ($editing) echo "<p>Hub: <span class=\"strong\">" . htmlspecialchars($hub->getName()) . "</span>";
+ else echo "<br>\nHub " . $hub->getStrongLink();
+ $role = $hub->getRole();
+ $role_string = get_hub_role_string($hub);
+ if ($role_string) echo " $role_string";
+ if ($role & $GLOBALS['ROLE_COLLECTION']) printf(" <a class=\"small\" href=\"/donation/to/hub/%s/%d\">Donations</a>", urlencode($hub->getName()), $hub->getId());
+ if ($role & $GLOBALS['ROLE_DISTRIBUTION']) printf(" <a class=\"small\" href=\"/order/to/hub/%s/%d\">Orders</a>", urlencode($hub->getName()), $hub->getId());
+ if (check_admin(1)) {
+ echo " " . $hub->getDeleteLink();
+ }
+ $area = get_hub_area($hub);
+ if ($area) echo " in " . $area->getLink();
+ $city = get_hub_city($hub);
+ if ($city) echo ", " . $city->getLink(get_city_displayname($city));
+ }
+