Skip to content
Snippets Groups Projects
Commit 69b8c5bb authored by colemanw's avatar colemanw
Browse files

Merge pull request #1867 from fjg-conflux/CRM-13662

CRM-13662
parents 3bdb644f e81ccbf6
No related branches found
No related tags found
No related merge requests found
...@@ -138,8 +138,10 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page { ...@@ -138,8 +138,10 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
) { ) {
$userDashboard = $component->getUserDashboardObject(); $userDashboard = $component->getUserDashboardObject();
$dashboardElements[] = array('templatePath' => $userDashboard->getHookedTemplateFileName(), $dashboardElements[] = array(
'class' => 'crm-dashboard-' . strtolower($component->name),
'sectionTitle' => $elem['title'], 'sectionTitle' => $elem['title'],
'templatePath' => $userDashboard->getTemplateFileName(),
'weight' => $elem['weight'], 'weight' => $elem['weight'],
); );
$userDashboard->run(); $userDashboard->run();
...@@ -148,6 +150,7 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page { ...@@ -148,6 +150,7 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
if (CRM_Utils_Array::value('Permissioned Orgs', $this->_userOptions)) { if (CRM_Utils_Array::value('Permissioned Orgs', $this->_userOptions)) {
$dashboardElements[] = array( $dashboardElements[] = array(
'class' => 'crm-dashboard-permissionedOrgs',
'templatePath' => 'CRM/Contact/Page/View/Relationship.tpl', 'templatePath' => 'CRM/Contact/Page/View/Relationship.tpl',
'sectionTitle' => ts('Your Contacts / Organizations'), 'sectionTitle' => ts('Your Contacts / Organizations'),
'weight' => 40, 'weight' => 40,
...@@ -164,6 +167,7 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page { ...@@ -164,6 +167,7 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
if (CRM_Utils_Array::value('PCP', $this->_userOptions)) { if (CRM_Utils_Array::value('PCP', $this->_userOptions)) {
$dashboardElements[] = array( $dashboardElements[] = array(
'class' => 'crm-dashboard-pcp',
'templatePath' => 'CRM/Contribute/Page/PcpUserDashboard.tpl', 'templatePath' => 'CRM/Contribute/Page/PcpUserDashboard.tpl',
'sectionTitle' => ts('Personal Campaign Pages'), 'sectionTitle' => ts('Personal Campaign Pages'),
'weight' => 40, 'weight' => 40,
...@@ -176,6 +180,7 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page { ...@@ -176,6 +180,7 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
if (CRM_Utils_Array::value('Assigned Activities', $this->_userOptions)) { if (CRM_Utils_Array::value('Assigned Activities', $this->_userOptions)) {
// Assigned Activities section // Assigned Activities section
$dashboardElements[] = array( $dashboardElements[] = array(
'class' => 'crm-dashboard-assignedActivities',
'templatePath' => 'CRM/Activity/Page/UserDashboard.tpl', 'templatePath' => 'CRM/Activity/Page/UserDashboard.tpl',
'sectionTitle' => ts('Your Assigned Activities'), 'sectionTitle' => ts('Your Assigned Activities'),
'weight' => 5, 'weight' => 5,
...@@ -260,5 +265,4 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page { ...@@ -260,5 +265,4 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
); );
return self::$_links; return self::$_links;
} }
} }
\ No newline at end of file
...@@ -24,24 +24,24 @@ ...@@ -24,24 +24,24 @@
+--------------------------------------------------------------------+ +--------------------------------------------------------------------+
*} *}
<table class="dashboard-elements"> <table class="dashboard-elements">
{if $showGroup} {if $showGroup}
<tr> <tr class="crm-dashboard-groups">
<td> <td>
<div class="header-dark"> <div class="header-dark">
{ts}Your Group(s){/ts} {ts}Your Group(s){/ts}
</div> </div>
{include file="CRM/Contact/Page/View/UserDashBoard/GroupContact.tpl"} {include file="CRM/Contact/Page/View/UserDashBoard/GroupContact.tpl"}
</td> </td>
</tr> </tr>
{/if} {/if}
{foreach from=$dashboardElements item=element} {foreach from=$dashboardElements item=element}
<tr> <tr{if isset($element.class)} class="{$element.class}"{/if}>
<td> <td>
<div class="header-dark">{$element.sectionTitle}</div> <div class="header-dark">{$element.sectionTitle}</div>
{include file=$element.templatePath} {include file=$element.templatePath}
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment