source: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/interfaces.py @ 14190

Last change on this file since 14190 was 14190, checked in by Henrik Bettermann, 8 years ago

Fill text fields instead of uploading pdf documents.

  • Property svn:keywords set to Id
File size: 8.9 KB
Line 
1## $Id: interfaces.py 14190 2016-09-27 07:30:43Z henrik $
2##
3## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18
19from zope import schema
20from waeup.ikoba.interfaces import IIkobaObject
21from waeup.ikoba.customers.interfaces import (
22    ICustomer, ICustomerDocument, ICustomerPDFDocument, IContract)
23from waeup.ikoba.customers.vocabularies import (
24    ConCatProductSource, CustomerDocumentSource)
25from waeup.ikoba.products.productoptions import ProductOptionField
26from ikobacustom.uniben.interfaces import MessageFactory as _
27
28
29class IUnibenCustomer(ICustomer):
30    """Representation of a customer.
31
32    """
33
34# Customer document interfaces
35
36
37class IUnibenCustomerDocument(ICustomerDocument):
38    """A customer document.
39
40    """
41
42class IUnibenCustomerPDFDocument(ICustomerPDFDocument):
43    """A customer pdf document.
44
45    """
46
47# Customer contract interfaces
48
49class IUnibenContract(IContract):
50    """A customer contract with document attached.
51
52    """
53
54    bib_cit = schema.Text(
55        title = _(u'Biographical Citation'),
56        description = u'Suggested biographical citation of '
57                       'nominee (max. 200 words) in the event that the '
58                       'nominee is selected for the award.',
59        required = False,
60        )
61
62    sup_stat = schema.Text(
63        title = _(u'Supporting Statement'),
64        description = u'Supporting statement (max. 200 words) summarizing '
65                       'the research and innovative achievement of the '
66                       'candidate. It should preferably focus on one major '
67                       'achievement/innovation/accomplishment.',
68        required = False,
69        )
70
71    nar_wu = schema.Text(
72        title = _(u'Narrative Write-Up'),
73        description = u'A narrative write-up (max. 1,000 words) of the '
74                       'candidate highlighting his/her scientific/creative '
75                       'achievement and/or innovation; restrict to one major '
76                       'innovation/achievement/accomplishment. '
77                       'The national/international impact of the '
78                       'achievement/innovation should be emphasized.',
79        required = False,
80        )
81
82    item_stat = schema.Text(
83        title = _(u'Itemized Statement'),
84        description = u'Itemized statement of research leadership and '
85                        'collaboration (max. 100 words)',
86        required = False,
87        )
88
89    sign_pub = schema.Text(
90        title = _(u'Significant Publications'),
91        description = u'A list of his/her most significant publications '
92                       '(max. 10) pertaining to the achievement/innovation '
93                       'along with each publication\'s H-index',
94        required = False,
95        )
96
97    vitae = schema.Text(
98        title = _(u'Curriculum Vitae'),
99        description = u'A curriculum vitae including a full list of scholarly '
100                       'publications',
101        required = False,
102        )
103
104    prev_aw = schema.Text(
105        title = _(u'Previous Awards'),
106        description = u'List of previous awards, honours and recognition '
107                       '(max. 10) received by nominee, including awarding '
108                       'body, purpose of award, date of award, and nature '
109                       'of award (cash, certificate, plaque, etc)',
110        required = False,
111        )
112
113    lead_rol = schema.Text(
114        title = _(u'Leadership Roles'),
115        description = u'List of leadership roles in academic/professional '
116                       'societies/organizations (max. no. of 3)',
117        required = False,
118        )
119
120    h_index = schema.Text(
121        title = _(u'State of H-Index'),
122        description = u'State the full H-index of author, i.e. nominee',
123        required = False,
124        )
125
126    doc1 = schema.Choice(
127        title = _(u'Reference Letters'),
128        source = CustomerDocumentSource(),
129        description = u'Reference letters from three referees '
130                       'added together in a pdf document',
131        required = False,
132        )
133
134    doc2 = schema.Choice(
135        title = _(u'Photos and Illustrations'),
136        source = CustomerDocumentSource(),
137        description = u'Maximum of 3 photos or illustrations '
138                       'added together in a pdf document',
139        required = False,
140        )
141
142class IRIAAContract(IUnibenContract):
143    """A Retention of Name contract.
144
145    """
146
147class IRIAAContractOfficialUse(IIkobaObject):
148    """Interface for editing RIAA official use data.
149
150    """
151
152    comment = schema.Text(
153        title= _('Reason for rejection'),
154        required = False,
155        )
156
157
158class IRIAAContractProcess(IRIAAContract, IRIAAContractOfficialUse):
159    """Interface for processing RIAA data.
160    """
161
162    product_options = schema.List(
163        title = _(u'Options/Fees'),
164        value_type = ProductOptionField(),
165        required = False,
166        readonly = False,
167        defaultFactory=list,
168        )
169
170class IRIAAContractEdit(IRIAAContract):
171    """Interface for editing RIAA data by customers.
172
173    """
174
175    bib_cit = schema.Text(
176        title = _(u'Biographical Citation'),
177        description = u'Suggested biographical citation of '
178                       'nominee (max. 200 words) in the event that the '
179                       'nominee is selected for the award.',
180        required = True,
181        )
182
183    sup_stat = schema.Text(
184        title = _(u'Supporting Statement'),
185        description = u'Supporting statement (max. 200 words) summarizing '
186                       'the research and innovative achievement of the '
187                       'candidate. It should preferably focus on one major '
188                       'achievement/innovation/accomplishment.',
189        required = True,
190        )
191
192    nar_wu = schema.Text(
193        title = _(u'Narrative Write-Up'),
194        description = u'A narrative write-up (max. 1,000 words) of the '
195                       'candidate highlighting his/her scientific/creative '
196                       'achievement and/or innovation; restrict to one major '
197                       'innovation/achievement/accomplishment. '
198                       'The national/international impact of the '
199                       'achievement/innovation should be emphasized.',
200        required = True,
201        )
202
203    item_stat = schema.Text(
204        title = _(u'Itemized Statement'),
205        description = u'Itemized statement of research leadership and '
206                        'collaboration (max. 100 words)',
207        required = True,
208        )
209
210    sign_pub = schema.Text(
211        title = _(u'Significant Publications'),
212        description = u'A list of his/her most significant publications '
213                       '(max. 10) pertaining to the achievement/innovation '
214                       'along with each publication\'s H-index',
215        required = True,
216        )
217
218    vitae = schema.Text(
219        title = _(u'Curriculum Vitae'),
220        description = u'A curriculum vitae including a full list of scholarly '
221                       'publications',
222        required = True,
223        )
224
225    prev_aw = schema.Text(
226        title = _(u'Previous Awards'),
227        description = u'List of previous awards, honours and recognition '
228                       '(max. 10) received by nominee, including awarding '
229                       'body, purpose of award, date of award, and nature '
230                       'of award (cash, certificate, plaque, etc)',
231        required = True,
232        )
233
234    lead_rol = schema.Text(
235        title = _(u'Leadership Roles'),
236        description = u'List of leadership roles in academic/professional '
237                       'societies/organizations (max. no. of 3)',
238        required = True,
239        )
240
241    h_index = schema.Text(
242        title = _(u'State of H-Index'),
243        description = u'State the full H-index of author, i.e. nominee',
244        required = True,
245        )
246
247    doc1 = schema.Choice(
248        title = _(u'Reference Letters'),
249        source = CustomerDocumentSource(),
250        description = u'Reference letters from three referees '
251                       'added together in a pdf document',
252        required = True,
253        )
254
255    doc2 = schema.Choice(
256        title = _(u'Photos and Illustrations'),
257        source = CustomerDocumentSource(),
258        description = u'Maximum of 3 photos or illustrations '
259                       'added together in a pdf document',
260        required = False,
261        )
Note: See TracBrowser for help on using the repository browser.