summaryrefslogtreecommitdiffstats
path: root/apps/contacts/templates
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-06 13:49:54 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-06 13:49:54 -0400
commitea2385432817dcf5ad47396d83932f564aa76e4b (patch)
treeeffc5c5489cf385ee79c73a4bea59605f53240f9 /apps/contacts/templates
parentba0cf9817526e1206a25a5fe6d70255ab3c9e3bc (diff)
parentfe6450002d6059260c743f48b6f40378454fa1dc (diff)
downloadnextcloud-server-ea2385432817dcf5ad47396d83932f564aa76e4b.tar.gz
nextcloud-server-ea2385432817dcf5ad47396d83932f564aa76e4b.zip
Merge branch 'master' into share_api
Conflicts: apps/contacts/lib/app.php apps/contacts/templates/part.chooseaddressbook.rowfields.php
Diffstat (limited to 'apps/contacts/templates')
-rw-r--r--apps/contacts/templates/index.php32
-rw-r--r--apps/contacts/templates/part.chooseaddressbook.php24
-rw-r--r--apps/contacts/templates/part.chooseaddressbook.rowfields.php21
-rw-r--r--apps/contacts/templates/part.contact.php3
-rw-r--r--apps/contacts/templates/part.edit_address_dialog.php1
-rw-r--r--apps/contacts/templates/part.editaddressbook.php31
-rw-r--r--apps/contacts/templates/part.no_contacts.php1
-rw-r--r--apps/contacts/templates/settings.php47
8 files changed, 61 insertions, 99 deletions
diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php
index b2dde12684c..024b1d150f8 100644
--- a/apps/contacts/templates/index.php
+++ b/apps/contacts/templates/index.php
@@ -11,13 +11,13 @@
</div>
<div id="uploadprogressbar"></div>
<div id="bottomcontrols">
- <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">
<button class="svg" id="contacts_newcontact" title="<?php echo $l->t('Add Contact'); ?>"><img class="svg" src="<?php echo OCP\Util::imagePath('contacts', 'contact-new.svg'); ?>" alt="<?php echo $l->t('Add Contact'); ?>" /></button>
- <span class="svg" id="contacts_import" title="<?php echo $l->t('Import'); ?>">
- <input class="float" id="import_upload_start" type="file" accept="text/directory,text/vcard,text/x-vcard" name="importfile" />
+ <button class="svg import tip" title="<?php echo $l->t('Import'); ?>">
<img class="svg" src="core/img/actions/upload.svg" alt="<?php echo $l->t('Import'); ?>" />
- </span>
- <button class="svg" id="chooseaddressbook" title="<?php echo $l->t('Addressbooks'); ?>"><img class="svg" src="core/img/actions/settings.svg" alt="<?php echo $l->t('Addressbooks'); ?>" /></button>
+ </button>
+ <button class="svg settings tip" title="<?php echo $l->t('Settings'); ?>"><img class="svg" src="core/img/actions/settings.svg" alt="<?php echo $l->t('Addressbooks'); ?>" /></button>
+ <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 class="float" id="import_upload_start" type="file" accept="text/directory,text/vcard,text/x-vcard" name="importfile" />
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
</form>
<iframe name="import_upload_target" id='import_upload_target' src=""></iframe>
@@ -32,22 +32,22 @@
echo $this->inc('part.no_contacts');
}
?>
- <div class="hidden" id="ninjahelp">
- <a class="close" tabindex="0" role="button">
- <img class="svg" src="core/img/actions/delete.svg" alt="<?php echo $l->t('Close'); ?>" />
- </a>
+ <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/Space</dt>
+ <dt>j/Down</dt>
<dd><?php echo $l->t('Next contact in list'); ?></dd>
- <dt>k/Up/Shift-Space</dt>
+ <dt>k/Up</dt>
<dd><?php echo $l->t('Previous contact in list'); ?></dd>
- <dt>o/Enter</dt>
+ <dt>o</dt>
<dd><?php echo $l->t('Expand/collapse current addressbook'); ?></dd>
- <dt>n/p</dt>
- <dd><?php echo $l->t('Next/previous 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">
@@ -57,8 +57,8 @@
<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-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>
diff --git a/apps/contacts/templates/part.chooseaddressbook.php b/apps/contacts/templates/part.chooseaddressbook.php
deleted file mode 100644
index caed67736c5..00000000000
--- a/apps/contacts/templates/part.chooseaddressbook.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<div id="chooseaddressbook_dialog" title="<?php echo $l->t("Configure Address Books"); ?>">
-<table width="100%" style="border: 0;">
-<?php
-$option_addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser());
-for($i = 0; $i < count($option_addressbooks); $i++){
- echo "<tr>";
- $tmpl = new OCP\Template('contacts', 'part.chooseaddressbook.rowfields');
- $tmpl->assign('addressbook', $option_addressbooks[$i]);
- $tmpl->assign('active', OC_Contacts_Addressbook::isActive($option_addressbooks[$i]['id']));
- $tmpl->printpage();
- echo "</tr>";
-}
-?>
-<tr>
- <td colspan="5" style="padding: 0.5em;">
- <a class="button" href="#" onclick="Contacts.UI.Addressbooks.newAddressbook(this);"><?php echo $l->t('New Address Book') ?></a>
- </td>
-</tr>
-<tr>
- <td colspan="5">
- <p style="margin: 0 auto;width: 90%;"><input style="display:none;width: 90%;float: left;" type="text" id="carddav_url" onmouseover="$('#carddav_url').select();" title="<?php echo $l->t("CardDav Link"); ?>"><a class="action delete" id="carddav_url_close" style="height: 20px;vertical-align: middle;display: none;" title="close" onclick="$('#carddav_url').hide();$('#carddav_url_close').hide();"/></a></p>
- </td>
-</tr>
-</table>
diff --git a/apps/contacts/templates/part.chooseaddressbook.rowfields.php b/apps/contacts/templates/part.chooseaddressbook.rowfields.php
deleted file mode 100644
index c0a3ba68cdf..00000000000
--- a/apps/contacts/templates/part.chooseaddressbook.rowfields.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<td width="20px">
- <input id="active_<?php echo $_['addressbook']["id"]; ?>" type="checkbox" onClick="Contacts.UI.Addressbooks.activation(this, <?php echo $_['addressbook']["id"]; ?>)" <?php echo (OC_Contacts_Addressbook::isActive($_['addressbook']["id"]) ? ' checked="checked"' : ''); ?>>
-</td>
-<td>
- <label for="active_<?php echo $_['addressbook']["id"]; ?>"><?php echo $_['addressbook']["displayname"]; ?></label>
-</td>
-<td width="20px">
- <a onclick="Contacts.UI.showCardDAVUrl('<?php echo OCP\USER::getUser(); ?>', '<?php echo rawurlencode(html_entity_decode($_['addressbook']['uri'], ENT_QUOTES, 'UTF-8')); ?>');" title="<?php echo $l->t("CardDav Link"); ?>" class="svg action globe"></a>
-</td>
-<td width="20px">
- <a href="<?php echo OCP\Util::linkTo('contacts', 'export.php'); ?>?bookid=<?php echo $_['addressbook']["id"]; ?>" title="<?php echo $l->t("Download"); ?>" class="svg action download"></a>
-</td>
-<td width="20px">
- <a title="<?php echo $l->t("Edit"); ?>" class="svg action edit" onclick="Contacts.UI.Addressbooks.editAddressbook(this, <?php echo $_['addressbook']["id"]; ?>);"></a>
-</td>
-<td width="20px">
- <a title="<?php echo $l->t("Share"); ?>" class="svg action share" data-item-type="addressbook" data-item="<?php echo $_['addressbook']['id']; ?>" />
-</td>
-<td width="20px">
- <a onclick="Contacts.UI.Addressbooks.deleteAddressbook(this, <?php echo $_['addressbook']["id"]; ?>);" title="<?php echo $l->t("Delete"); ?>" class="svg action delete"></a>
-</td>
diff --git a/apps/contacts/templates/part.contact.php b/apps/contacts/templates/part.contact.php
index 4233bffede3..3670ce0389b 100644
--- a/apps/contacts/templates/part.contact.php
+++ b/apps/contacts/templates/part.contact.php
@@ -1,3 +1,4 @@
+<div id="appsettings" class="popup bottomleft hidden"></div>
<?php
$id = isset($_['id']) ? $_['id'] : '';
?>
@@ -73,7 +74,7 @@ $id = isset($_['id']) ? $_['id'] : '';
<div id="phones">
<ul id="phonelist" class="propertylist">
<li class="template hidden" data-element="TEL">
- <input type="checkbox" class="contacts_property tip" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
+ <input type="checkbox" class="contacts_property tip" name="parameters[TYPE][]" value="PREF" title="<?php echo $l->t('Preferred'); ?>" />
<input type="text" required="required" class="nonempty contacts_property" name="value" value="" placeholder="<?php echo $l->t('Enter phone number'); ?>" />
<select multiple="multiple" name="parameters[TYPE][]">
<?php echo OCP\html_select_options($_['phone_types'], array()) ?>
diff --git a/apps/contacts/templates/part.edit_address_dialog.php b/apps/contacts/templates/part.edit_address_dialog.php
index d5ea95ba465..81e24ba4d0e 100644
--- a/apps/contacts/templates/part.edit_address_dialog.php
+++ b/apps/contacts/templates/part.edit_address_dialog.php
@@ -57,6 +57,7 @@ $types = isset($_['types'])?$_['types']:array();
<input type="text" id="adr_country" name="value[ADR][6]" placeholder="<?php echo $l->t('Country'); ?>" value="<?php echo isset($adr[6])?$adr[6]:''; ?>">
</dd>
</dl>
+ <div style="width: 100%; text-align:center;">Powered by <a href="http://geonames.org/" target="_blank">geonames.org</a></div>
</fieldset>
</form>
</div>
diff --git a/apps/contacts/templates/part.editaddressbook.php b/apps/contacts/templates/part.editaddressbook.php
deleted file mode 100644
index c1c585687c4..00000000000
--- a/apps/contacts/templates/part.editaddressbook.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/**
- * Copyright (c) 2011 Bart Visscher <bartv@thisnet.nl>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-?>
-<td id="<?php echo $_['new'] ? 'new' : 'edit' ?>addressbook_dialog" title="<?php echo $_['new'] ? $l->t("New Addressbook") : $l->t("Edit Addressbook"); ?>" colspan="6">
-<table width="100%" style="border: 0;">
-<tr>
- <th><?php echo $l->t('Displayname') ?></th>
- <td>
- <input id="displayname_<?php echo $_['addressbook']['id'] ?>" type="text" value="<?php echo htmlspecialchars($_['addressbook']['displayname']) ?>">
- </td>
-</tr>
-<?php if (!$_['new']): ?>
-<tr>
- <td></td>
- <td>
- <input id="edit_active_<?php echo $_['addressbook']['id'] ?>" type="checkbox"<?php echo OC_Contacts_Addressbook::isActive($_['addressbook']['id']) ? ' checked="checked"' : '' ?>>
- <label for="edit_active_<?php echo $_['addressbook']['id'] ?>">
- <?php echo $l->t('Active') ?>
- </label>
- </td>
-</tr>
-<?php endif; ?>
-</table>
-<input style="float: left;" type="button" onclick="Contacts.UI.Addressbooks.submit(this, <?php echo $_['new'] ? "'new'" : $_['addressbook']['id'] ?>);" value="<?php echo $_['new'] ? $l->t("Save") : $l->t("Submit"); ?>">
-<input style="float: left;" type="button" onclick="Contacts.UI.Addressbooks.cancel(this, <?php echo $_['new'] ? "'new'" : $_['addressbook']['id'] ?>);" value="<?php echo $l->t("Cancel"); ?>">
-</td>
diff --git a/apps/contacts/templates/part.no_contacts.php b/apps/contacts/templates/part.no_contacts.php
index 5faa481bc3c..be12092d45d 100644
--- a/apps/contacts/templates/part.no_contacts.php
+++ b/apps/contacts/templates/part.no_contacts.php
@@ -1,3 +1,4 @@
+<div id="appsettings" class="popup bottomleft hidden"></div>
<div id="firstrun">
<?php echo $l->t('You have no contacts in your addressbook.') ?>
<div id="selections">
diff --git a/apps/contacts/templates/settings.php b/apps/contacts/templates/settings.php
index f520559d143..85dbca36fac 100644
--- a/apps/contacts/templates/settings.php
+++ b/apps/contacts/templates/settings.php
@@ -1,19 +1,54 @@
-<form id="contacts">
+<form id="contacts-settings">
<fieldset class="personalblock">
- <legend><?php echo $l->t('Contacts'); ?></legend>
<?php echo $l->t('CardDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>)
<dl>
<dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt>
<dd><code><?php echo OCP\Util::linkToRemote('carddav'); ?></code></dd>
<dt><?php echo $l->t('iOS/OS X'); ?></dt>
<dd><code><?php echo OCP\Util::linkToRemote('carddav'); ?>principals/<?php echo OCP\USER::getUser(); ?></code>/</dd>
- <dt><?php echo $l->t('Read only vCard directory link(s)'); ?></dt>
- <dd>
+ <dt class="hidden"><?php echo $l->t('Addressbooks'); ?></dt>
+ <dd class="addressbooks-settings hidden">
+ <table>
<?php foreach($_['addressbooks'] as $addressbook) { ?>
- <a href="<?php echo OCP\Util::linkToRemote('carddav').'addressbooks/'.OCP\USER::getUser().'/'.rawurlencode($addressbook['uri']) ?>?export"><?php echo $addressbook['displayname'] ?></a><br />
+ <tr class="addressbook" data-id="<?php echo $addressbook['id'] ?>" data-uri="<?php echo $addressbook['uri'] ?>">
+ <td class="active">
+ <input type="checkbox" <?php echo (($addressbook['active']) == '1' ? ' checked="checked"' : ''); ?> />
+ </td>
+ <td class="name"><?php echo $addressbook['displayname'] ?></td>
+ <td class="description"><?php echo $addressbook['description'] ?></td>
+ <td class="action">
+ <a class="svg action globe" title="<?php echo $l->t('Show CardDav link'); ?>"></a>
+ </td>
+ <td class="action">
+ <a class="svg action cloud" title="<?php echo $l->t('Show read-only VCF link'); ?>"></a>
+ </td>
+ <td class="action">
+ <a class="svg action download" title="<?php echo $l->t('Download'); ?>"
+ href="<?php echo OCP\Util::linkToRemote('carddav').'addressbooks/'.OCP\USER::getUser().'/'
+ .rawurlencode($addressbook['uri']) ?>?export"></a>
+ </td>
+ <td class="action">
+ <a class="svg action edit" title="<?php echo $l->t("Edit"); ?>"></a>
+ </td>
+ <td class="action">
+ <a class="svg action delete" title="<?php echo $l->t("Delete"); ?>"></a>
+ </td>
+ </tr>
<?php } ?>
+ </table>
+ <div class="actions" style="width: 100%;">
+ <input class="active hidden" type="checkbox" />
+ <button class="new"><?php echo $l->t('New Address Book') ?></button>
+ <input class="name hidden" type="text" autofocus="autofocus" placeholder="<?php echo $l->t('Name'); ?>" />
+ <input class="description hidden" type="text" placeholder="<?php echo $l->t('Description'); ?>" />
+ <input class="link hidden" style="width: 80%" type="text" autofocus="autofocus" />
+ <button class="save hidden"><?php echo $l->t('Save') ?></button>
+ <button class="cancel hidden"><?php echo $l->t('Cancel') ?></button>
+ </div>
</dd>
</dl>
- Powered by <a href="http://geonames.org/" target="_blank">geonames.org webservice</a>
+ <div style="width: 100%; clear: both;">
+ <button class="moreless"><?php echo $l->t('More...') ?></button>
+ </div>
</fieldset>
</form>