from quills.app.topic import Topic
from quills.app.topic import AuthorTopic
from quills.app.utilities import QuillsMixin
from quills.app.interfaces import IWeblogEnhancedConfiguration

# Local imports
from config import PROJECTNAME
import permissions as perms

WeblogEntrySchema = BaseSchema.copy() + Schema((

    TextField('description',
              searchable=1,
              accessor='Description',
              widget=TextAreaWidget(
                     label=_(u'label_weblogentry_description', default=u'Excerpt'),
                     description=_(u'help_weblogentry_description', default='A brief introduction for this entry.'),
                     ),
              ),

    TextField('text',
              searchable=1,
              default_output_type='text/x-html-safe',
              widget=RichWidget(
                     label=_(u'label_text', default=u'Entry Text'),
                     rows=30,
                     ),
              ),
    ),
    marshall=RFC822Marshaller(),
)
from quills.app.topic import AuthorTopic
from quills.app.utilities import QuillsMixin
from quills.app.interfaces import IWeblogEnhancedConfiguration

# Local imports
from .config import PROJECTNAME
from . import permissions as perms

WeblogEntrySchema = BaseSchema.copy() + Schema(
    (
        TextField(
            'description',
            searchable=1,
            accessor='Description',
            widget=TextAreaWidget(
                label=_('label_weblogentry_description', default='Excerpt'),
                description=_('help_weblogentry_description',
                              default='A brief introduction for this entry.'),
            ),
        ),
        TextField(
            'text',
            searchable=1,
            default_output_type='text/x-html-safe',
            widget=RichWidget(
                label=_('label_text', default='Entry Text'),
                rows=30,
            ),
        ),
    ),
    marshall=RFC822Marshaller(),
Example #3
0
#    # Create folder to store topic images
#    if config.CREATE_TOPIC_IMAGES_FOLDERS and not has_topic_images:
#        weblog.invokeFactory('Folder', id='topic_images', title='Topic Images')

WeblogSchema = BaseFolderSchema.copy() + Schema(
    (

        # This is sort of cheating.  We are stealing the Dublin Core 'description'
        # field for our purposes, but then I don't seen any reason to duplicate the
        # information.
        TextField(
            'description',
            searchable=1,
            accessor='Description',
            widget=TextAreaWidget(
                label=_('label_weblog_description', default='Description'),
                description=_(
                    'help_weblog_description',
                    default=
                    'A brief description of this weblog. This text will be displayed at the top of the page before any weblog entries.'
                ),
            ),
        ), ),
    marshall=PrimaryFieldMarshaller(),
)

# The subject is not language-specific
WeblogSchema['subject'].languageIndependent = True


def createSpecialFolders(blog, event):
Example #4
0
#    has_topic_images = hasattr(aq_base(weblog), 'topic_images')
#    # Create folder to store topic images
#    if config.CREATE_TOPIC_IMAGES_FOLDERS and not has_topic_images:
#        weblog.invokeFactory('Folder', id='topic_images', title='Topic Images')


WeblogSchema = BaseFolderSchema.copy() + Schema((

    # This is sort of cheating.  We are stealing the Dublin Core 'description'
    # field for our purposes, but then I don't seen any reason to duplicate the
    # information.
    TextField('description',
              searchable=1,
              accessor='Description',
              widget=TextAreaWidget(
                     label=_(u'label_weblog_description', default=u'Description'),
                     description=_(u'help_weblog_description', default=u'A brief description of this weblog. This text will be displayed at the top of the page before any weblog entries.'),
                     ),
              ),
    ),
    marshall=PrimaryFieldMarshaller(),
    )

# The subject is not language-specific
WeblogSchema['subject'].languageIndependent = True


def createSpecialFolders(blog, event):
    """Create folders for uploads and topic images. Supposed to be triggered
    on Weblog creation.