typo
[org.fsf.memberdashboard.git] / CRM / Memberdashboard / Page / Info.php
1 <?php
2 /**
3 * FSF Member Dashboard
4 * Copyright © 2014 Free Software Foundation, Inc.
5 *
6 * This file is a part of FSF Member Dashboard.
7 *
8 * FSF Member Dashboard is free software; you can copy, modify, and
9 * distribute it under the terms of the GNU Affero General Public
10 * License Version 3, 19 November 2007 and the CiviCRM Licensing
11 * Exception.
12 *
13 * FSF Member Dashboard is distributed in the hope that it will be
14 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Affero General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with FSF Member Dashboard. If not, see
20 * <http://www.gnu.org/licenses/>.
21 */
22
23 require_once 'CRM/Core/Page.php';
24
25 class CRM_Memberdashboard_Page_Info extends CRM_Core_Page {
26 function run() {
27 CRM_Utils_System::setTitle('My Info');
28
29 $profileId = civicrm_api3('setting', 'getvalue', array(
30 'name' => 'memberdashboard_info_profile_id',
31 'group' => MEMBERDASHBOARD_SETTINGS_GROUP
32 ));
33
34 $resources = CRM_Core_Resources::singleton();
35 // FIXME: Hack for when civicrm doesn't include this on the page
36 // for authenticated, non-admin users.
37 $resources->addScriptFile('civicrm',
38 'packages/jquery/plugins/jquery.notify.min.js',
39 10, 'html-header');
40 $resources->addScriptFile('org.fsf.memberdashboard',
41 'assets/js/underscore.js');
42 $resources->addScriptFile('org.fsf.memberdashboard',
43 'assets/js/member-info.js');
44 $resources->addScript("var memberDashboard = { profileId: $profileId };");
45
46 $this->assign('profileId', $profileId);
47
48 parent::run();
49 }
50 }