Sfoglia il codice sorgente

menu permessi hover

master
Mattia MWG 5 anni fa
parent
commit
3ab29101b5
  1. 30
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/css/component/header.scss
  2. 8
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/js/custom.js
  3. 72
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/templates/navigation.ftl
  4. 30
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/css/component/header.scss
  5. 8
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/js/custom.js
  6. 72
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/templates/navigation.ftl

30
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/css/component/header.scss

@ -97,10 +97,7 @@
width: auto;
}
}
.info-user{
display:none;
}
.subheader-right {
@include display-flex();
@ -114,21 +111,38 @@
@include display-flex();
flex: 0 0 auto;
@include align-items(center);
position:relative;
.fa-user-circle {
padding-right: 5px;
}
.div_permessi{
padding-left:10px;
text-decoration:underline;
font-size:11px;
cursor:pointer;
}
}
.info-user {
padding-right: 1.25em;
display:none;
position: absolute;
background-color: #fff;
top: 30px;
color: #000;
width: 250px;
box-shadow: 0px 0px 5px 1px #aaa;
left: calc(50% - 125px);
padding: 5px;
.info-user__location {
color: $w;
color: $b;
font-size: 10px;
}
.info-user__occupazione {
color: $w;
color: $b;
font-size: 10px;
}
}

8
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/js/custom.js

@ -28,6 +28,14 @@ $(document).ready(function () {
/* $('.lfr-menu-expanded').click(function() {
$(this).find( "li" ).toggle();
});*/
$('.div_permessi').hover(
function() {
$( this ).find('.info-user').show();
}, function() {
$('.div_permessi .info-user').hide();
}
);
});

72
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/templates/navigation.ftl

@ -33,40 +33,46 @@
<div class="subheader-right">
<#if user_name != "" >
<div class="name-user">
<span class="fa fa-user-circle"></span>
${user_name}
</div>
<div class="info-user">
<#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') />
<#assign organizations = organizationservice.getUserOrganizations(user_id) >
<#assign org_names = "">
<#if organizations?has_content>
<#list organizations as org>
<#assign org_names = org_names+" - ${org.getName()}">
</#list>
</#if>
<#if org_names?has_content>
<p class="info-user__location">${org_names?substring(3)}</p>
</#if>
<#assign userGroupRoleService = serviceLocator.findService('com.liferay.portal.service.UserGroupRoleLocalService') />
<#assign roles = userGroupRoleService.getUserGroupRoles(user_id) >
<#assign role_names = "">
<#if roles?has_content>
<#list roles as role>
<#assign roleName = role.getRole().getName()>
<#if !roleName?matches('.*Owner') >
<#assign roleName = roleName?replace('portos_', '')?replace('_',' ')?capitalize>
<#if !role_names?contains(roleName) >
<#assign role_names = role_names+", ${roleName}">
</#if>
</#if>
</#list>
</#if>
<#if role_names?has_content>
<p class="info-user__occupazione">${role_names?substring(2)}</p>
</#if>
<div>
<span class="fa fa-user-circle"></span>
${user_name}
</div>
<div class="div_permessi">
Permessi
<div class="info-user">
<#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') />
<#assign organizations = organizationservice.getUserOrganizations(user_id) >
<#assign org_names = "">
<#if organizations?has_content>
<#list organizations as org>
<#assign org_names = org_names+" - ${org.getName()}">
</#list>
</#if>
<#if org_names?has_content>
<p class="info-user__location">${org_names?substring(3)}</p>
</#if>
<#assign userGroupRoleService = serviceLocator.findService('com.liferay.portal.service.UserGroupRoleLocalService') />
<#assign roles = userGroupRoleService.getUserGroupRoles(user_id) >
<#assign role_names = "">
<#if roles?has_content>
<#list roles as role>
<#assign roleName = role.getRole().getName()>
<#if !roleName?matches('.*Owner') >
<#assign roleName = roleName?replace('portos_', '')?replace('_',' ')?capitalize>
<#if !role_names?contains(roleName) >
<#assign role_names = role_names+", ${roleName}">
</#if>
</#if>
</#list>
</#if>
<#if role_names?has_content>
<p class="info-user__occupazione">${role_names?substring(2)}</p>
</#if>
</div>
</div>
</div>
<div class="header-separator"></div>
</#if>

30
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/css/component/header.scss

@ -97,10 +97,7 @@
width: auto;
}
}
.info-user{
display:none;
}
.subheader-right {
@include display-flex();
@ -114,21 +111,38 @@
@include display-flex();
flex: 0 0 auto;
@include align-items(center);
position:relative;
.fa-user-circle {
padding-right: 5px;
}
.div_permessi{
padding-left:10px;
text-decoration:underline;
font-size:11px;
cursor:pointer;
}
}
.info-user {
padding-right: 1.25em;
display:none;
position: absolute;
background-color: #fff;
top: 30px;
color: #000;
width: 250px;
box-shadow: 0px 0px 5px 1px #aaa;
left: calc(50% - 125px);
padding: 5px;
.info-user__location {
color: $w;
color: $b;
font-size: 10px;
}
.info-user__occupazione {
color: $w;
color: $b;
font-size: 10px;
}
}

8
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/js/custom.js

@ -28,6 +28,14 @@ $(document).ready(function () {
/* $('.lfr-menu-expanded').click(function() {
$(this).find( "li" ).toggle();
});*/
$('.div_permessi').hover(
function() {
$( this ).find('.info-user').show();
}, function() {
$('.div_permessi .info-user').hide();
}
);
});

72
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/templates/navigation.ftl

@ -33,40 +33,46 @@
<div class="subheader-right">
<#if user_name != "" >
<div class="name-user">
<span class="fa fa-user-circle"></span>
${user_name}
</div>
<div class="info-user">
<#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') />
<#assign organizations = organizationservice.getUserOrganizations(user_id) >
<#assign org_names = "">
<#if organizations?has_content>
<#list organizations as org>
<#assign org_names = org_names+" - ${org.getName()}">
</#list>
</#if>
<#if org_names?has_content>
<p class="info-user__location">${org_names?substring(3)}</p>
</#if>
<#assign userGroupRoleService = serviceLocator.findService('com.liferay.portal.service.UserGroupRoleLocalService') />
<#assign roles = userGroupRoleService.getUserGroupRoles(user_id) >
<#assign role_names = "">
<#if roles?has_content>
<#list roles as role>
<#assign roleName = role.getRole().getName()>
<#if !roleName?matches('.*Owner') >
<#assign roleName = roleName?replace('portos_', '')?replace('_',' ')?capitalize>
<#if !role_names?contains(roleName) >
<#assign role_names = role_names+", ${roleName}">
</#if>
</#if>
</#list>
</#if>
<#if role_names?has_content>
<p class="info-user__occupazione">${role_names?substring(2)}</p>
</#if>
<div>
<span class="fa fa-user-circle"></span>
${user_name}
</div>
<div class="div_permessi">
Permessi
<div class="info-user">
<#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') />
<#assign organizations = organizationservice.getUserOrganizations(user_id) >
<#assign org_names = "">
<#if organizations?has_content>
<#list organizations as org>
<#assign org_names = org_names+" - ${org.getName()}">
</#list>
</#if>
<#if org_names?has_content>
<p class="info-user__location">${org_names?substring(3)}</p>
</#if>
<#assign userGroupRoleService = serviceLocator.findService('com.liferay.portal.service.UserGroupRoleLocalService') />
<#assign roles = userGroupRoleService.getUserGroupRoles(user_id) >
<#assign role_names = "">
<#if roles?has_content>
<#list roles as role>
<#assign roleName = role.getRole().getName()>
<#if !roleName?matches('.*Owner') >
<#assign roleName = roleName?replace('portos_', '')?replace('_',' ')?capitalize>
<#if !role_names?contains(roleName) >
<#assign role_names = role_names+", ${roleName}">
</#if>
</#if>
</#list>
</#if>
<#if role_names?has_content>
<p class="info-user__occupazione">${role_names?substring(2)}</p>
</#if>
</div>
</div>
</div>
<div class="header-separator"></div>
</#if>

Caricamento…
Annulla
Salva