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

395 lines
18 KiB
PHP
Raw Normal View History

<div id='notification'></div>
<div id="appsettings" class="popup topright hidden"></div>
<script type='text/javascript'>
2012-11-15 06:07:44 +01:00
var is_indexed = <?php echo $_['is_indexed'] == 'yes' ? 'true' : 'false'; ?>;
var totalurl = '<?php echo OCP\Util::linkToRemote('carddav'); ?>addressbooks';
var categories = <?php echo json_encode($_['categories']); ?>;
var id = '<?php echo $_['id']; ?>';
var lang = '<?php echo OCP\Config::getUserValue(OCP\USER::getUser(), 'core', 'lang', 'en'); ?>';
</script>
<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">
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>">
<input type="hidden" name="id" value="<?php echo $_['id'] ?>">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
<input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
<input id="contactphoto_fileupload" type="file" accept="image/*" name="imagefile" />
</form>
2012-11-05 12:37:05 +01:00
<iframe name="file_upload_target" id='file_upload_target' src=""></iframe>
2012-10-05 05:05:49 +02:00
<div id="leftcontent" class="loading">
<div class="hidden" id="statusbar"></div>
<div id="groupactions">
<button class="addgroup"><?php echo $l->t('New Group'); ?></button>
</div>
<nav id="grouplist">
</nav>
<div id="contacts-settings">
<ul>
<li><button class="settings" title="<?php echo $l->t('Settings'); ?>"></button></li>
<li><h3 class="share"><?php echo $l->t('Share'); ?></h3>
<ul class="hidden">
<?php foreach($_['addressbooks'] as $addressbook) {
if($addressbook['permissions'] & OCP\PERMISSION_SHARE) {
?>
<li value="<?php echo $addressbook['id'] ?>">
<span class="float"><?php echo $addressbook['displayname'] ?></span>
<span><a class="share action" data-item-type="addressbook"
data-item="<?php echo $addressbook['id'] ?>"
data-possible-permissions="<?php echo $addressbook['permissions'] ?>">
</a></span> <!-- To place the share dropdown correctly -->
</li>
<?php }} ?>
</ul>
</li>
<li><h3 class="import" role="button"><?php echo $l->t('Import'); ?></h3>
<ul class="hidden">
2012-12-05 00:59:04 +01:00
<li class="import-upload">
<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">
2012-12-05 00:59:04 +01:00
<input id="import_fileupload" type="file" accept="text/vcard,text/x-vcard,text/directory" multiple="multiple" name="importfile" />
<label><?php echo $l->t('Select files to import'); ?></label>
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
2012-12-05 00:59:04 +01:00
<button class="import-upload-button" title="<?php echo $l->t('Select files'); ?>"></button>
</form>
<iframe name="import_upload_target" id='import_upload_target' src=""></iframe>
</li>
2012-12-05 00:59:04 +01:00
<li class="import-select hidden"><label><?php echo $l->t('Import into:'); ?></label></li>
<li class="import-select hidden"><select id="import_into" title="<?php echo $l->t('Import into:'); ?>">
<?php foreach($_['addressbooks'] as $addressbook) {
if($addressbook['permissions'] & OCP\PERMISSION_CREATE) {
?>
<option value="<?php echo $addressbook['id'] ?>"><?php echo $addressbook['displayname'] ?></option>
<?php }} ?>
</select>
2012-12-05 00:59:04 +01:00
<button class="doImport"><?php echo $l->t('OK'); ?></button>
</li>
<li>
<div id="import-progress"></div>
</li>
</ul>
</li>
2012-11-15 03:51:46 +01:00
<li><h3 class="export"><?php echo $l->t('Export'); ?></h3>
<ul class="hidden">
<?php foreach($_['addressbooks'] as $addressbook): ?>
<li>
<a role="button" href="<?php echo OCP\Util::linkToAbsolute('contacts', 'export.php'); ?>?bookid=<?php echo $addressbook['id'] ?>">
<?php echo $addressbook['displayname'] ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</li>
</ul>
</div>
</div>
<div id="contactsheader">
2012-10-05 05:05:49 +02:00
<input type="checkbox" id="toggle_all" title="<?php echo $l->t('(De-)select all'); ?>" />
<div class="actions">
<button class="addcontact"><?php echo $l->t('New Contact'); ?></button>
2012-10-05 05:05:49 +02:00
<button class="back control" title="<?php echo $l->t('Back'); ?>"><?php echo $l->t('Back'); ?></button>
<button class="download control" title="<?php echo $l->t('Download Contact'); ?>"></button>
<button class="delete control" title="<?php echo $l->t('Delete Contact'); ?>"></button>
<select class="groups control" name="groups">
<option value="-1" disabled="disabled" selected="selected"><?php echo $l->t('Groups'); ?></option>
</select>
<button class="favorite inactive control" title="<?php echo $l->t('Favorite'); ?>"></button>
</div>
</div>
<div id="rightcontent" class="loading">
2012-10-05 05:05:49 +02:00
<table id="contactlist">
</table>
2012-11-15 02:40:47 +01:00
<div class="hidden popup" id="ninjahelp">
<a class="close" tabindex="0" role="button" title="<?php echo $l->t('Close'); ?>"></a>
<h2><?php echo $l->t('Keyboard shortcuts'); ?></h2>
<div class="help-section">
<h3><?php echo $l->t('Navigation'); ?></h3>
<dl>
<dt>j/Down</dt>
<dd><?php echo $l->t('Next contact in list'); ?></dd>
<dt>k/Up</dt>
<dd><?php echo $l->t('Previous contact in list'); ?></dd>
<dt>o</dt>
<dd><?php echo $l->t('Expand/collapse current addressbook'); ?></dd>
<dt>n/PageDown</dt>
<dd><?php echo $l->t('Next addressbook'); ?></dd>
<dt>p/PageUp</dt>
<dd><?php echo $l->t('Previous addressbook'); ?></dd>
</dl>
</div>
<div class="help-section">
<h3><?php echo $l->t('Actions'); ?></h3>
<dl>
<dt>r</dt>
<dd><?php echo $l->t('Refresh contacts list'); ?></dd>
<dt>a</dt>
<dd><?php echo $l->t('Add new contact'); ?></dd>
<!-- dt>Shift-a</dt>
<dd><?php echo $l->t('Add new addressbook'); ?></dd -->
<dt>Shift-Delete</dt>
<dd><?php echo $l->t('Delete current contact'); ?></dd>
</dl>
</div>
2012-10-05 05:05:49 +02:00
</div>
2012-11-15 02:40:47 +01:00
<div id="firstrun" class="hidden">
<?php echo $l->t('<h3>You have no contacts in your addressbook.</h3>'
. '<p>Add a new contact or import existing contacts from a VCF file.</p>') ?>
<div id="selections">
<button class="addcontact"><?php echo $l->t('Add contact') ?></button>
<button class="import"><?php echo $l->t('Import') ?></button>
</div>
2012-10-05 05:05:49 +02:00
</div>
</div>
<script id="cropBoxTemplate" type="text/template">
<form id="cropform"
class="coords"
method="post"
enctype="multipart/form-data"
target="crop_target"
action="<?php echo OCP\Util::linkToAbsolute('contacts', 'ajax/savecrop.php'); ?>">
<input type="hidden" id="id" name="id" value="{id}" />
<input type="hidden" id="tmpkey" name="tmpkey" value="{tmpkey}" />
<fieldset id="coords">
<input type="hidden" id="x1" name="x1" value="" />
<input type="hidden" id="y1" name="y1" value="" />
<input type="hidden" id="x2" name="x2" value="" />
<input type="hidden" id="y2" name="y2" value="" />
<input type="hidden" id="w" name="w" value="" />
<input type="hidden" id="h" name="h" value="" />
</fieldset>
</form>
</script>
2012-10-24 20:29:44 +02:00
<script id="addGroupTemplate" type="text/template">
<div id="dialog-form" title="<?php echo $l->t('Add group'); ?>">
<fieldset>
<input type="text" name="name" id="name" />
</fieldset>
</div>
</script>
<script id="contactListItemTemplate" type="text/template">
<tr class="contact" data-id="{id}">
2012-10-23 06:27:22 +02:00
<td class="name"
style="background: url('<?php echo OC_Helper::linkToRemoteBase('contactthumbnail'); ?>?id={id}')">
2012-11-13 22:42:55 +01:00
<input type="checkbox" name="id" value="{id}" /><span class="nametext">{name}</span>
</td>
<td class="email">
<a href="mailto:{email}">{email}</a>
<a class="mailto hidden" title="<?php echo $l->t('Compose mail'); ?>"></a>
</td>
<td class="tel">{tel}</td>
<td class="adr">{adr}</td>
<td class="categories">{categories}</td>
</tr>
</script>
<script id="groupListItemTemplate" type="text/template">
2012-11-22 19:32:47 +01:00
<h3 class="group" data-type="{type}" data-id="{id}">
{name}
<a class="action delete" title="<?php echo $l->t('Delete group'); ?>"></a>
<span class="action numcontacts">{num}</span>
</h3>
</script>
<script id="contactFullTemplate" type="text/template">
2012-10-05 05:05:49 +02:00
<form action="<?php echo OCP\Util::linkTo('contacts', 'index.php'); ?>" method="post" enctype="multipart/form-data">
<section id="contact" data-id="{id}">
2012-10-05 05:05:49 +02:00
<ul>
<li>
<div id="photowrapper" class="propertycontainer" data-element="photo">
<ul id="phototools" class="transparent hidden">
<li><a class="svg delete" title="<?php echo $l->t('Delete current photo'); ?>"></a></li>
<li><a class="svg edit" title="<?php echo $l->t('Edit current 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>
</ul>
</div>
<div class="singleproperties">
2012-11-13 22:42:55 +01:00
<input data-element="fn" class="fullname value propertycontainer" type="text" name="value" value="{name}" required />
2012-10-24 20:29:44 +02:00
<a class="action edit"></a>
2012-11-22 04:09:52 +01:00
<fieldset class="n hidden edit ui-widget-content propertycontainer" data-element="n">
<ul>
<li>
<input class="value" type="text" id="n_1" name="value[1]" value="{n1}" placeholder="<?php echo $l->t('First name'); ?>" title="<?php echo $l->t('First name'); ?>" />
</li>
<li>
<input class="value" type="text" id="n_2" name="value[2]" value="{n2}" placeholder="<?php echo $l->t('Additional names'); ?>" title="<?php echo $l->t('Additional names'); ?>" />
</li>
<li>
<input class="value" type="text" id="n_0" name="value[0]" value="{n0}" placeholder="<?php echo $l->t('Last name'); ?>" title="<?php echo $l->t('Last name'); ?>" />
</li>
</ul>
<input class="value" type="hidden" id="n_3" name="value[3]" value="{n3}" />
<input class="value" type="hidden" id="n_4" name="value[4]" value="{n4}" />
</fieldset>
<dl class="form">
2012-10-05 05:05:49 +02:00
<dt data-element="nickname">
<?php echo $l->t('Nickname'); ?>
</dt>
2012-10-05 05:05:49 +02:00
<dd data-element="nickname" class="propertycontainer">
<input class="value" type="text" name="value" value="{nickname}" required />
2012-10-23 06:27:22 +02:00
<a role="button" class="action delete" title="<?php echo $l->t('Delete'); ?>"></a>
</dd>
2012-10-05 05:05:49 +02:00
<dt data-element="title">
<?php echo $l->t('Title'); ?>
</dt>
2012-10-05 05:05:49 +02:00
<dd data-element="title" class="propertycontainer">
<input class="value" type="text" name="value" value="{title}" required />
2012-10-23 06:27:22 +02:00
<a role="button" class="action delete" title="<?php echo $l->t('Delete'); ?>"></a>
</dd>
2012-10-05 05:05:49 +02:00
<dt data-element="org">
<?php echo $l->t('Organization'); ?>
</dt>
2012-10-05 05:05:49 +02:00
<dd data-element="org" class="propertycontainer">
<input class="value" type="text" name="value" value="{org}" required />
2012-10-23 06:27:22 +02:00
<a role="button" class="action delete" title="<?php echo $l->t('Delete'); ?>"></a>
</dd>
2012-10-05 05:05:49 +02:00
<dt data-element="bday">
<?php echo $l->t('Birthday'); ?>
</dt>
2012-10-05 05:05:49 +02:00
<dd data-element="bday" class="propertycontainer">
<input class="value" type="text" name="value" value="{bday}" required />
2012-10-23 06:27:22 +02:00
<a role="button" class="action delete" title="<?php echo $l->t('Delete'); ?>"></a>
</dd>
</dl>
</div>
2012-10-05 05:05:49 +02:00
</li>
<li>
<ul class="email propertylist hidden">
</ul>
2012-10-05 05:05:49 +02:00
</li>
<li>
<ul class="tel propertylist hidden">
</ul>
2012-10-05 05:05:49 +02:00
</li>
<li>
<ul class="adr propertylist hidden">
</ul>
2012-10-05 05:05:49 +02:00
</li>
<li>
<ul class="url propertylist hidden">
</ul>
2012-10-05 05:05:49 +02:00
</li>
<li>
<ul class="impp propertylist hidden">
</ul>
2012-10-05 05:05:49 +02:00
</li>
<li>
<section class="note" data-element="note">
<textarea class="value" placeholder="<?php echo $l->t('Notes go here...'); ?>"></textarea>
</section>
</li>
</ul>
</section>
<footer>
<select id="addproperty">
<option value=""><?php echo $l->t('Add'); ?></option>
<option value="ORG"><?php echo $l->t('Organization'); ?></option>
<option value="NICKNAME"><?php echo $l->t('Nickname'); ?></option>
<option value="BDAY"><?php echo $l->t('Birthday'); ?></option>
<option value="TEL"><?php echo $l->t('Phone'); ?></option>
<option value="EMAIL"><?php echo $l->t('Email'); ?></option>
<option value="IMPP"><?php echo $l->t('Instant Messaging'); ?></option>
<option value="ADR"><?php echo $l->t('Address'); ?></option>
<option value="NOTE"><?php echo $l->t('Note'); ?></option>
<option value="URL"><?php echo $l->t('Web site'); ?></option>
<option value="CATEGORIES"><?php echo $l->t('Groups'); ?></option>
</select>
2012-10-05 05:05:49 +02:00
</footer>
</form>
</script>
<script id="contactDetailsTemplate" class="hidden" type="text/template">
<div class="email">
<li data-element="email" data-checksum="{checksum}" class="propertycontainer">
2012-10-24 20:29:44 +02:00
<select class="rtl type parameter" data-parameter="TYPE" name="parameters[TYPE][]">
<?php echo OCP\html_select_options($_['email_types'], array()) ?>
</select>
2012-10-24 20:29:44 +02:00
<input type="checkbox" class="parameter tip" data-parameter="TYPE" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
<input type="email" class="nonempty value" name="value" value="{value}" x-moz-errormessage="<?php echo $l->t('Please specify a valid email address.'); ?>" placeholder="<?php echo $l->t('someone@example.com'); ?>" required />
<span class="listactions">
<a class="action mail" title="<?php echo $l->t('Mail to address'); ?>"></a>
<a role="button" class="action delete" title="<?php echo $l->t('Delete email address'); ?>"></a>
</span>
</li>
</div>
<div class="tel">
<li data-element="tel" data-checksum="{checksum}" class="propertycontainer">
2012-10-24 20:29:44 +02:00
<select class="rtl type parameter" data-parameter="TYPE" name="parameters[TYPE][]">
<?php echo OCP\html_select_options($_['phone_types'], array()) ?>
</select>
2012-10-24 20:29:44 +02:00
<input type="checkbox" class="parameter tip" data-parameter="TYPE" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
<input type="tel" class="nonempty value" name="value" value="{value}" placeholder="<?php echo $l->t('Enter phone number'); ?>" required />
<span class="listactions">
<a role="button" class="action delete" title="<?php echo $l->t('Delete phone number'); ?>"></a>
</span>
</li>
</div>
<div class="url">
<li data-element="url" data-checksum="{checksum}" class="propertycontainer">
2012-10-24 20:29:44 +02:00
<select class="rtl type parameter" data-parameter="TYPE" name="parameters[TYPE][]">
<?php echo OCP\html_select_options($_['email_types'], array()) ?>
</select>
2012-10-24 20:29:44 +02:00
<input type="checkbox" class="parameter tip" data-parameter="TYPE" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
<input type="url" class="nonempty value" name="value" value="{value}" placeholder="http://www.example.com/" required />
<span class="listactions">
<a role="button" class="action globe" title="<?php echo $l->t('Go to web site'); ?>">
<a role="button" class="action delete" title="<?php echo $l->t('Delete URL'); ?>"></a>
</span>
</li>
</div>
<div class="adr">
<li data-element="adr" data-checksum="{checksum}" class="propertycontainer">
<span class="float display">
<label class="meta"></label>
<span class="adr">{value}</span>
</span>
<span class="listactions">
<a class="action globe" title="<?php echo $l->t('View on map'); ?>"></a>
<a class="action delete" title="<?php echo $l->t('Delete address'); ?>"></a>
</span>
2012-11-22 00:22:12 +01:00
<fieldset class="adr hidden edit ui-widget-content">
<ul>
<li>
<select class="rtl type parameter" data-parameter="TYPE" name="parameters[TYPE][]">
<?php echo OCP\html_select_options($_['adr_types'], array()) ?>
</select>
<input type="checkbox" id=="adr_pref_{idx}" class="parameter tip" data-parameter="TYPE" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" /><label for="adr_pref_{idx}"><?php echo $l->t('Preferred'); ?></label>
</li>
<li>
<input class="value stradr" type="text" id="adr_2" name="value[2]" value="{adr2}" placeholder="<?php echo $l->t('1 Main Street'); ?>" />
</li>
<li>
<input class="value zip" type="text" id="adr_5" name="value[5]" value="{adr5}" placeholder="<?php echo $l->t('12345'); ?>" />
<input class="value city" type="text" id="adr_3" name="value[3]" value="{adr3}" placeholder="<?php echo $l->t('Your city'); ?>" />
</li>
<li>
<input class="value region" type="text" id="adr_4" name="value[4]" value="{adr4}" placeholder="<?php echo $l->t('Some region'); ?>" />
</li>
<li>
<input class="value country" type="text" id="adr_6" name="value[6]" value="{adr6}" placeholder="<?php echo $l->t('Your country'); ?>" />
</li>
</ul>
<input class="value pobox" type="hidden" id="adr_0" name="value[0]" value="{adr0}" />
<input class="value extadr" type="hidden" id="adr_1" name="value[1]" value="{adr1}" />
</fieldset>
</li>
</div>
<div class="impp">
<li data-element="impp" data-checksum="{checksum}" class="propertycontainer">
2012-10-24 20:29:44 +02:00
<select class="type parameter" data-parameter="TYPE" name="parameters[TYPE][]">
<?php echo OCP\html_select_options($_['impp_types'], array()) ?>
</select>
2012-10-23 06:27:22 +02:00
<input type="checkbox" class="parameter impp tip" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
<div class="select_wrapper">
2012-10-24 20:29:44 +02:00
<select class="rtl parameter label impp" data-parameter="X-SERVICE-TYPE" name="parameters[X-SERVICE-TYPE]">
<?php echo OCP\html_select_options($_['im_protocols'], array()) ?>
</select>
</div>
<input type="text" class="nonempty value" name="value" value="{value}"
placeholder="<?php echo $l->t('Instant Messenger'); ?>" required />
<span class="listactions">
<a role="button" class="action delete" title="<?php echo $l->t('Delete IM'); ?>"></a>
</span>
</li>
</div>
</script>