1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +01:00
OwncloudContactsOfficial/index.php

66 lines
2.5 KiB
PHP
Raw Normal View History

2011-08-06 22:32:06 +02:00
<?php
/**
* Copyright (c) 2012, 2013 Thomas Tanghus <thomas@tanghus.net>
2012-02-14 01:47:18 +01:00
* Copyright (c) 2011 Jakob Sack mail@jakobsack.de
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
2011-08-06 22:32:06 +02:00
*/
namespace OCA\Contacts;
2011-08-06 22:32:06 +02:00
// Check if we are a user
\OCP\User::checkLoggedIn();
\OCP\App::checkAppEnabled('contacts');
\OCP\App::setActiveNavigationEntry('contacts_index');
2011-08-06 22:32:06 +02:00
$impp_types = Utils\Properties::getTypesForProperty('IMPP');
$adr_types = Utils\Properties::getTypesForProperty('ADR');
$phone_types = Utils\Properties::getTypesForProperty('TEL');
$email_types = Utils\Properties::getTypesForProperty('EMAIL');
$ims = Utils\Properties::getIMOptions();
2012-08-22 18:50:50 +02:00
$im_protocols = array();
foreach($ims as $name => $values) {
$im_protocols[$name] = $values['displayname'];
}
2013-03-15 17:00:27 +01:00
$maxUploadFilesize = \OCP\Util::maxUploadFilesize('/');
2012-07-20 17:09:03 +02:00
\OCP\Util::addscript('', 'multiselect');
\OCP\Util::addscript('', 'jquery.multiselect');
\OCP\Util::addscript('', 'oc-vcategories');
2013-04-15 22:47:11 +02:00
\OCP\Util::addscript('', 'octemplate');
\OCP\Util::addscript('contacts', 'modernizr.custom');
\OCP\Util::addscript('contacts', 'app');
\OCP\Util::addscript('contacts', 'addressbooks');
\OCP\Util::addscript('contacts', 'contacts');
\OCP\Util::addscript('contacts', 'storage');
\OCP\Util::addscript('contacts', 'groups');
//\OCP\Util::addscript('contacts', 'expanding');
\OCP\Util::addscript('contacts', 'jquery.combobox');
2013-06-03 15:44:01 +02:00
\OCP\Util::addscript('core', 'jquery.ocdialog');
\OCP\Util::addscript('contacts', 'jquery.ocaddnew');
\OCP\Util::addscript('files', 'jquery.fileupload');
\OCP\Util::addscript('contacts', 'jquery.Jcrop');
\OCP\Util::addStyle('3rdparty/fontawesome', 'font-awesome');
\OCP\Util::addStyle('contacts', 'font-awesome');
\OCP\Util::addStyle('', 'multiselect');
\OCP\Util::addStyle('', 'jquery.multiselect');
\OCP\Util::addStyle('contacts', 'jquery.combobox');
2013-06-03 15:44:01 +02:00
\OCP\Util::addStyle('core', 'jquery.ocdialog');
\OCP\Util::addStyle('contacts', 'jquery.ocaddnew');
\OCP\Util::addStyle('contacts', 'jquery.Jcrop');
\OCP\Util::addStyle('contacts', 'contacts');
2012-02-14 01:47:18 +01:00
$tmpl = new \OCP\Template( "contacts", "contacts", "user" );
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
2012-08-21 06:22:33 +02:00
$tmpl->assign('uploadMaxHumanFilesize',
\OCP\Util::humanFileSize($maxUploadFilesize), false);
$tmpl->assign('phone_types', $phone_types);
$tmpl->assign('email_types', $email_types);
$tmpl->assign('adr_types', $adr_types);
$tmpl->assign('impp_types', $impp_types);
$tmpl->assign('im_protocols', $im_protocols);
2012-10-10 13:18:05 +02:00
$tmpl->printPage();