예제 #1
0
파일: task.py 프로젝트: robinharms/Progress
def deferred_state_widget(node, kw):
    #FIXME: Custom state values
    values = ((u"unassigned", _(u"Unassigned")),
              (u"ongoing", _(u"Ongoing")),
              (u"completed", _(u"Completed")),
               )
    return SelectWidget(values=values)
예제 #2
0
파일: base.py 프로젝트: robinharms/Progress
 def render_context_menu(self):
     response = {}
     actions = []
     context_url = resource_url(self.context, self.request)
     if 'edit' in self.context.schemas:
         actions.append({'id':'edit', 'title':_(u"Edit"), 'url': "%sedit" % context_url})
         #FIXME: Check edit perm too
     response['actions'] = actions
     return render('templates/snippets/context_menu.pt', response, request=self.request)
예제 #3
0
파일: app.py 프로젝트: robinharms/Progress
def bootstrap_root():
    root = createContent('SiteRoot', title='Progress')
    root['users'] = createContent('Users')
    #Create admin user with password admin as standard
    admin = createContent('User',
                          password='******',
                          first_name='Administrator')
    root['users']['admin'] = admin
    #Add admin to group managers
    #root.add_groups('admin', [security.ROLE_ADMIN])
    
    #Create example project
    root['example-project'] = createContent('Project', title=_(u"Example project"))

    return root
예제 #4
0
파일: user.py 프로젝트: robinharms/Progress
def _first_name():
    return colander.SchemaNode(colander.String(), title=_(u"First name"), missing=u"")