From 995b96b3b759fe14af4415437dcaed7799206422 Mon Sep 17 00:00:00 2001 From: Polonkai Gergely Date: Tue, 31 Jul 2012 11:03:48 +0200 Subject: [PATCH] Added role listing to profile box Signed-off-by: Gergely Polonkai --- app/Resources/views/Box/UserProfile.html.twig | 2 +- app/Resources/views/main_template.html.twig | 5 +++ src/KekRozsak/SecurityBundle/Entity/Role.php | 31 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/app/Resources/views/Box/UserProfile.html.twig b/app/Resources/views/Box/UserProfile.html.twig index 30fce89..148c289 100644 --- a/app/Resources/views/Box/UserProfile.html.twig +++ b/app/Resources/views/Box/UserProfile.html.twig @@ -6,7 +6,7 @@
[avatar] {{ app.user.displayName }}
- Jogosultság
+ Jogosultság{% if app.user.roles|length > 1 %}ok{% endif %}
Csoportjaim
{% for group in app.user.groups %} diff --git a/app/Resources/views/main_template.html.twig b/app/Resources/views/main_template.html.twig index aaa5ae0..8b61aac 100644 --- a/app/Resources/views/main_template.html.twig +++ b/app/Resources/views/main_template.html.twig @@ -86,6 +86,11 @@ $('#profil-box').show(); } }); + $('#jog-lista').tooltip({ + track: true, + delay: 0, + fade: 250 + }); {% else %} $('#login-mutato').click(function() { if ($('#login-box').is(':visible')) diff --git a/src/KekRozsak/SecurityBundle/Entity/Role.php b/src/KekRozsak/SecurityBundle/Entity/Role.php index e353329..159e0c8 100644 --- a/src/KekRozsak/SecurityBundle/Entity/Role.php +++ b/src/KekRozsak/SecurityBundle/Entity/Role.php @@ -168,5 +168,36 @@ class Role implements RoleInterface { return $this->name; } + + /** + * Short description + * + * @var string shortDescription + * + * @ORM\Column(type="string", length=50, nullable=false, unique=true, name="short_description") + */ + protected $shortDescription; + + /** + * Set shortDescription + * + * @param string $shortDescription + * @return Role + */ + public function setShortDescription($shortDescription) + { + $this->shortDescription = $shortDescription; + return $this; + } + + /** + * Get shortDescription + * + * @return string + */ + public function getShortDescription() + { + return $this->shortDescription; + } }