Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
84a4e640
Commit
84a4e640
authored
9 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-1536: show profil of the user if it's clicks its own visit card
parent
4a6d7078
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/user/IdentityContextEntryControllerCreator.java
+28
-6
28 additions, 6 deletions
.../org/olat/user/IdentityContextEntryControllerCreator.java
with
28 additions
and
6 deletions
src/main/java/org/olat/user/IdentityContextEntryControllerCreator.java
+
28
−
6
View file @
84a4e640
...
@@ -27,11 +27,14 @@ import org.olat.core.gui.control.Controller;
...
@@ -27,11 +27,14 @@ import org.olat.core.gui.control.Controller;
import
org.olat.core.gui.control.WindowControl
;
import
org.olat.core.gui.control.WindowControl
;
import
org.olat.core.id.Identity
;
import
org.olat.core.id.Identity
;
import
org.olat.core.id.OLATResourceable
;
import
org.olat.core.id.OLATResourceable
;
import
org.olat.core.id.context.BusinessControlFactory
;
import
org.olat.core.id.context.ContextEntry
;
import
org.olat.core.id.context.ContextEntry
;
import
org.olat.core.id.context.ContextEntryControllerCreator
;
import
org.olat.core.id.context.ContextEntryControllerCreator
;
import
org.olat.core.id.context.DefaultContextEntryControllerCreator
;
import
org.olat.core.id.context.DefaultContextEntryControllerCreator
;
import
org.olat.core.id.context.TabContext
;
import
org.olat.core.logging.OLog
;
import
org.olat.core.logging.OLog
;
import
org.olat.core.logging.Tracing
;
import
org.olat.core.logging.Tracing
;
import
org.olat.core.util.resource.OresHelper
;
import
org.olat.home.HomeSite
;
import
org.olat.home.HomeSite
;
/**
/**
...
@@ -61,9 +64,11 @@ public class IdentityContextEntryControllerCreator extends DefaultContextEntryCo
...
@@ -61,9 +64,11 @@ public class IdentityContextEntryControllerCreator extends DefaultContextEntryCo
*/
*/
@Override
@Override
public
Controller
createController
(
List
<
ContextEntry
>
ces
,
UserRequest
ureq
,
WindowControl
wControl
)
{
public
Controller
createController
(
List
<
ContextEntry
>
ces
,
UserRequest
ureq
,
WindowControl
wControl
)
{
Identity
identity
=
getIdentity
(
ces
.
get
(
0
));
Identity
id
=
getIdentity
(
ces
.
get
(
0
));
if
(
identity
==
null
)
return
null
;
if
(
id
==
null
)
{
return
new
UserInfoMainController
(
ureq
,
wControl
,
identity
);
return
null
;
}
return
new
UserInfoMainController
(
ureq
,
wControl
,
id
);
}
}
@Override
@Override
...
@@ -75,14 +80,31 @@ public class IdentityContextEntryControllerCreator extends DefaultContextEntryCo
...
@@ -75,14 +80,31 @@ public class IdentityContextEntryControllerCreator extends DefaultContextEntryCo
return
null
;
return
null
;
}
}
@Override
public
TabContext
getTabContext
(
UserRequest
ureq
,
OLATResourceable
ores
,
ContextEntry
mainEntry
,
List
<
ContextEntry
>
entries
)
{
Long
resId
=
mainEntry
.
getOLATResourceable
().
getResourceableId
();
if
(
resId
!=
null
&&
resId
.
equals
(
ureq
.
getIdentity
().
getKey
()))
{
if
(
entries
.
isEmpty
())
{
//rewrite
OLATResourceable
homeOres
=
OresHelper
.
createOLATResourceableInstance
(
"HomeSite"
,
resId
);
entries
.
add
(
BusinessControlFactory
.
getInstance
().
createContextEntry
(
homeOres
));
OLATResourceable
profileOres
=
OresHelper
.
createOLATResourceableInstance
(
"profil"
,
0
l
);
entries
.
add
(
BusinessControlFactory
.
getInstance
().
createContextEntry
(
profileOres
));
}
}
return
super
.
getTabContext
(
ureq
,
ores
,
mainEntry
,
entries
);
}
/**
/**
* @see org.olat.core.id.context.ContextEntryControllerCreator#getTabName(org.olat.core.id.context.ContextEntry)
* @see org.olat.core.id.context.ContextEntryControllerCreator#getTabName(org.olat.core.id.context.ContextEntry)
*/
*/
@Override
@Override
public
String
getTabName
(
ContextEntry
ce
,
UserRequest
ureq
)
{
public
String
getTabName
(
ContextEntry
ce
,
UserRequest
ureq
)
{
Identity
id
entity
=
getIdentity
(
ce
);
Identity
id
=
getIdentity
(
ce
);
if
(
id
entity
==
null
)
return
null
;
if
(
id
==
null
)
return
null
;
return
UserManagerImpl
.
getInstance
().
getUserDisplayName
(
id
entity
);
return
UserManagerImpl
.
getInstance
().
getUserDisplayName
(
id
);
}
}
@Override
@Override
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment