コード例 #1
0
 def table_data(self):
     """Used to generate the form and parse it.
     """
     tables = {
         'requests': {
             'button_name':
             'form.button.requests',
             'columns': [
                 {
                     'id': 'approve',
                     'name': _(u'Approve request')
                 },
                 {
                     'id': 'remove',
                     'name': _(u'Remove request')
                 },
             ],
         },
         'subscriptions': {
             'button_name': 'form.button.subscriptions',
             'columns': [
                 {
                     'id': 'remove',
                     'name': _(u'Remove subscription')
                 },
             ],
         },
     }
     return tables
コード例 #2
0
class AddForm(base.AddForm):
    form_fields = form.Fields(ISubscribableSectionsPortlet)
    label = _(u"Add Subscribable Sections portlet")
    description = _(u"This portlet lists Subscribable Sections in the site.")

    def create(self, data):
        return Assignment()
コード例 #3
0
 def table_data(self):
     """Used to generate the form and parse it.
     """
     tables = {  
         'requests': {
             'button_name': 'form.button.requests', 
             'columns': [
                 {   'id': 'approve', 
                     'name': _(u'Approve request')},
                 {   'id': 'remove', 
                     'name': _(u'Remove request')},
                 ],
             },
         'subscriptions': {
             'button_name': 'form.button.subscriptions', 
             'columns': [
                 {   'id': 'remove', 
                     'name': _(u'Remove subscription')},
             ],
         },
     }
     return tables
コード例 #4
0
 def title(self):
     return _(u"Subscribable sections")
コード例 #5
0
from collective.subscribablesections import MessageFactory as _

PROJECTNAME = 'collective.subscribablesections'

REQUESTS_KEY = "collective.subscribablesections.requests"
SUBSCRIPTIONS_KEY = "collective.subscribablesections.subscriptions"

MESSAGE_REQUEST_EXISTS = (_(
    u'request_exists',
    default=u'Subscription request exists for this user.'), {
        'type': "error"
    })
MESSAGE_REQUEST_ADDED = (_(u'request_added',
                           default=u'Your subscription request was added.'), {
                               'type': "info"
                           })
# This message is displayed to the Member (on Open Sections, after automatic approval)
MESSAGE_SUBSCRIPTION_GRANTED = (_(u'subscription_success',
                                  default=u'You\'re subscribed.'), {
                                      'type': "info"
                                  })
# This message is displayed to the Manager (on Closed Sections, after approval)
MESSAGE_SUBSCRIPTION_APPROVED = (_(u'subscription_granted',
                                   default=u'Subscription was granted.'), {
                                       'type': "info"
                                   })
MESSAGE_MANAGEMENT_FORM_SUCCESS = (_(u'management_form_success',
                                     default=u'Form updated.'), {
                                         'type': "info"
                                     })
MESSAGE_REQUEST_REMOVED = (_(u'request_removed',
コード例 #6
0
class OpenSectionDescriptor(BaseSectionDescriptor):
    title = _(u'Open Section')
    description = _(u'Folder for which subscription is required to view it, where subscription is given immediately upon request')
    type_interface = IOpenSection
コード例 #7
0
class ClosedSectionDescriptor(BaseSectionDescriptor):
    title = _(u'Closed Section')
    description = _(u'Folder for which approved subscription is required to view it')
    type_interface = IClosedSection
コード例 #8
0
 def title(self):
     return _(u"Subscription requests")
コード例 #9
0
 def title(self):
     return _(u"Subscription requests")
コード例 #10
0
from collective.subscribablesections import MessageFactory as _

PROJECTNAME = 'collective.subscribablesections'

REQUESTS_KEY = "collective.subscribablesections.requests"
SUBSCRIPTIONS_KEY = "collective.subscribablesections.subscriptions"

MESSAGE_REQUEST_EXISTS = (
    _( u'request_exists',
       default = u'Subscription request exists for this user.' ), 
    {'type':"error"} )
MESSAGE_REQUEST_ADDED = (
    _( u'request_added', 
       default = u'Your subscription request was added.' ),
    {'type':"info"} )
# This message is displayed to the Member (on Open Sections, after automatic approval)
MESSAGE_SUBSCRIPTION_GRANTED = (
    _( u'subscription_success', 
       default = u'You\'re subscribed.' ),
    {'type':"info"} )
# This message is displayed to the Manager (on Closed Sections, after approval)
MESSAGE_SUBSCRIPTION_APPROVED = (
    _( u'subscription_granted', 
       default = u'Subscription was granted.' ),
    {'type':"info"} )
MESSAGE_MANAGEMENT_FORM_SUCCESS = (
    _( u'management_form_success',
       default = u'Form updated.' ),
    {'type': "info"} )
MESSAGE_REQUEST_REMOVED = (
    _( u'request_removed',