<Typography
color="primary"
style={{ width: "auto", cursor: "pointer" }}
- onClick={() => dispatch<any>(navFunc(item.uuid))}
+ onClick={(ev) => {
+ ev.stopPropagation()
+ dispatch<any>(navFunc(item.uuid))
+ }}
>
{item.kind === ResourceKind.PROJECT || item.kind === ResourceKind.COLLECTION ? <IllegalNamingWarning name={item.name} /> : null}
{item.name}
}
};
-const renderResourceLink = (dispatch: Dispatch, item: Resource) => {
+const renderResourceLink = (dispatch: Dispatch, item: Resource ) => {
var displayName = getResourceDisplayName(item);
return (
onClick={() => {
item.kind === ResourceKind.GROUP && (item as GroupResource).groupClass === "role"
? dispatch<any>(navigateToGroupDetails(item.uuid))
- : dispatch<any>(navigateTo(item.uuid));
+ : item.kind === ResourceKind.USER
+ ? dispatch<any>(navigateToUserProfile(item.uuid))
+ : dispatch<any>(navigateTo(item.uuid));
}}
>
{resourceLabel(item.kind, item && item.kind === ResourceKind.GROUP ? (item as GroupResource).groupClass || "" : "")}:{" "}
);
});
+const _resourceWithNameLink = withStyles(
+ {},
+ { withTheme: true }
+)((props: { uuid: string; userFullname: string; dispatch: Dispatch; theme: ArvadosTheme }) => {
+ const { uuid, userFullname, dispatch, theme } = props;
+ if (!userFullname) {
+ dispatch<any>(loadResource(uuid, false));
+ }
+
+ return (
+ <Typography
+ style={{ color: theme.palette.primary.main, cursor: 'pointer' }}
+ inline
+ noWrap
+ onClick={() => dispatch<any>(navigateTo(uuid))}
+ >
+ {userFullname ? userFullname : uuid}
+ </Typography>
+ )
+});
+
+
+export const ResourceOwnerWithNameLink = ownerFromResourceId(_resourceWithNameLink);
+
export const ResourceOwnerWithName = ownerFromResourceId(_resourceWithName);
export const ResourceWithName = userFromID(_resourceWithName);