org.fsf.memberdashboard.git
10 years agoinfo: Fix the profile link displayed in noscript tag.
David Thompson [Wed, 5 Nov 2014 23:06:22 +0000 (18:06 -0500)]
info: Fix the profile link displayed in noscript tag.

* CRM/Memberdashboard/Page/Info.php (CRM_Memberdashboard_Page_Info)
  [run]: Assign 'profileId' for smarty template.
* templates/CRM/Memberdashboard/Page/Info.tpl: Fix profile URL.

10 years agoinfo: Fix issue where jquery.notify.js is sometimes not loaded and
David Thompson [Wed, 5 Nov 2014 22:44:48 +0000 (17:44 -0500)]
info: Fix issue where jquery.notify.js is sometimes not loaded and
breaks the page.

* CRM/Memberdashboard/Page/Info.php (CRM_Memberdashboard_Page_Info)
  [run]: Add jquery.notify.min.js resource.

10 years agojs: Use better method for using civi's jquery.
David Thompson [Wed, 5 Nov 2014 22:44:05 +0000 (17:44 -0500)]
js: Use better method for using civi's jquery.

* assets/js/member-info.js: Use 'CRM.$'.

10 years agoFix permissions.
David Thompson [Wed, 5 Nov 2014 22:43:15 +0000 (17:43 -0500)]
Fix permissions.

* xml/Menu/memberdashboard.xml: Use the 'profile edit' permission
  instead.

10 years agobenefits: Display email aliases in a table.
David Thompson [Tue, 4 Nov 2014 17:53:05 +0000 (12:53 -0500)]
benefits: Display email aliases in a table.

* CRM/Memberdashboard/Page/Benefits.php (CRM_Memberdashboard_Page_Benefits)
  [loadEmailAliases]: New method.
  [padEmailAliases]: New method.
* memberdashboard.php (MEMBERDASHBOARD_MAX_EMAIL_ALIASES): New constant.
* templates/CRM/Memberdashboard/Page/Benefits.tpl: Render email aliases.

10 years agoAdd member_email_alias table.
David Thompson [Tue, 4 Nov 2014 15:22:55 +0000 (10:22 -0500)]
Add member_email_alias table.

* CRM/Memberdashboard/Upgrader.php: New file.
* CRM/Memberdashboard/Upgrader/Base.php: New file.
* sql/install.sql: New file.

10 years agobenefits: Simplify Drupal user access.
David Thompson [Tue, 4 Nov 2014 14:28:24 +0000 (09:28 -0500)]
benefits: Simplify Drupal user access.

* CRM/Memberdashboard/Page/Benefits.php (CRM_Memberdashboard_Page_Benefits)
  [loadUser]: Delete.
  [run]: Use $user global variable.

10 years agobenefits: Display proper XMPP username and elaborate on other benefits.
David Thompson [Fri, 31 Oct 2014 17:02:43 +0000 (13:02 -0400)]
benefits: Display proper XMPP username and elaborate on other benefits.

10 years agoAdd benefits page.
David Thompson [Thu, 30 Oct 2014 20:59:18 +0000 (16:59 -0400)]
Add benefits page.

* 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.

10 years agocommunications: Copy and tweak the groups template from civi core.
David Thompson [Fri, 24 Oct 2014 20:59:43 +0000 (16:59 -0400)]
communications: Copy and tweak the groups template from civi core.

* templates/CRM/Memberdashboard/Page/Communications.tpl: Render custom
  groups template.
* templates/CRM/Memberdashboard/Page/Element/Group.tpl: New file.

10 years agocommunication: Add custom group subscription form.
David Thompson [Fri, 24 Oct 2014 20:44:19 +0000 (16:44 -0400)]
communication: Add custom group subscription form.

* CRM/Memberdashboard/Page/Communications.php
  (CRM_Memberdashboard_Page_Communications) [getGroups]: New method.
  [postProcess]: Add contact to given group.
  [run]: Add groups for rendering.
* templates/CRM/Memberdashboard/Page/Communications.tpl: Render group
  select box.

10 years agoFix docstring.
David Thompson [Thu, 23 Oct 2014 20:57:37 +0000 (16:57 -0400)]
Fix docstring.

* CRM/Memberdashboard/Page/ComponentHelper.php
  (CRM_Memberdashboard_Page_ComponentHelper) [buildDashboardElements]:
  Correct outdated docstring.

10 years agocommunications: Apply civi CSS to form elements.
David Thompson [Thu, 23 Oct 2014 20:56:07 +0000 (16:56 -0400)]
communications: Apply civi CSS to form elements.

* templates/CRM/Memberdashboard/Page/Communications.tpl: Remove form
  tag.  Use 'crm-select2' class for email format dropdown.  Use
  'crm-form-submit' class for 'Save' button.

10 years agoExtract base page class.
David Thompson [Thu, 23 Oct 2014 16:10:51 +0000 (12:10 -0400)]
Extract base page class.

* CRM/Memberdashboard/Page.php: New file.
* CRM/Memberdashboard/Page/Communications.php
  (CRM_Memberdashboard_Page_Communications): Inherit from base page.
  [contactId, loadContact, isPOST]: Remove methods.
  [run]: Use pre-loaded contact object.
* CRM/Memberdashboard/Page/MemberDashboard.php
  (CRM_Memberdashboard_Page_MemberDashboard): Inherit from base page.
  [$contact]: Remove variable.
  [__construct, loadContact]: Remove methods.

10 years agocommunications: Add email preferences.
David Thompson [Thu, 23 Oct 2014 15:55:07 +0000 (11:55 -0400)]
communications: Add email preferences.

* CRM/Memberdashboard/Page/Communications.php
  (CRM_Memberdashboard_Page_Communications) [contactId, loadContact,
  isPOST, postProcess): New methods.
  [run]: Disable group editing for now.  Add 'contact' and 'mailFormats'
  template variables.
* templates/CRM/Memberdashboard/Page/Communications.tpl: Add email
  preferences form.

10 years agoinfo: Add loading spinner.
David Thompson [Wed, 22 Oct 2014 16:23:37 +0000 (12:23 -0400)]
info: Add loading spinner.

* assets/js/member-info.js: Remove loading spinner when form is loaded.
* templates/CRM/Memberdashboard/Page/Info.tpl: Add loading spinner.

10 years agosettings: Refactor method.
David Thompson [Wed, 22 Oct 2014 14:30:41 +0000 (10:30 -0400)]
settings: Refactor method.

* CRM/Admin/Form/Setting/MemberDashboard.php
  (CRM_Admin_Form_Setting_MemberDashboard) [fetchProfiles]: New method.
  [buildQuickForm]: Use it.

10 years agoAdd a settings page.
David Thompson [Tue, 21 Oct 2014 14:04:05 +0000 (10:04 -0400)]
Add a settings page.

* CRM/Admin/Form/Setting/MemberDashboard.php: New file.
* templates/CRM/Admin/Form/Setting/MemberDashboard.tpl: New file.
* xml/Menu/memberdashboard.xml: Add menu entry.

10 years agojs: Use the correct profile ID on info page.
David Thompson [Mon, 20 Oct 2014 18:05:28 +0000 (14:05 -0400)]
js: Use the correct profile ID on info page.

* assets/js/member-info.js: s/profile_id/profileId/

10 years agoDefine constant for settings group name.
David Thompson [Mon, 20 Oct 2014 17:17:53 +0000 (13:17 -0400)]
Define constant for settings group name.

* memberdashboard.php (MEMBERDASHBOARD_SETTINGS_GROUP): New constant.
* CRM/Memberdashboard/Page/Info.php (CRM_Memberdashboard_Page_Info.run):
  Use it.

10 years agoAdd member info profile setting.
David Thompson [Mon, 20 Oct 2014 16:03:57 +0000 (12:03 -0400)]
Add member info profile setting.

* settings/MemberDashboard.setting.php: New file.
* CRM/Memberdashboard/Page/Info.php (CRM_Memberdashboard_Page_Info.run):
  Fetch member info profile and pass it to the client.
* assets/js/member-info.js: Load the configured profile instead of a
  hardcoded one.
* README.org (Configuration): New section.

10 years agoLoad user info profile via AJAX call.
David Thompson [Thu, 9 Oct 2014 14:42:19 +0000 (10:42 -0400)]
Load user info profile via AJAX call.

Present a link to the user when JavaScript is disabled.

10 years agoUse API to fetch contact.
David Thompson [Thu, 2 Oct 2014 14:51:05 +0000 (10:51 -0400)]
Use API to fetch contact.

* CRM/Memberdashboard/Page/MemberDashboard.php (loadContact): Use API.
  (run): '$contact' is now an array.

10 years agoAdd info page boilerplate.
David Thompson [Thu, 2 Oct 2014 14:32:53 +0000 (10:32 -0400)]
Add info page boilerplate.

* CRM/Memberdashboard/Page/Info.php: New file.
* templates/CRM/Memberdashboard/Page/Info.tpl: New file.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Add link.
* xml/Menu/memberdashboard.xml (<menu>): Add item for info page.

10 years agoAdd communications page.
David Thompson [Wed, 1 Oct 2014 20:54:21 +0000 (16:54 -0400)]
Add communications page.

* CRM/Memberdashboard/Page/Communications.php: New file.
* templates/CRM/Memberdashboard/Page/Communications.tpl: New file.
* templates/CRM/Memberdashboard/Page/Element/CiviEvent.tpl: New file.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Link to new page.
* xml/Menu/memberdashboard.xml (<menu>): Add item for new page.

10 years agoFactor out a helper class from the member dashboard.
David Thompson [Wed, 1 Oct 2014 20:48:34 +0000 (16:48 -0400)]
Factor out a helper class from the member dashboard.

* CRM/Memberdashboard/Page/ComponentHelper.php: New file.
* CRM/Memberdashboard/Page/MemberDashboard.php ($components): Delete
  variable.
  (loadComponents, buildDashboardElements): Delete methods.
  (__construct): Don't load dashboard components;
  (run): Use helper class.

10 years agoAdd placeholder markup for referral code section.
David Thompson [Wed, 1 Oct 2014 16:04:01 +0000 (12:04 -0400)]
Add placeholder markup for referral code section.

* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Add it.

10 years agoFix docstring.
David Thompson [Wed, 1 Oct 2014 15:50:42 +0000 (11:50 -0400)]
Fix docstring.

* CRM/Memberdashboard/Page/MemberDashboard.php (loadComponents): Fix
  '@return' in docstring.

10 years agoFactor out the side-effects of building the bashboard.
David Thompson [Wed, 1 Oct 2014 15:41:43 +0000 (11:41 -0400)]
Factor out the side-effects of building the bashboard.

* CRM/Memberdashboard/Page/MemberDashboard.php ($components): New
  variable.
  (__construct): Load components.
  (loadComponents): New method.
  (buildDashboard): Renamed.
  (buildDashboardElements): Remove side-effects.
  (run): Call 'run' method on dashboard components.

10 years agoRemove 'Receipt sent' column from contributions table.
David Thompson [Wed, 1 Oct 2014 15:26:17 +0000 (11:26 -0400)]
Remove 'Receipt sent' column from contributions table.

* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: Remove column.

10 years agoCopy dashboard element templates from CiviCRM core.
David Thompson [Wed, 1 Oct 2014 15:22:02 +0000 (11:22 -0400)]
Copy dashboard element templates from CiviCRM core.

These will be modified to our needs later.

* CRM/Memberdashboard/Page/MemberDashboard.php (buildDashboard): Change
  template path.
* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: New file.
* templates/CRM/Memberdashboard/Page/Element/CiviMember.tpl: New file.

10 years agoRemove debugging code.
David Thompson [Wed, 1 Oct 2014 15:20:44 +0000 (11:20 -0400)]
Remove debugging code.

* templates/CRM/Memberdashboard/Page/DashboardElement.tpl: Remove it.

10 years agoAdd license headers to files.
David Thompson [Wed, 1 Oct 2014 15:06:42 +0000 (11:06 -0400)]
Add license headers to files.

* README.md (Copyright): Tweak licensing info.
* CRM/Memberdashboard/Page/MemberDashboard.php: Add license header.
* templates/CRM/Memberdashboard/Page/DashboardElement.tpl: Ditto.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Ditto.

10 years agoFix page title.
David Thompson [Wed, 1 Oct 2014 14:21:48 +0000 (10:21 -0400)]
Fix page title.

* CRM/Memberdashboard/Page/MemberDashboard.php (run): Set page title
  after calling the superclass method.

10 years agoDisplay CiviMember and CiviContribute dashboard elements.
David Thompson [Wed, 1 Oct 2014 14:14:31 +0000 (10:14 -0400)]
Display CiviMember and CiviContribute dashboard elements.

* CRM/Memberdashboard/Page/MemberDashboard.php (__construct): Assign the
  result of 'loadContact'.
  (loadContact): Return the contact rather than assigning it to a
  variable.
  (buildDashboard): Return an array with CiviMember and CiviContribute
  dashboard elements.
  (pageTitle): New method.
  (run): Use 'pageTitle' method.  Assign dashboard elements for rendering.
* templates/CRM/Memberdashboard/Page/DashboardElement.tpl: New file.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Render
  CiviMember and CiviContribute elements.

10 years agoRender the CiviMember component on the dashboard.
David Thompson [Tue, 30 Sep 2014 20:04:07 +0000 (16:04 -0400)]
Render the CiviMember component on the dashboard.

* CRM/Memberdashboard/Page/MemberDashboard.php (buildDashboard): New
  method.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Render component.

10 years agoAdd MemberDashboard page boilerplate.
David Thompson [Tue, 30 Sep 2014 19:04:35 +0000 (15:04 -0400)]
Add MemberDashboard page boilerplate.

* CRM/Memberdashboard/Page/MemberDashboard.php: New file.
* templates/CRM/Memberdashbord/Page/MemberDashboard.tpl: New file.
* xml/Menu/memberdashboard.xml: New file.

10 years agohacking: Add 'Development Requirements' section.
David Thompson [Mon, 29 Sep 2014 19:54:36 +0000 (15:54 -0400)]
hacking: Add 'Development Requirements' section.

* HACKING.md ('Development Requirements'): New section.

10 years agoAdd civix generated boilerplate.
David Thompson [Mon, 29 Sep 2014 16:26:31 +0000 (12:26 -0400)]
Add civix generated boilerplate.

* COPYING: Use civix auto-generated license text.
* COYPING.exception: Delete it.
* info.xml: New file.
* memberdashboard.civix.php: New file.
* memberdashboard.php: New file.

10 years agoAdd coding guidelines file.
David Thompson [Fri, 26 Sep 2014 15:54:59 +0000 (11:54 -0400)]
Add coding guidelines file.

* HACKING.md: New file.

10 years agoREADME: Add CiviCRM licensing exception.
David Thompson [Fri, 26 Sep 2014 15:54:24 +0000 (11:54 -0400)]
README: Add CiviCRM licensing exception.

* README.md (Copyright): Add information about exception.
* COPYING.exception: New file.

10 years agoREADME: Indicate that the Affero clause is in the license.
David Thompson [Fri, 26 Sep 2014 15:20:59 +0000 (11:20 -0400)]
README: Indicate that the Affero clause is in the license.

* README.md (Copyright): Add 'Affero'.

10 years agoAdd README and license.
David Thompson [Fri, 26 Sep 2014 15:19:45 +0000 (11:19 -0400)]
Add README and license.

* COPYING: New file.
* README.md: New file.