mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-30 19:52:17 +01:00
port linkto and serverHost
This commit is contained in:
parent
9b66378e3e
commit
47b18a270e
@ -17,7 +17,7 @@ OC_App::register( array(
|
|||||||
OC_App::addNavigationEntry( array(
|
OC_App::addNavigationEntry( array(
|
||||||
'id' => 'contacts_index',
|
'id' => 'contacts_index',
|
||||||
'order' => 10,
|
'order' => 10,
|
||||||
'href' => OC_Helper::linkTo( 'contacts', 'index.php' ),
|
'href' => OCP\Util::linkTo( 'contacts', 'index.php' ),
|
||||||
'icon' => OC_Helper::imagePath( 'settings', 'users.svg' ),
|
'icon' => OC_Helper::imagePath( 'settings', 'users.svg' ),
|
||||||
'name' => OC_L10N::get('contact')->t('Contacts') ));
|
'name' => OC_L10N::get('contact')->t('Contacts') ));
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class OC_Contacts_Hooks{
|
|||||||
}
|
}
|
||||||
|
|
||||||
static public function getCalenderSources($parameters) {
|
static public function getCalenderSources($parameters) {
|
||||||
$base_url = OC_Helper::linkTo('calendar', 'ajax/events.php').'?calendar_id=';
|
$base_url = OCP\Util::linkTo('calendar', 'ajax/events.php').'?calendar_id=';
|
||||||
foreach(OC_Contacts_Addressbook::all(OCP\USER::getUser()) as $addressbook) {
|
foreach(OC_Contacts_Addressbook::all(OCP\USER::getUser()) as $addressbook) {
|
||||||
$parameters['sources'][] =
|
$parameters['sources'][] =
|
||||||
array(
|
array(
|
||||||
|
@ -18,7 +18,7 @@ class OC_Search_Provider_Contacts extends OC_Search_Provider{
|
|||||||
$vcards = OC_Contacts_VCard::all($addressbook['id']);
|
$vcards = OC_Contacts_VCard::all($addressbook['id']);
|
||||||
foreach($vcards as $vcard){
|
foreach($vcards as $vcard){
|
||||||
if(substr_count(strtolower($vcard['fullname']), strtolower($query)) > 0){
|
if(substr_count(strtolower($vcard['fullname']), strtolower($query)) > 0){
|
||||||
$link = OC_Helper::linkTo('contacts', 'index.php').'?id='.urlencode($vcard['id']);
|
$link = OCP\Util::linkTo('contacts', 'index.php').'?id='.urlencode($vcard['id']);
|
||||||
$results[]=new OC_Search_Result($vcard['fullname'],'', $link,$l->t('Contact'));//$name,$text,$link,$type
|
$results[]=new OC_Search_Result($vcard['fullname'],'', $link,$l->t('Contact'));//$name,$text,$link,$type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
var totalurl = '<?php echo OC_Helper::linkToAbsolute('contacts', 'carddav.php'); ?>/addressbooks';
|
var totalurl = '<?php echo OCP\Util::linkToAbsolute('contacts', 'carddav.php'); ?>/addressbooks';
|
||||||
var categories = <?php echo json_encode($_['categories']); ?>;
|
var categories = <?php echo json_encode($_['categories']); ?>;
|
||||||
var lang = '<?php echo OC_Preferences::getValue(OCP\USER::getUser(), 'core', 'lang', 'en'); ?>';
|
var lang = '<?php echo OC_Preferences::getValue(OCP\USER::getUser(), 'core', 'lang', 'en'); ?>';
|
||||||
</script>
|
</script>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="bottomcontrols">
|
<div id="bottomcontrols">
|
||||||
<form>
|
<form>
|
||||||
<img class="svg" id="contacts_newcontact" src="<?php echo OC_Helper::linkTo('contacts', 'img/contact-new.svg'); ?>" alt="<?php echo $l->t('Add Contact'); ?>" title="<?php echo $l->t('Add Contact'); ?>" />
|
<img class="svg" id="contacts_newcontact" src="<?php echo OCP\Util::linkTo('contacts', 'img/contact-new.svg'); ?>" alt="<?php echo $l->t('Add Contact'); ?>" title="<?php echo $l->t('Add Contact'); ?>" />
|
||||||
<img class="svg" id="chooseaddressbook" src="core/img/actions/settings.svg" alt="<?php echo $l->t('Addressbooks'); ?>" title="<?php echo $l->t('Addressbooks'); ?>" />
|
<img class="svg" id="chooseaddressbook" src="core/img/actions/settings.svg" alt="<?php echo $l->t('Addressbooks'); ?>" title="<?php echo $l->t('Addressbooks'); ?>" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
2
templates/part.contact.php
Normal file → Executable file
2
templates/part.contact.php
Normal file → Executable file
@ -23,7 +23,7 @@ $id = isset($_['id']) ? $_['id'] : '';
|
|||||||
|
|
||||||
<div id="contact_photo" class="contactsection">
|
<div id="contact_photo" class="contactsection">
|
||||||
|
|
||||||
<form class="float" id="file_upload_form" action="<?php echo OC_Helper::linkTo('contacts', 'ajax/uploadphoto.php'); ?>" method="post" enctype="multipart/form-data" target="file_upload_target">
|
<form class="float" id="file_upload_form" action="<?php echo OCP\Util::linkTo('contacts', 'ajax/uploadphoto.php'); ?>" method="post" enctype="multipart/form-data" target="file_upload_target">
|
||||||
<div class="tip propertycontainer" id="contacts_details_photo_wrapper" title="<?php echo $l->t('Click or drop to upload picture'); ?> (max <?php echo $_['uploadMaxHumanFilesize']; ?>)" data-element="PHOTO">
|
<div class="tip propertycontainer" id="contacts_details_photo_wrapper" title="<?php echo $l->t('Click or drop to upload picture'); ?> (max <?php echo $_['uploadMaxHumanFilesize']; ?>)" data-element="PHOTO">
|
||||||
<!-- img style="padding: 1em;" id="contacts_details_photo" alt="Profile picture" src="photo.php?id=<?php echo $_['id']; ?>" / -->
|
<!-- img style="padding: 1em;" id="contacts_details_photo" alt="Profile picture" src="photo.php?id=<?php echo $_['id']; ?>" / -->
|
||||||
<progress id="contacts_details_photo_progress" style="display:none;" value="0" max="100">0 %</progress>
|
<progress id="contacts_details_photo_progress" style="display:none;" value="0" max="100">0 %</progress>
|
||||||
|
2
templates/part.contactphoto.php
Normal file → Executable file
2
templates/part.contactphoto.php
Normal file → Executable file
@ -10,7 +10,7 @@ $rand = isset($_['refresh'])?'&refresh='.rand():'';
|
|||||||
<li><a class="svg upload" title="<?php echo $l->t('Upload new photo'); ?>"></a></li>
|
<li><a class="svg upload" title="<?php echo $l->t('Upload new photo'); ?>"></a></li>
|
||||||
<li><a class="svg cloud" title="<?php echo $l->t('Select photo from ownCloud'); ?>"></a></li>
|
<li><a class="svg cloud" title="<?php echo $l->t('Select photo from ownCloud'); ?>"></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<img class="loading" id="contacts_details_photo" <?php echo $wattr; ?> <?php echo $hattr; ?> src="<?php echo OC_Helper::linkToAbsolute('contacts', 'photo.php'); ?>?id=<?php echo $id.$rand; ?>" />
|
<img class="loading" id="contacts_details_photo" <?php echo $wattr; ?> <?php echo $hattr; ?> src="<?php echo OCP\Util::linkToAbsolute('contacts', 'photo.php'); ?>?id=<?php echo $id.$rand; ?>" />
|
||||||
<progress id="contacts_details_photo_progress" style="display:none;" value="0" max="100">0 %</progress>
|
<progress id="contacts_details_photo_progress" style="display:none;" value="0" max="100">0 %</progress>
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,13 +38,13 @@ OCP\Util::writeLog('contacts','templates/part.cropphoto.php: tmp_path: '.$tmp_pa
|
|||||||
return true;
|
return true;
|
||||||
});*/
|
});*/
|
||||||
</script>
|
</script>
|
||||||
<img id="cropbox" src="<?php echo OC_Helper::linkToAbsolute('contacts', 'dynphoto.php'); ?>?tmp_path=<?php echo urlencode($tmp_path); ?>" />
|
<img id="cropbox" src="<?php echo OCP\Util::linkToAbsolute('contacts', 'dynphoto.php'); ?>?tmp_path=<?php echo urlencode($tmp_path); ?>" />
|
||||||
<form id="cropform"
|
<form id="cropform"
|
||||||
class="coords"
|
class="coords"
|
||||||
method="post"
|
method="post"
|
||||||
enctype="multipart/form-data"
|
enctype="multipart/form-data"
|
||||||
target="crop_target"
|
target="crop_target"
|
||||||
action="<?php echo OC_Helper::linkToAbsolute('contacts', 'ajax/savecrop.php'); ?>">
|
action="<?php echo OCP\Util::linkToAbsolute('contacts', 'ajax/savecrop.php'); ?>">
|
||||||
|
|
||||||
<input type="hidden" id="id" name="id" value="<?php echo $id; ?>" />
|
<input type="hidden" id="id" name="id" value="<?php echo $id; ?>" />
|
||||||
<input type="hidden" id="tmp_path" name="tmp_path" value="<?php echo $tmp_path; ?>" />
|
<input type="hidden" id="tmp_path" name="tmp_path" value="<?php echo $tmp_path; ?>" />
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<form id="import_upload_form" action="<?php echo OC_Helper::linkTo('contacts', 'ajax/uploadimport.php'); ?>" method="post" enctype="multipart/form-data" target="import_upload_target">
|
<form id="import_upload_form" action="<?php echo OCP\Util::linkTo('contacts', 'ajax/uploadimport.php'); ?>" method="post" enctype="multipart/form-data" target="import_upload_target">
|
||||||
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
|
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
|
||||||
<input id="import_upload_start" type="file" accept="text/*" name="importfile" />
|
<input id="import_upload_start" type="file" accept="text/*" name="importfile" />
|
||||||
<input id="close_button" style="float: left;" type="button" onclick="Contacts.UI.Addressbooks.cancel(this);" value="<?php echo $l->t("Cancel"); ?>">
|
<input id="close_button" style="float: left;" type="button" onclick="Contacts.UI.Addressbooks.cancel(this);" value="<?php echo $l->t("Cancel"); ?>">
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
<?php echo $l->t('CardDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>)
|
<?php echo $l->t('CardDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>)
|
||||||
<dl>
|
<dl>
|
||||||
<dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt>
|
<dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt>
|
||||||
<dd><code><?php echo OC_Helper::linkToAbsolute('contacts', 'carddav.php'); ?>/</code></dd>
|
<dd><code><?php echo OCP\Util::linkToAbsolute('contacts', 'carddav.php'); ?>/</code></dd>
|
||||||
<dt><?php echo $l->t('iOS/OS X'); ?></dt>
|
<dt><?php echo $l->t('iOS/OS X'); ?></dt>
|
||||||
<dd><code><?php echo OC_Helper::linkToAbsolute('contacts', 'carddav.php'); ?>/principals/<?php echo OCP\USER::getUser(); ?></code>/</dd>
|
<dd><code><?php echo OCP\Util::linkToAbsolute('contacts', 'carddav.php'); ?>/principals/<?php echo OCP\USER::getUser(); ?></code>/</dd>
|
||||||
</dl>
|
</dl>
|
||||||
Powered by <a href="http://geonames.org/" target="_blank">geonames.org webservice</a>
|
Powered by <a href="http://geonames.org/" target="_blank">geonames.org webservice</a>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user