Permalink
Browse files

- Added larry skin support

- Added list of CardDAV server URLs
  • Loading branch information...
1 parent 8d12f7e commit f353904de18d83d1000e3e2394e32013b87c488a Christian Putzke committed Apr 1, 2012
View
@@ -118,7 +118,8 @@ public function init()
/**
* Extend the original local_skin_path method with the default skin path as fallback
*
- * @return string $skin_path Roundcubes skin path
+ * @param boolean $include_plugins_directory Include plugins directory
+ * @return string $skin_path Roundcubes skin path
*/
public function local_skin_path($include_plugins_directory = false)
{
@@ -466,14 +467,53 @@ public function carddav_server_form()
$output = html::div(
array('class' => 'box carddav'),
html::div(array('class' => 'boxtitle'), $this->gettext('settings')).
- html::div(array('class' => 'boxcontent', 'id' => 'carddav_server_list'), $this->get_carddav_server_list()).
- html::div(array('class' => 'boxcontent'), $boxcontent)
+ html::div(array('class' => 'boxcontent', 'id' => 'carddav_server_list'), $this->get_carddav_server_list()).
+ html::div(array('class' => 'boxcontent'), $boxcontent).
+ html::div(array('class' => 'boxcontent'), $this->get_carddav_url_list())
);
return $output;
}
/**
+ * Render a CardDAV server example URL list
+ *
+ * @return string $content HTML CardDAV server example URL list
+ */
+ public function get_carddav_url_list()
+ {
+ $content = null;
+
+ $table = new html_table(array(
+ 'cols' => 2,
+ 'class' => 'carddav_server_list'
+ ));
+
+ $table->add(array(), 'DAViCal');
+ $table->add(array(), 'https://example.com/{resource|principal|username}/{collection}/');
+
+ $table->add(array(), 'Apple Addressbook Server');
+ $table->add(array(), 'https://example.com/addressbooks/users/{resource|principal|username}/{collection}/');
+
+ $table->add(array(), 'memotoo');
+ $table->add(array(), 'https://sync.memotoo.com/cardDAV/');
+
+ $table->add(array(), 'SabreDAV');
+ $table->add(array(), 'https://example.com/addressbooks/{resource|principal|username}/{collection}/');
+
+ $table->add(array(), 'ownCloud');
+ $table->add(array(), 'https://example.com/apps/contacts/carddav.php/addressbooks/{resource|principal|username}/{collection}/');
+
+ $table->add(array(), 'SOGo');
+ $table->add(array(), 'https://example.com/SOGo/dav/{resource|principal|username}/Contacts/{collection}/');
+
+ $content .= html::div(array('class' => 'carddav_headline example_server_list'), $this->gettext('settings_example_server_list'));
+ $content .= html::div(array('class' => 'carddav_container'), $table->show());
+
+ return $content;
+ }
+
+ /**
* Save CardDAV server and execute first CardDAV contact sync
*
* @return void
View
@@ -4,6 +4,7 @@ $labels = array();
$labels['settings'] = 'CardDAV Einstellungen';
$labels['settings_server'] = 'CardDAV Server';
$labels['settings_server_form'] = 'Füge deinen CardDAV Server hinzu';
+$labels['settings_example_server_list'] = 'CardDAV Server Beispiel URLs';
$labels['settings_tab'] = 'CardDAV';
$labels['settings_label'] = 'Label';
$labels['settings_read_only'] = 'Nur Lesezugriff';
View
@@ -4,6 +4,7 @@ $labels = array();
$labels['settings'] = 'CardDAV settings';
$labels['settings_server'] = 'CardDAV server';
$labels['settings_server_form'] = 'Add your CardDAV server';
+$labels['settings_example_server_list'] = 'CardDAV server example URLs';
$labels['settings_tab'] = 'CardDAV';
$labels['settings_label'] = 'Label';
$labels['settings_read_only'] = 'Read only';
@@ -13,7 +13,7 @@
}
.carddav .carddav_container {
- margin-left: 10px;
+ margin: 0 10px;
background: #eaeaea;
border-radius: 5px;
}
@@ -48,5 +48,10 @@
}
.carddav_server_list tbody td {
- padding: 5px 20px;
+ padding: 5px 15px;
+}
+
+.carddav .carddav_headline.example_server_list {
+ margin-top: 30px;
+ font-size: 100%;
}
View
@@ -0,0 +1,57 @@
+.carddav .button {
+ border-radius: 5px;
+ border: 1px solid #aaa;
+ text-shadow: 1px 1px 0px #fff;
+ cursor: pointer;
+}
+
+.carddav .carddav_headline {
+ font-size: 120%;
+ text-shadow: 1px 1px 0px #fff;
+ font-weight: bold;
+ margin-bottom: 10px;
+}
+
+.carddav .carddav_container {
+ margin: 0 10px;
+ background: #eaeaea;
+ border-radius: 5px;
+}
+
+.carddav .carddav_server_list {
+ width: 100%;
+ border-collapse: collapse;
+ text-shadow: 1px 1px 0px #fff;
+}
+
+.carddav_server_list thead td {
+ font-weight: bold;
+ padding: 10px;
+ background-color: #e5e5e5;
+ border-bottom: 1px solid #eee;
+}
+
+.carddav_server_list thead td:first-child {
+ border-top-left-radius: 5px;
+}
+
+.carddav_server_list thead td:last-child {
+ border-top-right-radius: 5px;
+}
+
+.carddav_server_list tbody tr:hover {
+ background-color: #def;
+}
+
+.carddav_server_list tbody tr:hover td {
+ border-radius: 5px;
+}
+
+.carddav_server_list tbody td {
+ padding: 5px 15px;
+}
+
+.carddav .carddav_headline.example_server_list {
+ margin-top: 30px;
+ font-size: 100%;
+}
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f353904

Please sign in to comment.