CRM-12193 - Display community message on dashboard
authorTim Otten <totten@civicrm.org>
Sat, 30 Mar 2013 03:18:56 +0000 (23:18 -0400)
committerTim Otten <totten@civicrm.org>
Sat, 30 Mar 2013 03:19:27 +0000 (23:19 -0400)
----------------------------------------
* CRM-12193: In-app fundraising for CiviCRM
  http://issues.civicrm.org/jira/browse/CRM-12193

CRM/Contact/Page/DashBoard.php
templates/CRM/Contact/Page/DashBoardDashlet.tpl

index 6576551f29cc4e40bf7f061354d91de2745b4dd9..77a1c2fcc7c894247bcd7e6a8309cbc0fa70d0b1 100644 (file)
@@ -115,6 +115,14 @@ class CRM_Contact_Page_DashBoard extends CRM_Core_Page {
     $this->assign('ownerOrgOK', $ownerOrgOK);
     $this->assign('defaultMailboxOK', $defaultMailboxOK);
 
+    $communityMessages = CRM_Core_CommunityMessages::create();
+    if ($communityMessages->isEnabled()) {
+      $message = $communityMessages->pick();
+      if ($message) {
+        $this->assign('communityMessages', $communityMessages->evalMarkup($message['markup']));
+      }
+    }
+
     return parent::run();
   }
 }
index d1f88ff42c3b741429a29b0d8e2681370023d351..b73ddc1e41981be8e26933893ea3bb9af59de599 100644 (file)
@@ -57,6 +57,7 @@
     {/if}
     </div>
 {/if}
+{$communityMessages}
 <div class="crm-submit-buttons">
 <a href="#" id="crm-dashboard-configure" class="button show-add">
   <span><div class="icon settings-icon"></div>{ts}Configure Your Dashboard{/ts}</span></a>