Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
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
Development
CiviCRM Core
Commits
f982eb14
Unverified
Commit
f982eb14
authored
3 years ago
by
Seamus Lee
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #21991 from eileenmcnaughton/isset4
Ensure that keys are set in tabValues before hitting smarty
parents
7c18a534
f5f479b9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Contact/Page/View/Summary.php
+8
-0
8 additions, 0 deletions
CRM/Contact/Page/View/Summary.php
templates/CRM/Contact/Page/View/Summary.tpl
+3
-3
3 additions, 3 deletions
templates/CRM/Contact/Page/View/Summary.tpl
with
11 additions
and
3 deletions
CRM/Contact/Page/View/Summary.php
+
8
−
0
View file @
f982eb14
...
...
@@ -444,6 +444,14 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
// now sort the tabs based on weight
usort
(
$allTabs
,
[
'CRM_Utils_Sort'
,
'cmpFunc'
]);
$expectedKeys
=
[
'count'
,
'class'
,
'template'
,
'hideCount'
,
'icon'
];
foreach
(
$allTabs
as
$index
=>
$tab
)
{
foreach
(
$expectedKeys
as
$key
)
{
if
(
!
array_key_exists
(
$key
,
$tab
))
{
$allTabs
[
$index
][
$key
]
=
NULL
;
}
}
}
return
$allTabs
;
}
...
...
This diff is collapsed.
Click to expand it.
templates/CRM/Contact/Page/View/Summary.tpl
+
3
−
3
View file @
f982eb14
...
...
@@ -110,11 +110,11 @@
<div
id=
"mainTabContainer"
>
<ul
class=
"crm-contact-tabs-list"
>
{
foreach
from
=
$allTabs
item
=
tabValue
}
<li
id=
"tab_
{
$tabValue.id
}
"
class=
"crm-tab-button ui-corner-all
{
if
is
set
(
$tabValue.count
)
}
crm-count-
{
$tabValue.count
}{/
if
}{
if
isset
(
$tabValue.class
)
}
{
$tabValue.class
}{/
if
}
"
>
<a
href=
"
{
if
!
empty
(
$tabValue.template
)
}
#contact-
{
$tabValue.id
}{
else
}{
$tabValue.url
}{/
if
}
"
title=
"
{
$tabValue.title
|
escape
}
"
>
<li
id=
"tab_
{
$tabValue.id
}
"
class=
"crm-tab-button ui-corner-all
{
if
is
_numeric
(
$tabValue.count
)
}
crm-count-
{
$tabValue.count
}{/
if
}{
if
$tabValue.class
}
{
$tabValue.class
}{/
if
}
"
>
<a
href=
"
{
if
$tabValue.template
}
#contact-
{
$tabValue.id
}{
else
}{
$tabValue.url
}{/
if
}
"
title=
"
{
$tabValue.title
|
escape
}
"
>
<i
class=
"
{
if
!
empty
(
$tabValue.icon
)
}{
$tabValue.icon
}{
else
}
crm-i fa-puzzle-piece
{/
if
}
"
aria-hidden=
"true"
></i>
<span>
{
$tabValue.title
}
</span>
{
if
empty
(
$tabValue.hideCount
)
}
<em>
{
if
is
set
(
$tabValue.count
)
}{
$tabValue.count
}{/
if
}
</em>
{/
if
}
{
if
empty
(
$tabValue.hideCount
)
}
<em>
{
if
is
_numeric
(
$tabValue.count
)
}{
$tabValue.count
}{/
if
}
</em>
{/
if
}
</a>
</li>
{/
foreach
}
...
...
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