def show_story_short(story, no_number=False, markup=True):
    if no_number:
        story_line = u''
    else:
        story_line = u'%s.' % story.sequence_number

    if story.title or story.first_line:
        title = show_title(story, True)
    else:
        if markup:
            title = '<span class="no_data">no title</span>'
        else:
            title = 'no title'
    if story.feature:
        story_line = u'%s %s (%s)' % (esc(story_line), title,
                                      esc(story.feature))
    else:
        if markup:
            story_line = u'%s %s (%s)' % (
              esc(story_line),
              title,
              '<span class="no_data">no feature</span>')
        else:
            story_line = u'%s %s (no feature)' % (esc(story_line), title)

    story_line = u'%s %s' % (story_line, story.type)
    page_count = show_page_count(story)
    if page_count:
        story_line += ', %sp' % page_count
    else:
        if markup:
            story_line += '<span class="no_data"> no page count</span>'
        else:
            story_line += 'no page count'
    return mark_safe(story_line)
def show_story_short(story, no_number=False):
    if no_number:
        story_line = u''
    else:
        story_line = u'%s.' % story.sequence_number

    if story.title:
        if story.title_inferred:
            title = u'[%s]' % esc(story.title)
        else:
            title = esc(story.title)
    else:
        title = '<span class="no_data">no title</span>'
    if story.feature:
        story_line = u'%s %s (%s)' % (esc(story_line), title,
                                      esc(story.feature))
    else:
        story_line = u'%s %s (%s)' % (esc(story_line), title,
                                     '<span class="no_data">no feature</span>')
    story_line = u'%s %s' % (story_line, story.type)
    page_count = show_page_count(story)
    if page_count:
        story_line += ', %sp' % page_count
    else:
        story_line += '<span class="no_data"> no page count</span>'

    return mark_safe(story_line)
Example #3
0
def show_story_short(story, no_number=False, markup=True):
    if no_number:
        story_line = u''
    else:
        story_line = u'%s.' % story.sequence_number

    if story.title or story.first_line:
        title = show_title(story, True)
    else:
        if markup:
            title = '<span class="no_data">no title</span>'
        else:
            title = 'no title'
    if story.feature:
        story_line = u'%s %s (%s)' % (esc(story_line), title, esc(
            story.feature))
    else:
        if markup:
            story_line = u'%s %s (%s)' % (esc(
                story_line), title, '<span class="no_data">no feature</span>')
        else:
            story_line = u'%s %s (no feature)' % (esc(story_line), title)

    story_line = u'%s %s' % (story_line, story.type)
    page_count = show_page_count(story)
    if page_count:
        story_line += ', %sp' % page_count
    else:
        if markup:
            story_line += '<span class="no_data"> no page count</span>'
        else:
            story_line += 'no page count'
    return mark_safe(story_line)
Example #4
0
def show_story_short(story, no_number=False):
    if no_number:
        story_line = u''
    else:
        story_line = u'%s.' % story.sequence_number

    if story.title:
        if story.title_inferred:
            title = u'[%s]' % esc(story.title)
        else:
            title = esc(story.title)
    else:
        title = '<span class="no_data">no title</span>'
    if story.feature:
        story_line = u'%s %s (%s)' % (esc(story_line), title, esc(
            story.feature))
    else:
        story_line = u'%s %s (%s)' % (
            esc(story_line), title, '<span class="no_data">no feature</span>')
    story_line = u'%s %s' % (story_line, story.type)
    page_count = show_page_count(story)
    if page_count:
        story_line += ', %sp' % page_count
    else:
        story_line += '<span class="no_data"> no page count</span>'

    return mark_safe(story_line)