Skip to content

Commit f353904

Browse files
author
Christian Putzke
committed
- Added larry skin support
- Added list of CardDAV server URLs
1 parent 8d12f7e commit f353904

File tree

8 files changed

+109
-5
lines changed

8 files changed

+109
-5
lines changed

carddav.php

+43-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ public function init()
118118
/**
119119
* Extend the original local_skin_path method with the default skin path as fallback
120120
*
121-
* @return string $skin_path Roundcubes skin path
121+
* @param boolean $include_plugins_directory Include plugins directory
122+
* @return string $skin_path Roundcubes skin path
122123
*/
123124
public function local_skin_path($include_plugins_directory = false)
124125
{
@@ -466,13 +467,52 @@ public function carddav_server_form()
466467
$output = html::div(
467468
array('class' => 'box carddav'),
468469
html::div(array('class' => 'boxtitle'), $this->gettext('settings')).
469-
html::div(array('class' => 'boxcontent', 'id' => 'carddav_server_list'), $this->get_carddav_server_list()).
470-
html::div(array('class' => 'boxcontent'), $boxcontent)
470+
html::div(array('class' => 'boxcontent', 'id' => 'carddav_server_list'), $this->get_carddav_server_list()).
471+
html::div(array('class' => 'boxcontent'), $boxcontent).
472+
html::div(array('class' => 'boxcontent'), $this->get_carddav_url_list())
471473
);
472474

473475
return $output;
474476
}
475477

478+
/**
479+
* Render a CardDAV server example URL list
480+
*
481+
* @return string $content HTML CardDAV server example URL list
482+
*/
483+
public function get_carddav_url_list()
484+
{
485+
$content = null;
486+
487+
$table = new html_table(array(
488+
'cols' => 2,
489+
'class' => 'carddav_server_list'
490+
));
491+
492+
$table->add(array(), 'DAViCal');
493+
$table->add(array(), 'https://example.com/{resource|principal|username}/{collection}/');
494+
495+
$table->add(array(), 'Apple Addressbook Server');
496+
$table->add(array(), 'https://example.com/addressbooks/users/{resource|principal|username}/{collection}/');
497+
498+
$table->add(array(), 'memotoo');
499+
$table->add(array(), 'https://sync.memotoo.com/cardDAV/');
500+
501+
$table->add(array(), 'SabreDAV');
502+
$table->add(array(), 'https://example.com/addressbooks/{resource|principal|username}/{collection}/');
503+
504+
$table->add(array(), 'ownCloud');
505+
$table->add(array(), 'https://example.com/apps/contacts/carddav.php/addressbooks/{resource|principal|username}/{collection}/');
506+
507+
$table->add(array(), 'SOGo');
508+
$table->add(array(), 'https://example.com/SOGo/dav/{resource|principal|username}/Contacts/{collection}/');
509+
510+
$content .= html::div(array('class' => 'carddav_headline example_server_list'), $this->gettext('settings_example_server_list'));
511+
$content .= html::div(array('class' => 'carddav_container'), $table->show());
512+
513+
return $content;
514+
}
515+
476516
/**
477517
* Save CardDAV server and execute first CardDAV contact sync
478518
*

localization/de_DE.inc

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ $labels = array();
44
$labels['settings'] = 'CardDAV Einstellungen';
55
$labels['settings_server'] = 'CardDAV Server';
66
$labels['settings_server_form'] = 'Füge deinen CardDAV Server hinzu';
7+
$labels['settings_example_server_list'] = 'CardDAV Server Beispiel URLs';
78
$labels['settings_tab'] = 'CardDAV';
89
$labels['settings_label'] = 'Label';
910
$labels['settings_read_only'] = 'Nur Lesezugriff';

localization/en_US.inc

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ $labels = array();
44
$labels['settings'] = 'CardDAV settings';
55
$labels['settings_server'] = 'CardDAV server';
66
$labels['settings_server_form'] = 'Add your CardDAV server';
7+
$labels['settings_example_server_list'] = 'CardDAV server example URLs';
78
$labels['settings_tab'] = 'CardDAV';
89
$labels['settings_label'] = 'Label';
910
$labels['settings_read_only'] = 'Read only';

skins/default/carddav.css

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414

1515
.carddav .carddav_container {
16-
margin-left: 10px;
16+
margin: 0 10px;
1717
background: #eaeaea;
1818
border-radius: 5px;
1919
}
@@ -48,5 +48,10 @@
4848
}
4949

5050
.carddav_server_list tbody td {
51-
padding: 5px 20px;
51+
padding: 5px 15px;
52+
}
53+
54+
.carddav .carddav_headline.example_server_list {
55+
margin-top: 30px;
56+
font-size: 100%;
5257
}

skins/larry/carddav.css

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
.carddav .button {
2+
border-radius: 5px;
3+
border: 1px solid #aaa;
4+
text-shadow: 1px 1px 0px #fff;
5+
cursor: pointer;
6+
}
7+
8+
.carddav .carddav_headline {
9+
font-size: 120%;
10+
text-shadow: 1px 1px 0px #fff;
11+
font-weight: bold;
12+
margin-bottom: 10px;
13+
}
14+
15+
.carddav .carddav_container {
16+
margin: 0 10px;
17+
background: #eaeaea;
18+
border-radius: 5px;
19+
}
20+
21+
.carddav .carddav_server_list {
22+
width: 100%;
23+
border-collapse: collapse;
24+
text-shadow: 1px 1px 0px #fff;
25+
}
26+
27+
.carddav_server_list thead td {
28+
font-weight: bold;
29+
padding: 10px;
30+
background-color: #e5e5e5;
31+
border-bottom: 1px solid #eee;
32+
}
33+
34+
.carddav_server_list thead td:first-child {
35+
border-top-left-radius: 5px;
36+
}
37+
38+
.carddav_server_list thead td:last-child {
39+
border-top-right-radius: 5px;
40+
}
41+
42+
.carddav_server_list tbody tr:hover {
43+
background-color: #def;
44+
}
45+
46+
.carddav_server_list tbody tr:hover td {
47+
border-radius: 5px;
48+
}
49+
50+
.carddav_server_list tbody td {
51+
padding: 5px 15px;
52+
}
53+
54+
.carddav .carddav_headline.example_server_list {
55+
margin-top: 30px;
56+
font-size: 100%;
57+
}

skins/larry/checked.png

298 Bytes
Loading

skins/larry/sync_act.png

1.68 KB
Loading

skins/larry/sync_pas.png

1.65 KB
Loading

0 commit comments

Comments
 (0)