diff --git a/README.txt b/README.txt index 329413e..59ee879 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,28 @@ Introduction ============ +An dexterity content add-on for Plone to track Corruption Issues +Due to the lack of opposition, corruption is now entrenched in the +Malaysian system. Abuse of funds, conflict of interests in project +awards, bribery and kick backs are rampant. Despite being highlighted in +yearly government audits by the Auditor General, most of these cases are +never investigated and the practice of corruption continues. Citizens of +Malaysian want better accountability for reported corruption cases to +make more informed decisions when voting for the right representatives +for government. -This product may contain traces of nuts. + +* Find and track the current resolution of reported corruption issues. + Was action taken? Was it verified? Were those involved persecuted? + Was the sentence acceptable? +* See reports about the financial impact of corruption costs. +* See breakdown of different issues eg. financial, abuse of + power +* Find the people involved and how many cases have been + reported against them +* Find out under which government + (coalitions/political parties) the corruption issues + happened +* Follow issues of interest, and be notified when status of a case has + changed diff --git a/buildout.cfg b/buildout.cfg index 1eb5088..e859649 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -1,9 +1,30 @@ [buildout] -develop = . -parts = scripts test -extends = http://dist.plone.org/release/4.1.4/versions.cfg +develop = . +parts = scripts test omelette zopepy +extends = http://good-py.appspot.com/release/dexterity/1.2?plone=4.1.4 versions = versions +[instance] +recipe = plone.recipe.zope2instance +user = admin:admin +http-address = 8080 +debug-mode = on +verbose-security = on +eggs = Plone + Pillow + sinar.corruptiontracker +zcml = + +[omelette] +recipe = collective.recipe.omelette +eggs = ${instance:eggs} + +[zopepy] +recipe = zc.recipe.egg +eggs = ${instance:eggs} +interpreter = zopepy +scripts = zopepy + [scripts] recipe = zc.recipe.egg eggs = @@ -14,4 +35,4 @@ eggs = recipe = zc.recipe.testrunner eggs = sinar.corruptiontracker - defaults = ['--exit-with-status', '--auto-color', '--auto-progress'] +defaults = ['--exit-with-status', '--auto-color', '--auto-progress'] diff --git a/src/sinar/corruptiontracker/__init__.py b/src/sinar/corruptiontracker/__init__.py index 4107845..a136b52 100644 --- a/src/sinar/corruptiontracker/__init__.py +++ b/src/sinar/corruptiontracker/__init__.py @@ -1,4 +1,7 @@ # -*- extra stuff goes here -*- +from zope.i18nmessageid import MessageFactory + +_ = MessageFactory("sinar.corruptiontracker") def initialize(context): diff --git a/src/sinar/corruptiontracker/configure.zcml b/src/sinar/corruptiontracker/configure.zcml index 9ac6955..ebb890f 100644 --- a/src/sinar/corruptiontracker/configure.zcml +++ b/src/sinar/corruptiontracker/configure.zcml @@ -8,8 +8,9 @@ + + - diff --git a/src/sinar/corruptiontracker/issue.py b/src/sinar/corruptiontracker/issue.py index 0b09eb2..815c911 100644 --- a/src/sinar/corruptiontracker/issue.py +++ b/src/sinar/corruptiontracker/issue.py @@ -14,55 +14,70 @@ from plone.indexer import indexer from sinar.corruptiontracker import _ - +from sinar.corruptiontracker.person import IPerson class IIssue(form.Schema): """A Corrruption Issue """ - - details = RichText( - title=_(u"Corruption Details"), - required=True, - ) + + issue_start = schema.Date( + title=_(u"Date Issue Occurred/Started"), + required=False, + ) + + issue_end = schema.Date( + title=_(u"Date Issue Ended"), + description=_(u"When it stopped happening, if not single occurence."), + required=False, + ) + + financial_cost = schema.Int( title=_(u"Financial Cost"), description=_(u"Total financial cost of this corruption issue in RM"), required=False, ) + + details = RichText( + title=_(u"Corruption Details"), + required=True, + ) + persons_directly_implicated = RelationList( + title =_(u"Persons directly implicated"), + description=_(u"Persons directly implicated ie. with name or should be charged with corruption. One per line."), + default=[], + value_type=RelationChoice(title=_(u"Related Persons"), + source= ObjPathSourceBinder(object_provides=IPerson.__identifier__)), + required=False, + ) - form.widget(persons_directly_implicated=TextLinesFieldWidget) - persons_directly_implicated = schema.List( - title =_(u"Persons directly implicated"), - description=_(u"Persons directly implicated ie. with name or should be charged with corruption. One per line."), - value_type=schema.TextLine(), - required=False, - ) - form.widget(persons_indirectly_implicated=TextLinesFieldWidget) - persons_indirectly_implicated = schema.List( + persons_indirectly_implicated = RelationList( title =_(u"Persons indirectly implicated. "), - description =_(u"eg. minister or superior who approved loan or awarded tender. One per line."), - value_type = schema.TextLine(), + description =_(u"eg. minister or superior who approved loan or awarded tender."), + value_type=RelationChoice(title=_(u"Related Persons"), + source= ObjPathSourceBinder(object_provides=IPerson.__identifier__)), required=False ) - form.widget(persons_disclosing=TextLinesFieldWidget) - persons_disclosing = schema.List( - title = _(u"Persons disclosing"), - description = _(u"Persons who public disclosed this issue. One per line."), - value_type = schema.TextLine(), - required=False - ) - form.widget(persons_supporting=TextLinesFieldWidget) - persons_supporting= schema.List( + + persons_disclosing = RelationList( + title = _(u"Persons disclosing"), + description = _(u"Persons who public disclosed this issue."), + value_type=RelationChoice(title=_(u"Related Persons"), + source= ObjPathSourceBinder(object_provides=IPerson.__identifier__)), + required=False + ) + persons_supporting= RelationList( title = _(u"Persons supporting"), - description = _(u"Persons who support persons implicated such as defending their actions or defending that this is not an issue of corruption. One per line."), - value_type = schema.TextLine(), + description = _(u"Persons who support persons implicated such as defending their actions or defending that this is not an issue of corruption."), + value_type=RelationChoice(title=_(u"Related Persons"), + source= ObjPathSourceBinder(object_provides=IPerson.__identifier__)), required=False ) - form.widget(persons_against=TextLinesFieldWidget) - persons_against= schema.List( + persons_against= RelationList( title = _(u"Persons against"), - description = _(u"Persons who are against this action per line."), - value_type = schema.TextLine(), + description = _(u"Persons who are against this action."), + value_type=RelationChoice(title=_(u"Related Persons"), + source= ObjPathSourceBinder(object_provides=IPerson.__identifier__)), required=False ) @@ -70,7 +85,7 @@ class IIssue(form.Schema): title=u"Related Issues", default=[], value_type=RelationChoice(title=_(u"Related"), - source=ObjPathSourceBinder()), + source=ObjPathSourceBinder(object_provides="sinar.corruptiontracker.issue.IIssue")), required=False, ) @@ -79,10 +94,3 @@ def searchableIndexer(obj): return "%s %s %s" % (obj.title, obj.description, obj.details.output) grok.global_adapter(searchableIndexer, name='SearchableText') -@indexer(IIssue) -def indexer_persons_directly_implicated(obj): - if obj.persons_directly_implicated: - return tuple(obj.persons_directly_implicated) -grok.global_adapter(indexer_persons_directly_implicated, name='persons_directly_implicated') - - diff --git a/src/sinar/corruptiontracker/person.py b/src/sinar/corruptiontracker/person.py index b277ed1..70fbc48 100644 --- a/src/sinar/corruptiontracker/person.py +++ b/src/sinar/corruptiontracker/person.py @@ -29,7 +29,7 @@ class IPerson(form.Schema): details = RichText( title=_(u"Details"), - required=True, + required=False, ) diff --git a/src/sinar/corruptiontracker/person_templates/view.pt b/src/sinar/corruptiontracker/person_templates/view.pt index 97dc4f0..621085f 100644 --- a/src/sinar/corruptiontracker/person_templates/view.pt +++ b/src/sinar/corruptiontracker/person_templates/view.pt @@ -22,7 +22,11 @@
-

Issues directl + +
+

Issues + directly Implicated

+
@@ -34,8 +38,14 @@ Financial Cost (MYR):
+
+

Issues indirectly implicated

+

Issues in which this person indirectly implicated, such as + personally or on a board allowing this issue to happen, + conflict of interest or benefitting in some way as a result of + this issue.

@@ -47,8 +57,11 @@ Financial Cost (MYR):
+
+

Issues Against

+

Issues for which this person has stated publicly or

@@ -60,7 +73,9 @@ Financial Cost (MYR):
+
+ diff --git a/src/sinar/corruptiontracker/profiles/default/catalog.xml b/src/sinar/corruptiontracker/profiles/default/catalog.xml index bd1a9fb..3d1c5fb 100644 --- a/src/sinar/corruptiontracker/profiles/default/catalog.xml +++ b/src/sinar/corruptiontracker/profiles/default/catalog.xml @@ -6,29 +6,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/sinar/corruptiontracker/profiles/default/types.xml b/src/sinar/corruptiontracker/profiles/default/types.xml index 49a55dc..ebf1369 100644 --- a/src/sinar/corruptiontracker/profiles/default/types.xml +++ b/src/sinar/corruptiontracker/profiles/default/types.xml @@ -1,3 +1,4 @@ + diff --git a/src/sinar/corruptiontracker/profiles/default/types/sinar.corruptiontracker.issue.xml b/src/sinar/corruptiontracker/profiles/default/types/sinar.corruptiontracker.issue.xml index 7a1a5a7..87e1206 100644 --- a/src/sinar/corruptiontracker/profiles/default/types/sinar.corruptiontracker.issue.xml +++ b/src/sinar/corruptiontracker/profiles/default/types/sinar.corruptiontracker.issue.xml @@ -25,6 +25,8 @@ +