mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
New attribute: ImageAttribute
SVN:trunk[4129]
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -458,6 +458,14 @@
|
||||
</reconciliation>
|
||||
</properties>
|
||||
<fields>
|
||||
<field id="picture" xsi:type="AttributeImage">
|
||||
<display_max_width>96</display_max_width>
|
||||
<display_max_height>96</display_max_height>
|
||||
<storage_max_width>128</storage_max_width>
|
||||
<storage_max_height>128</storage_max_height>
|
||||
<default_image>images/silhouette.png</default_image>
|
||||
<is_null_allowed>true</is_null_allowed>
|
||||
</field>
|
||||
<field id="first_name" xsi:type="AttributeString">
|
||||
<sql>first_name</sql>
|
||||
<default_value/>
|
||||
@@ -568,6 +576,14 @@
|
||||
<item id="col:col2">
|
||||
<rank>50</rank>
|
||||
<items>
|
||||
<item id="fieldset:Person:personal_info">
|
||||
<rank>5</rank>
|
||||
<items>
|
||||
<item id="picture">
|
||||
<rank>10</rank>
|
||||
</item>
|
||||
</items>
|
||||
</item>
|
||||
<item id="fieldset:Person:notifiy">
|
||||
<rank>10</rank>
|
||||
<items>
|
||||
|
||||
@@ -201,6 +201,8 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:Person/Attribute:tickets_list+' => 'All the tickets this person is the caller',
|
||||
'Class:Person/Attribute:manager_id_friendlyname' => 'Manager friendly name',
|
||||
'Class:Person/Attribute:manager_id_friendlyname+' => '',
|
||||
'Class:Person/Attribute:picture' => 'Picture',
|
||||
'Class:Person/Attribute:picture+' => '',
|
||||
));
|
||||
|
||||
//
|
||||
@@ -1880,6 +1882,7 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Server:otherinfo' => 'Other information',
|
||||
'Server:power' => 'Power supply',
|
||||
'Person:info' => 'General information',
|
||||
'Person:personal_info' => 'Personal information',
|
||||
'Person:notifiy' => 'Notification',
|
||||
'Class:Subnet/Tab:IPUsage' => 'IP Usage',
|
||||
'Class:Subnet/Tab:IPUsage-explain' => 'Interfaces having an IP in the range: <em>%1$s</em> to <em>%2$s</em>',
|
||||
|
||||
@@ -146,6 +146,8 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Class:Person/Attribute:tickets_list+' => '',
|
||||
'Class:Person/Attribute:manager_id_friendlyname' => 'Manager friendly name',
|
||||
'Class:Person/Attribute:manager_id_friendlyname+' => '',
|
||||
'Class:Person/Attribute:picture' => 'Photo',
|
||||
'Class:Person/Attribute:picture+' => '',
|
||||
));
|
||||
|
||||
//
|
||||
@@ -1850,6 +1852,7 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Server:otherinfo' => 'Autres informations',
|
||||
'Server:power' => 'Alimentation électrique',
|
||||
'Person:info' => 'Informations générales',
|
||||
'Person:personal_info' => 'Informations personnelles',
|
||||
'Person:notifiy' => 'Notification',
|
||||
'Class:Subnet/Tab:IPUsage' => 'IP utilisées',
|
||||
'Class:Subnet/Tab:IPUsage-explain' => 'Interfaces ayant une IP dans la plage: <em>%1$s</em> à <em>%2$s</em>',
|
||||
|
||||
BIN
datamodels/2.x/itop-config-mgmt/images/silhouette.png
Normal file
BIN
datamodels/2.x/itop-config-mgmt/images/silhouette.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -424,6 +424,25 @@ class ApplicationHelper
|
||||
}
|
||||
|
||||
$oApp['combodo.current_user'] = $oUser;
|
||||
|
||||
$sUrl = $oApp['combodo.portal.base.absolute_url'].'img/user-profile-default-256px.png';
|
||||
$oContact = UserRights::GetContactObject();
|
||||
if ($oContact)
|
||||
{
|
||||
if (MetaModel::IsValidAttCode(get_class($oContact), 'picture'))
|
||||
{
|
||||
$oImage = $oContact->Get('picture');
|
||||
if (is_object($oImage) && !$oImage->IsEmpty())
|
||||
{
|
||||
$sUrl = $oImage->GetDownloadURL(get_class($oContact), $oContact->GetKey(), 'picture');
|
||||
}
|
||||
else
|
||||
{
|
||||
$sUrl = MetaModel::GetAttributeDef(get_class($oContact), 'picture')->Get('default_image');
|
||||
}
|
||||
}
|
||||
}
|
||||
$oApp['combodo.current_user_img'] = $sUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
{% set bUserConnected = true %}
|
||||
{% set sUserFullname = app['combodo.current_user'].Get('first_name') ~ ' ' ~ app['combodo.current_user'].Get('last_name') %}
|
||||
{% set sUserEmail = app['combodo.current_user'].Get('email') %}
|
||||
{% set sUserPhotoUrl = app['combodo.portal.base.absolute_url'] ~ 'img/user-profile-default-256px.png' %}
|
||||
{% set sUserPhotoUrl = 'https://scontent-fra3-1.xx.fbcdn.net/v/t1.0-9/11050099_10153305298138954_7206181025917413544_n.jpg?oh=728b8e7b1f073b81a2e6b43858c795f8&oe=57E2B0D3' %}
|
||||
{% set sUserPhotoUrl = app['combodo.current_user_img'] %}
|
||||
{% else %}
|
||||
{% set bUserConnected = false %}
|
||||
{% set sUserFullname = '' %}
|
||||
|
||||
Reference in New Issue
Block a user