一个 plonehrm 扩展模块,用于向员工添加注释。
项目描述
Plone HRM 的注意事项
这个扩展模块为 Plone HRM 的 Employee 内容类型添加了非常简单的注释。
概述
一个 plonehrm 扩展模块,用于向员工添加注释。
>>> from plonehrm.notes.notes import Note, Notes
Note 是带有简单 unicode 字符串和日期的持久字典。
>>> n1 = Note(u'My first little note.') >>> n1.text u'My first little note.'>>> from datetime import date >>> n1.date == date.today().isoformat() True
Notes 是一个存储笔记的持久列表。
>>> nts = Notes()
但它只接受文本作为输入,而不是已经存在的注释:
>>> nts.addNote(n1) Traceback (most recent call last): AssertionError: string expected, got <class 'plonehrm.notes.notes.Note'>
不过,我们仍然可以添加 Note 的纯文本。
>>> nts.addNote(n1.text) >>> nts.addNote(u'It could be much longer if you prefer that.') >>> print nts [<plonehrm.notes.notes.Note ...>, <plonehrm.notes.notes.Note ...>]
并始终确保文本属性是 unicode。
>>> n3 = Note(u'H\xc3\xa9 daar!') >>> unicode(n3.text) u'H\xc3\xa9 daar!' >>> n3.text u'H\xc3\xa9 daar!'
现在我们要删除一个注释。
>>> nts.addNote(u"Please remove this note.") >>> len(nts) 3 >>> nts.removeNote(u"Please remove this note.") >>> len(nts) 2 >>> nts.removeNote(u"This note does not exist.") Traceback (most recent call last): ... ValueError: list.remove(x): x not in list
plonehrm.notes 的历史
1.1 (2010-01-15)
测试中的一些更改,因此它可以处理新的权限检查。[文森特]
1.0.7 (2010-01-07)
viewlet 现在由 'plonehrm: view notes viewlet' 权限保护。“删除”按钮由“plonehrm:管理笔记”保护,“添加”按钮仍由“plonehrm:添加笔记”保护。[文森特]
1.0.6 (2009-07-29)
更新了笔记视图的 KSS 动作。现在,在创建或删除笔记时会显示信息消息。当用户点击“取消”按钮时,该消息被隐藏。[文森特]
1.0.5 (2009-06-23)
什么都没有改变。
1.0.4 (2009-06-15)
什么都没有改变。
1.0.3 (2009-06-03)
现在,'Note' viewlet 充当 Employee 视图中的其他 viewlet。标题中存在一个“添加”按钮,它允许显示表单以添加新注释。添加注释后,表单消失,列表再次显示。[文森特]
1.0.2 (2009-05-26)
在笔记视图中添加了到 notes_listing 的链接。[jladage]
从语言环境中删除 .mo 文件。这意味着这些翻译将在旧的 Plone 3.0 中不可见。[毛里求斯]
1.0.1 (2009-04-16)
删除了 plonehrm:从我们的 rolemap.xml 添加/修改个人数据权限。这些权限很快就会消失,我不确定他们首先在 plonehrm.notes 中做了什么……[maurits+mike]
使用collective.autopermission 注册权限。[毛里求斯]
将行尾样式设置为原生并设置 svn:ignore。[毛里求斯]
1.0 (2008-10-02)
没有记录历史。
1.0 beta 2(2008 年 9 月 2 日)
没有记录历史。
1.0 beta 1(2007 年 12 月 13 日)
初始测试版。
项目详情
plonehrm.notes -1.1.tar.gz 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 574ca366c1d6d03cea60868717e2631d6e252261f90c75c0d472d7696a9c8505 |
|
| MD5 | f37a77a208f9c11f97e7d25d17dfc385 |
|
| 布莱克2-256 | 92f033b7e729a156ade0ebb00f65fd8d96ec262c2a9beda17074823d0f167a40 |