mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
First try of implementing assignHTML
This commit is contained in:
parent
65c59b6c9d
commit
3bb0cbff47
@ -14,7 +14,7 @@ $book = array(
|
|||||||
'displayname' => '',
|
'displayname' => '',
|
||||||
);
|
);
|
||||||
$tmpl = new OCP\Template('contacts', 'part.editaddressbook');
|
$tmpl = new OCP\Template('contacts', 'part.editaddressbook');
|
||||||
$tmpl->assign('new', true);
|
$tmpl->assignHTML('new', true);
|
||||||
$tmpl->assign('addressbook', $book);
|
$tmpl->assignHTML('addressbook', $book);
|
||||||
$tmpl->printPage();
|
$tmpl->printPage();
|
||||||
?>
|
?>
|
||||||
|
@ -33,7 +33,7 @@ if(!OC_Contacts_Addressbook::setActive($bookid, 1)) {
|
|||||||
}
|
}
|
||||||
$addressbook = OC_Contacts_App::getAddressbook($bookid);
|
$addressbook = OC_Contacts_App::getAddressbook($bookid);
|
||||||
$tmpl = new OCP\Template('contacts', 'part.chooseaddressbook.rowfields');
|
$tmpl = new OCP\Template('contacts', 'part.chooseaddressbook.rowfields');
|
||||||
$tmpl->assign('addressbook', $addressbook);
|
$tmpl->assignHTML('addressbook', $addressbook);
|
||||||
OCP\JSON::success(array(
|
OCP\JSON::success(array(
|
||||||
'page' => $tmpl->fetchPage(),
|
'page' => $tmpl->fetchPage(),
|
||||||
'addressbook' => $addressbook,
|
'addressbook' => $addressbook,
|
||||||
|
@ -11,7 +11,7 @@ OCP\JSON::checkLoggedIn();
|
|||||||
OCP\JSON::checkAppEnabled('contacts');
|
OCP\JSON::checkAppEnabled('contacts');
|
||||||
$addressbook = OC_Contacts_App::getAddressbook($_GET['bookid']);
|
$addressbook = OC_Contacts_App::getAddressbook($_GET['bookid']);
|
||||||
$tmpl = new OCP\Template("contacts", "part.editaddressbook");
|
$tmpl = new OCP\Template("contacts", "part.editaddressbook");
|
||||||
$tmpl->assign('new', false);
|
$tmpl->assignHTML('new', false);
|
||||||
$tmpl->assign('addressbook', $addressbook);
|
$tmpl->assignHTML('addressbook', $addressbook);
|
||||||
$tmpl->printPage();
|
$tmpl->printPage();
|
||||||
?>
|
?>
|
||||||
|
@ -36,12 +36,12 @@ $phone_types = OC_Contacts_App::getTypesOfProperty('TEL');
|
|||||||
$email_types = OC_Contacts_App::getTypesOfProperty('EMAIL');
|
$email_types = OC_Contacts_App::getTypesOfProperty('EMAIL');
|
||||||
|
|
||||||
$tmpl = new OCP\Template('contacts','part.contact');
|
$tmpl = new OCP\Template('contacts','part.contact');
|
||||||
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
|
$tmpl->assignHTML('uploadMaxFilesize', $maxUploadFilesize);
|
||||||
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
|
$tmpl->assignHTML('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
|
||||||
$tmpl->assign('adr_types',$adr_types);
|
$tmpl->assignHTML('adr_types',$adr_types);
|
||||||
$tmpl->assign('phone_types',$phone_types);
|
$tmpl->assignHTML('phone_types',$phone_types);
|
||||||
$tmpl->assign('email_types',$email_types);
|
$tmpl->assignHTML('email_types',$email_types);
|
||||||
$tmpl->assign('id','');
|
$tmpl->assignHTML('id','');
|
||||||
$page = $tmpl->fetchPage();
|
$page = $tmpl->fetchPage();
|
||||||
|
|
||||||
OCP\JSON::success(array('data' => array( 'page' => $page )));
|
OCP\JSON::success(array('data' => array( 'page' => $page )));
|
||||||
|
20
index.php
20
index.php
@ -59,16 +59,16 @@ OCP\Util::addStyle('contacts','jquery.Jcrop');
|
|||||||
OCP\Util::addStyle('contacts','contacts');
|
OCP\Util::addStyle('contacts','contacts');
|
||||||
|
|
||||||
$tmpl = new OCP\Template( "contacts", "index", "user" );
|
$tmpl = new OCP\Template( "contacts", "index", "user" );
|
||||||
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
|
$tmpl->assignHTML('uploadMaxFilesize', $maxUploadFilesize);
|
||||||
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
|
$tmpl->assignHTML('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
|
||||||
$tmpl->assign('property_types', $property_types);
|
$tmpl->assignHTML('property_types', $property_types);
|
||||||
$tmpl->assign('phone_types', $phone_types);
|
$tmpl->assignHTML('phone_types', $phone_types);
|
||||||
$tmpl->assign('email_types', $email_types);
|
$tmpl->assignHTML('email_types', $email_types);
|
||||||
$tmpl->assign('categories', $categories);
|
$tmpl->assignHTML('categories', $categories);
|
||||||
$tmpl->assign('addressbooks', $addressbooks);
|
$tmpl->assignHTML('addressbooks', $addressbooks);
|
||||||
$tmpl->assign('contacts', $contacts);
|
$tmpl->assignHTML('contacts', $contacts);
|
||||||
$tmpl->assign('details', $details );
|
$tmpl->assignHTML('details', $details );
|
||||||
$tmpl->assign('id',$id);
|
$tmpl->assignHTML('id',$id);
|
||||||
$tmpl->printPage();
|
$tmpl->printPage();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -5,8 +5,8 @@ $option_addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser());
|
|||||||
for($i = 0; $i < count($option_addressbooks); $i++){
|
for($i = 0; $i < count($option_addressbooks); $i++){
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
$tmpl = new OCP\Template('contacts', 'part.chooseaddressbook.rowfields');
|
$tmpl = new OCP\Template('contacts', 'part.chooseaddressbook.rowfields');
|
||||||
$tmpl->assign('addressbook', $option_addressbooks[$i]);
|
$tmpl->assignHTML('addressbook', $option_addressbooks[$i]);
|
||||||
$tmpl->assign('active', OC_Contacts_Addressbook::isActive($option_addressbooks[$i]['id']));
|
$tmpl->assignHTML('active', OC_Contacts_Addressbook::isActive($option_addressbooks[$i]['id']));
|
||||||
$tmpl->printpage();
|
$tmpl->printpage();
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user