1 """ |
1 """the Bookmark entity type for internal links |
2 |
2 |
3 :organization: Logilab |
3 :organization: Logilab |
4 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
4 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
9 _ = unicode |
9 _ = unicode |
10 |
10 |
11 from yams.buildobjs import EntityType, RelationType, String |
11 from yams.buildobjs import EntityType, RelationType, String |
12 |
12 |
13 class Bookmark(EntityType): |
13 class Bookmark(EntityType): |
14 """define an entity type, used to build the application schema""" |
14 """bookmarks are used to have user's specific internal links""" |
15 permissions = { |
15 permissions = { |
16 'read': ('managers', 'users', 'guests',), |
16 'read': ('managers', 'users', 'guests',), |
17 'add': ('managers', 'users',), |
17 'add': ('managers', 'users',), |
18 'delete': ('managers', 'owners',), |
18 'delete': ('managers', 'owners',), |
19 'update': ('managers', 'owners',), |
19 'update': ('managers', 'owners',), |
20 } |
20 } |
21 title = String(required=True, maxsize=128) |
21 |
|
22 title = String(required=True, maxsize=128, internationalizable=True) |
22 path = String(maxsize=512, required=True, |
23 path = String(maxsize=512, required=True, |
23 description=_("relative url of the bookmarked page")) |
24 description=_("relative url of the bookmarked page")) |
24 |
25 |
25 bookmarked_by = SubjectRelation('CWUser', |
26 bookmarked_by = SubjectRelation('CWUser', |
26 description=_("users using this bookmark")) |
27 description=_("users using this bookmark")) |