1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

Merge pull request #48 from jspricke/color

Add color support
This commit is contained in:
Guillaume Ayoub 2013-08-27 08:02:38 -07:00
commit 00b498677d
2 changed files with 12 additions and 0 deletions

View file

@ -437,6 +437,14 @@ class Collection(object):
with self.props as props:
return props.get("D:displayname", self.path.split(os.path.sep)[-1])
@property
def color(self):
"""Collection color."""
with self.props as props:
if "A:calendar-color" not in props:
props["A:calendar-color"] = "#5ba209"
return props["A:calendar-color"]
@property
def headers(self):
"""Find headers items in collection."""