Add benefits page.
authorDavid Thompson <davet@gnu.org>
Thu, 30 Oct 2014 20:59:18 +0000 (16:59 -0400)
committerDavid Thompson <davet@gnu.org>
Thu, 30 Oct 2014 20:59:18 +0000 (16:59 -0400)
* CRM/Memberdashboard/Page/Benefits.php: New file.
* templates/CRM/Memberdashboard/Page/Benefits.tpl: New file.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Add link to
  benefits page.
* xml/Menu/memberdashboard.xml: Add route.

CRM/Memberdashboard/Page/Benefits.php [new file with mode: 0644]
templates/CRM/Memberdashboard/Page/Benefits.tpl [new file with mode: 0644]
templates/CRM/Memberdashboard/Page/MemberDashboard.tpl
xml/Menu/memberdashboard.xml

diff --git a/CRM/Memberdashboard/Page/Benefits.php b/CRM/Memberdashboard/Page/Benefits.php
new file mode 100644 (file)
index 0000000..bd27285
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+require_once 'CRM/Memberdashboard/Page.php';
+
+class CRM_Memberdashboard_Page_Benefits extends CRM_Memberdashboard_Page {
+  function run() {
+    CRM_Utils_System::setTitle(ts('Benefits'));
+
+    $this->assign('contact', $this->contact);
+
+    parent::run();
+  }
+}
diff --git a/templates/CRM/Memberdashboard/Page/Benefits.tpl b/templates/CRM/Memberdashboard/Page/Benefits.tpl
new file mode 100644 (file)
index 0000000..b7f47b8
--- /dev/null
@@ -0,0 +1,30 @@
+<div class="header-dark">Jabber/XMPP</div>
+
+Your Jabber/XMPP account is: <strong>writeme@member.fsf.org</strong>
+
+<div class="header-dark">Shop Discount</div>
+
+<p>
+  Enjoy 20% off all merchandise at the
+  <a href="http://shop.fsf.org/">FSF shop</a>
+  using promotional code <strong>ASSOC</strong>
+</p>
+
+<div class="header-dark">LibrePlanet</div>
+
+<p>
+  Associate members get gratis admission to LibrePlanet, the FSF's
+  annual conference.
+</p>
+
+<div class="header-dark">Email Forwarding</div>
+
+<p>
+  TODO
+</p>
+
+<div class="header-dark">Member Forums</div>
+
+<p>
+  TODO
+</p>
index 63302b06890667370748866905cb07cbba771ace..28f56d21fb6fd3eb9955bede0d1c315262f5b6f1 100644 (file)
       Go to Info
     </a>
   </li>
+  <li>
+    <a href="{crmURL p='civicrm/member-dashboard/benefits'}">
+      Go to Benefits
+    </a>
+  </li>
 </ul>
 
 {include file="CRM/Memberdashboard/Page/DashboardElement.tpl"
index c9e97493c84885ab29c9fffc4bdb01d89224e199..7673f52bcf550e0fe8ecb6ee83f33bfd1252a866 100644 (file)
     <title>MemberDashboard</title>
     <access_arguments>access CiviCRM</access_arguments>
   </item>
+  <item>
+    <path>civicrm/member-dashboard/benefits</path>
+    <page_callback>CRM_Memberdashboard_Page_Benefits</page_callback>
+    <title>Benefits</title>
+    <access_arguments>access CiviCRM</access_arguments>
+  </item>
 </menu>