Exemplo n.º 1
0
def render_open_graph_metadata(context,post):
    __M_caller = context.caller_stack._push_frame()
    try:
        striphtml = context.get('striphtml', UNDEFINED)
        permalink = context.get('permalink', UNDEFINED)
        abs_link = context.get('abs_link', UNDEFINED)
        blog_title = context.get('blog_title', UNDEFINED)
        use_open_graph = context.get('use_open_graph', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'\n')
        if use_open_graph:
            __M_writer(u'    <meta name="og:title" content="')
            __M_writer(filters.html_escape(unicode(post.title()[:70])))
            __M_writer(u'">\n    <meta name="og:url" content="')
            __M_writer(unicode(abs_link(permalink)))
            __M_writer(u'">\n')
            if post.description():
                __M_writer(u'    <meta name="og:description" content="')
                __M_writer(filters.html_escape(unicode(post.description()[:200])))
                __M_writer(u'">\n')
            else:
                __M_writer(u'    <meta name="og:description" content="')
                __M_writer(filters.html_escape(unicode(post.text(strip_html=True)[:200])))
                __M_writer(u'">\n')
            __M_writer(u'    <meta name="og:site_name" content="')
            __M_writer(striphtml(unicode(blog_title)))
            __M_writer(u'">\n    <meta name="og:type" content="article">\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 2
0
def form_selector(name, title, all_values, value, errors, help=None):
    """
    Render html element OPTION
    """
    estyle = ''
    error_str = ''
    if name not in errors:
        estyle = 'display: none;'
    else:
        error_str = errors[name]

    if help is not None:
        title = '<acronym title="{help}">{title}</acronym>'.format(help=html_escape(help), title=html_escape(title))

    selector_items = []
    for id, v in all_values:
        selected = ''
        if id == value:
            selected = ' selected="selected"'
        s = '<option value="{0}"{1}>{2}</option>'.format(id, selected, v)
        selector_items.append(s)

    html = """<dt>{title}</dt>
    <div id="error-{name}" class="error" style="{style}">{error}</div>
    <dd><select name="{name}" id="fid-{name}">{items}</select></dd>
    """.format(name=name, style=estyle, error=html_escape(error_str),
               items=''.join(selector_items), title=title)

    return html
def render_body(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        discussion_visibility = context.get('discussion_visibility', UNDEFINED)
        discussion_id = context.get('discussion_id', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'\n')
        # SOURCE LINE 2
        runtime._include_file(context, u'_underscore_templates.html', _template_uri)
        __M_writer(u'\n\n<div class="discussion-module" data-discussion-id="')
        # SOURCE LINE 4
        __M_writer(filters.html_escape(filters.decode.utf8(discussion_id )))
        __M_writer(u'" data-discussion-visibility="')
        __M_writer(filters.decode.utf8(discussion_visibility))
        __M_writer(u'">\n    <a class="discussion-show control-button" href="javascript:void(0)" data-discussion-id="')
        # SOURCE LINE 5
        __M_writer(filters.html_escape(filters.decode.utf8(discussion_id )))
        __M_writer(u'" data-discussion-visibility="')
        __M_writer(filters.decode.utf8(discussion_visibility))
        __M_writer(u'"><span class="show-hide-discussion-icon"></span><span class="button-text"></span></a>\n    <a class="discussion-show-default control-button" href="javascript:void(0)" data-discussion-id="')
        # SOURCE LINE 6
        __M_writer(filters.html_escape(filters.decode.utf8(discussion_id )))
        __M_writer(u'" data-discussion-visibility="')
        __M_writer(filters.decode.utf8(discussion_visibility))
        __M_writer(u'" style="display:none;"><span class="show-hide-discussion-icon"></span><span class="button-text">Show Discussion</span></a>\n    <a href="#" class="new-post-btn"><span class="icon icon-edit new-post-icon"></span>')
        # SOURCE LINE 7
        __M_writer(filters.decode.utf8(_("New Topic")))
        __M_writer(u'</a>    \n</div>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 4
0
def render_browse_files(context,title_text,directory_path):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x10ab3d650')._populate(_import_ns, [u'*'])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 3
        __M_writer(u'\n    <script type="text/javascript">\n        $(function(){\n            $("#tree").ajaxComplete(function(event, XMLHttpRequest, ajaxOptions) {\n                _log("debug", "ajaxComplete: %o", this); // dom element listening\n            });\n            // --- Initialize sample trees\n            $("#tree").dynatree({\n                title: "')
        # SOURCE LINE 11
        __M_writer(filters.html_escape(unicode(title_text)))
        __M_writer(u'",\n                rootVisible: true,\n                minExpandLevel: 0, // 1: root node is not collapsible\n                persist: false,\n                checkbox: true,\n                selectMode: 3,\n                onPostInit: function(isReloading, isError) {\n                    //alert("reloading: "+isReloading+", error:"+isError);\n                    logMsg("onPostInit(%o, %o) - %o", isReloading, isError, this);\n                    // Re-fire onActivate, so the text is updated\n                    this.reactivate();\n                }, \n                fx: { height: "toggle", duration: 200 },\n                // initAjax is hard to fake, so we pass the children as object array:\n                initAjax: {url: "')
        # SOURCE LINE 25
        __M_writer(unicode(h.url_for( controller='admin_toolshed', action='open_folder' )))
        __M_writer(u'",\n                           dataType: "json", \n                           data: { folder_path: "')
        # SOURCE LINE 27
        __M_writer(filters.html_escape(unicode(directory_path)))
        __M_writer(u'" },\n                },\n                onLazyRead: function(dtnode){\n                    dtnode.appendAjax({\n                        url: "')
        # SOURCE LINE 31
        __M_writer(unicode(h.url_for( controller='admin_toolshed', action='open_folder' )))
        __M_writer(u'", \n                        dataType: "json",\n                        data: { folder_path: dtnode.data.key },\n                    });\n                },\n                onSelect: function(select, dtnode) {\n                    // Display list of selected nodes\n                    var selNodes = dtnode.tree.getSelectedNodes();\n                    // convert to title/key array\n                    var selKeys = $.map(selNodes, function(node) {\n                        return node.data.key;\n                    });\n                },\n                onActivate: function(dtnode) {\n                    var cell = $("#file_contents");\n                    var selected_value;\n                     if (dtnode.data.key == \'root\') {\n                        selected_value = "')
        # SOURCE LINE 48
        __M_writer(filters.html_escape(unicode(directory_path)))
        __M_writer(u'/";\n                    } else {\n                        selected_value = dtnode.data.key;\n                    };\n                    if (selected_value.charAt(selected_value.length-1) != \'/\') {\n                        // Make ajax call\n                        $.ajax( {\n                            type: "POST",\n                            url: "')
        # SOURCE LINE 56
        __M_writer(unicode(h.url_for( controller='admin_toolshed', action='get_file_contents' )))
        __M_writer(u'",\n                            dataType: "json",\n                            data: { file_path: selected_value },\n                            success : function( data ) {\n                                cell.html( \'<label>\'+data+\'</label>\' )\n                            }\n                        });\n                    } else {\n                        cell.html( \'\' );\n                    };\n                },\n            });\n        });\n    </script>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 5
0
def render_content(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        items = context.get('items', UNDEFINED)
        def content():
            return render_content(context)
        title = context.get('title', UNDEFINED)
        messages = context.get('messages', UNDEFINED)
        __M_writer = context.writer()
        __M_writer('\n<article class="listpage">\n    <header>\n        <h1>')
        __M_writer(filters.html_escape(str(title)))
        __M_writer('</h1>\n    </header>\n')
        if items:
            __M_writer('    <ul class="postlist">\n')
            for text, link, count in items:
                __M_writer('        <li><a href="')
                __M_writer(str(link))
                __M_writer('">')
                __M_writer(filters.html_escape(str(text)))
                __M_writer('</a>\n')
                if count:
                    __M_writer('            (')
                    __M_writer(str(count))
                    __M_writer(')\n')
            __M_writer('    </ul>\n')
        else:
            __M_writer('    <p>')
            __M_writer(str(messages("Nothing found.")))
            __M_writer('</p>\n')
        __M_writer('</article>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 6
0
def form_textarea(name, title, value, errors, help=None, height=None):
    estyle = ''
    tstyle = ''
    error_str = ''
    if name not in errors:
        estyle = 'display: none;'
    else:
        error_str = errors[name]

    if height is not None:
        tstyle += 'height: {0}px'.format(height)

    if tstyle != '':
        tstyle = ' style="{0}"'.format(tstyle)

    if value is None:
        value = ''

    if help is not None:
        title = '<acronym title="{help}">{title}</acronym>'.format(help=html_escape(help), title=html_escape(title))

    html = ''
    if title != '':
        html += '<dt>{title}</dt>\n'.format(title=title)

    html = """<div id="error-{name}" class="error" style="{estyle}">{error}</div>
    <dd><textarea type="text" name="{name}" id="fid-{name}"{tstyle}>{value}</textarea></dd>
    """.format(name=name, estyle=estyle, tstyle=tstyle, error=html_escape(error_str),
               value=html_escape(value))

    return html
Exemplo n.º 7
0
def render_html_pager(context,post):
    __M_caller = context.caller_stack._push_frame()
    try:
        messages = context.get('messages', UNDEFINED)
        __M_writer = context.writer()
        __M_writer('\n')
        if post.prev_post or post.next_post:
            __M_writer('        <ul class="pager hidden-print">\n')
            if post.prev_post:
                __M_writer('            <li class="previous">\n                <a href="')
                __M_writer(str(post.prev_post.permalink()))
                __M_writer('" rel="prev" title="')
                __M_writer(filters.html_escape(str(post.prev_post.title())))
                __M_writer('">')
                __M_writer(str(messages("Previous post")))
                __M_writer('</a>\n            </li>\n')
            if post.next_post:
                __M_writer('            <li class="next">\n                <a href="')
                __M_writer(str(post.next_post.permalink()))
                __M_writer('" rel="next" title="')
                __M_writer(filters.html_escape(str(post.next_post.title())))
                __M_writer('">')
                __M_writer(str(messages("Next post")))
                __M_writer('</a>\n            </li>\n')
            __M_writer('        </ul>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 8
0
def render_twitter_card_information(context,post):
    __M_caller = context.caller_stack._push_frame()
    try:
        twitter_card = context.get('twitter_card', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 51
        __M_writer(u'\n')
        # SOURCE LINE 52
        if twitter_card and twitter_card['use_twitter_cards']:
            # SOURCE LINE 53
            __M_writer(u'        <meta name="twitter:card" content="')
            __M_writer(filters.html_escape(unicode(twitter_card.get('card', 'summary'))))
            __M_writer(u'">\n        <meta name="og:url" content="')
            # SOURCE LINE 54
            __M_writer(unicode(post.permalink(absolute=True)))
            __M_writer(u'">\n')
            # SOURCE LINE 55
            if 'site:id' in twitter_card:
                # SOURCE LINE 56
                __M_writer(u'            <meta name="twitter:site:id" content="')
                __M_writer(unicode(twitter_card['site:id']))
                __M_writer(u'">\n')
                # SOURCE LINE 57
            elif 'site' in twitter_card:
                # SOURCE LINE 58
                __M_writer(u'            <meta name="twitter:site" content="')
                __M_writer(unicode(twitter_card['site']))
                __M_writer(u'">\n')
            # SOURCE LINE 60
            if 'creator:id' in twitter_card:
                # SOURCE LINE 61
                __M_writer(u'            <meta name="twitter:creator:id" content="')
                __M_writer(unicode(twitter_card['creator:id']))
                __M_writer(u'">\n')
                # SOURCE LINE 62
            elif 'creator' in twitter_card:
                # SOURCE LINE 63
                __M_writer(u'            <meta name="twitter:creator" content="')
                __M_writer(unicode(twitter_card['creator']))
                __M_writer(u'">\n')
            # SOURCE LINE 65
            __M_writer(u'        <meta name="og:title" content="')
            __M_writer(filters.html_escape(unicode(post.title()[:70])))
            __M_writer(u'">\n')
            # SOURCE LINE 66
            if post.description():
                # SOURCE LINE 67
                __M_writer(u'            <meta name="og:description" content="')
                __M_writer(filters.html_escape(unicode(post.description()[:200])))
                __M_writer(u'">\n')
                # SOURCE LINE 68
            else:
                # SOURCE LINE 69
                __M_writer(u'            <meta name="og:description" content="')
                __M_writer(filters.html_escape(unicode(post.text(strip_html=True)[:200])))
                __M_writer(u'">\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
def render_twitter_card_information(context, post):
    __M_caller = context.caller_stack._push_frame()
    try:
        twitter_card = context.get("twitter_card", UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 63
        __M_writer(u"\n")
        # SOURCE LINE 64
        if twitter_card and twitter_card["use_twitter_cards"]:
            # SOURCE LINE 65
            __M_writer(u'        <meta name="twitter:card" content="')
            __M_writer(filters.html_escape(unicode(twitter_card.get("card", "summary"))))
            __M_writer(u'">\n        <meta name="og:url" content="')
            # SOURCE LINE 66
            __M_writer(unicode(post.permalink(absolute=True)))
            __M_writer(u'">\n')
            # SOURCE LINE 67
            if "site:id" in twitter_card:
                # SOURCE LINE 68
                __M_writer(u'            <meta name="twitter:site:id" content="')
                __M_writer(unicode(twitter_card["site:id"]))
                __M_writer(u'">\n')
                # SOURCE LINE 69
            elif "site" in twitter_card:
                # SOURCE LINE 70
                __M_writer(u'            <meta name="twitter:site" content="')
                __M_writer(unicode(twitter_card["site"]))
                __M_writer(u'">\n')
            # SOURCE LINE 72
            if "creator:id" in twitter_card:
                # SOURCE LINE 73
                __M_writer(u'            <meta name="twitter:creator:id" content="')
                __M_writer(unicode(twitter_card["creator:id"]))
                __M_writer(u'">\n')
                # SOURCE LINE 74
            elif "creator" in twitter_card:
                # SOURCE LINE 75
                __M_writer(u'            <meta name="twitter:creator" content="')
                __M_writer(unicode(twitter_card["creator"]))
                __M_writer(u'">\n')
            # SOURCE LINE 77
            __M_writer(u'        <meta name="og:title" content="')
            __M_writer(filters.html_escape(unicode(post.title()[:70])))
            __M_writer(u'">\n')
            # SOURCE LINE 78
            if post.description():
                # SOURCE LINE 79
                __M_writer(u'            <meta name="og:description" content="')
                __M_writer(filters.html_escape(unicode(post.description()[:200])))
                __M_writer(u'">\n')
                # SOURCE LINE 80
            else:
                # SOURCE LINE 81
                __M_writer(u'            <meta name="og:description" content="')
                __M_writer(filters.html_escape(unicode(post.text(strip_html=True)[:200])))
                __M_writer(u'">\n')
        return ""
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 10
0
def render_body(context, **pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        flash = context.get('flash', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'\n')
        # SOURCE LINE 3
        if flash:
            # SOURCE LINE 4
            __M_writer(u'<div id="flash-message" class="flash-message">\n\t<div id="flash-message-list"></div>\n</div>\n<script>\n\tvar message = "<ul id=\'flash-message-items\'>";\n')
            # SOURCE LINE 9
            if 'error' in flash:
                
                # SOURCE LINE 10
                for message in flash['error']:
                    # SOURCE LINE 11
                    __M_writer(u'\t\t\tmessage += "<li class=\'error\'>')
                    __M_writer(filters.html_escape(unicode(message)))
                    __M_writer(u'</li>";\n')
                    pass
                pass
            # SOURCE LINE 14
            if 'notice' in flash:
                # SOURCE LINE 15
                for message in flash['notice']:
                    # SOURCE LINE 16
                    __M_writer(u'\t\t\tmessage += "<li class=\'notice\'>')
                    __M_writer(filters.html_escape(unicode(message)))
                    __M_writer(u'</li>";\n')
                    pass
                pass
            # SOURCE LINE 19
            if 'info' in flash:
                # SOURCE LINE 20
                for message in flash['info']:
                    # SOURCE LINE 21
                    __M_writer(u'\t\t\tmessage += "<li class=\'info\'>')
                    __M_writer(filters.html_escape(unicode(message)))
                    __M_writer(u'</li>";\n')
                    pass
                pass
            # SOURCE LINE 24
            if 'success' in flash:
                # SOURCE LINE 25
                for message in flash['success']:
                    # SOURCE LINE 26
                    __M_writer(u'\t\t\tmessage += "<li class=\'success\'>')
                    __M_writer(filters.html_escape(unicode(message)))
                    __M_writer(u'</li>";\n')
                    pass
                pass
            # SOURCE LINE 29
            __M_writer(u'\tmessage += "</ul>";\n\tshowNotification(message, \'\', function(){});\n</script>\n')
            pass
        return ''
    finally:
        context.caller_stack._pop_frame()
def render_content(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, 'feeds_translations')._populate(_import_ns, ['*'])
        description = _import_ns.get('description', context.get('description', UNDEFINED))
        title = _import_ns.get('title', context.get('title', UNDEFINED))
        feeds_translations = _mako_get_namespace(context, 'feeds_translations')
        messages = _import_ns.get('messages', context.get('messages', UNDEFINED))
        subcategories = _import_ns.get('subcategories', context.get('subcategories', UNDEFINED))
        date_format = _import_ns.get('date_format', context.get('date_format', UNDEFINED))
        tag = _import_ns.get('tag', context.get('tag', UNDEFINED))
        posts = _import_ns.get('posts', context.get('posts', UNDEFINED))
        def content():
            return render_content(context)
        __M_writer = context.writer()
        __M_writer('\n<article class="tagpage">\n    <header>\n        <h1>')
        __M_writer(filters.html_escape(str(title)))
        __M_writer('</h1>\n')
        if description:
            __M_writer('            <p>')
            __M_writer(str(description))
            __M_writer('</p>\n')
        if subcategories:
            __M_writer('        ')
            __M_writer(str(messages('Subcategories:')))
            __M_writer('\n        <ul>\n')
            for name, link in subcategories:
                __M_writer('            <li><a href="')
                __M_writer(str(link))
                __M_writer('">')
                __M_writer(filters.html_escape(str(name)))
                __M_writer('</a></li>\n')
            __M_writer('        </ul>\n')
        __M_writer('        <div class="metadata">\n            ')
        __M_writer(str(feeds_translations.feed_link(tag)))
        __M_writer('\n        </div>\n        ')
        __M_writer(str(feeds_translations.translation_link()))
        __M_writer('\n    </header>\n')
        if posts:
            __M_writer('        <ul class="postlist">\n')
            for post in posts:
                __M_writer('            <li><time class="listdate" datetime="')
                __M_writer(str(post.formatted_date('webiso')))
                __M_writer('" title="')
                __M_writer(filters.html_escape(str(post.formatted_date(date_format))))
                __M_writer('">')
                __M_writer(filters.html_escape(str(post.formatted_date(date_format))))
                __M_writer('</time> <a href="')
                __M_writer(str(post.permalink()))
                __M_writer('" class="listtitle">')
                __M_writer(filters.html_escape(str(post.title())))
                __M_writer('<a></li>\n')
            __M_writer('        </ul>\n')
        __M_writer('</article>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 12
0
def render_content(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, 'ui')._populate(_import_ns, ['bar'])
        photo_array = _import_ns.get('photo_array', context.get('photo_array', UNDEFINED))
        permalink = _import_ns.get('permalink', context.get('permalink', UNDEFINED))
        enable_comments = _import_ns.get('enable_comments', context.get('enable_comments', UNDEFINED))
        site_has_comments = _import_ns.get('site_has_comments', context.get('site_has_comments', UNDEFINED))
        comments = _mako_get_namespace(context, 'comments')
        def content():
            return render_content(context)
        folders = _import_ns.get('folders', context.get('folders', UNDEFINED))
        title = _import_ns.get('title', context.get('title', UNDEFINED))
        post = _import_ns.get('post', context.get('post', UNDEFINED))
        crumbs = _import_ns.get('crumbs', context.get('crumbs', UNDEFINED))
        ui = _mako_get_namespace(context, 'ui')
        __M_writer = context.writer()
        __M_writer('\n    ')
        __M_writer(str(ui.bar(crumbs)))
        __M_writer('\n')
        if title:
            __M_writer('    <h1>')
            __M_writer(filters.html_escape(str(title)))
            __M_writer('</h1>\n')
        if post:
            __M_writer('    <p>\n        ')
            __M_writer(str(post.text()))
            __M_writer('\n    </p>\n')
        if folders:
            __M_writer('    <ul>\n')
            for folder, ftitle in folders:
                __M_writer('        <li><a href="')
                __M_writer(filters.url_escape(str(folder)))
                __M_writer('"><i\n        class="icon-folder-open"></i>&nbsp;')
                __M_writer(filters.html_escape(str(ftitle)))
                __M_writer('</a></li>\n')
            __M_writer('    </ul>\n')
        if photo_array:
            __M_writer('    <ul class="thumbnails">\n')
            for image in photo_array:
                __M_writer('            <li><a href="')
                __M_writer(str(image['url']))
                __M_writer('" class="thumbnail image-reference" title="')
                __M_writer(str(image['title']))
                __M_writer('">\n                <img src="')
                __M_writer(str(image['url_thumb']))
                __M_writer('" alt="')
                __M_writer(filters.html_escape(str(image['title'])))
                __M_writer('" /></a>\n')
            __M_writer('    </ul>\n')
        if site_has_comments and enable_comments:
            __M_writer('    ')
            __M_writer(str(comments.comment_form(None, permalink, title)))
            __M_writer('\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
def render_html_post_header(context):
    __M_caller = context.caller_stack._push_frame()
    try:
        comments = _mako_get_namespace(context, 'comments')
        def html_translations(post):
            return render_html_translations(context,post)
        post = context.get('post', UNDEFINED)
        messages = context.get('messages', UNDEFINED)
        date_format = context.get('date_format', UNDEFINED)
        def html_title():
            return render_html_title(context)
        def html_sourcelink():
            return render_html_sourcelink(context)
        site_has_comments = context.get('site_has_comments', UNDEFINED)
        author_pages_generated = context.get('author_pages_generated', UNDEFINED)
        _link = context.get('_link', UNDEFINED)
        __M_writer = context.writer()
        __M_writer('\n    <header>\n        ')
        __M_writer(str(html_title()))
        __M_writer('\n        <div class="metadata">\n            <p class="byline author vcard"><span class="byline-name fn" itemprop="author">\n')
        if author_pages_generated:
            __M_writer('                    <a href="')
            __M_writer(str(_link('author', post.author())))
            __M_writer('">')
            __M_writer(filters.html_escape(str(post.author())))
            __M_writer('</a>\n')
        else:
            __M_writer('                    ')
            __M_writer(filters.html_escape(str(post.author())))
            __M_writer('\n')
        __M_writer('            </span></p>\n            <p class="dateline"><a href="')
        __M_writer(str(post.permalink()))
        __M_writer('" rel="bookmark"><time class="published dt-published" datetime="')
        __M_writer(str(post.formatted_date('webiso')))
        __M_writer('" itemprop="datePublished" title="')
        __M_writer(filters.html_escape(str(post.formatted_date(date_format))))
        __M_writer('">')
        __M_writer(filters.html_escape(str(post.formatted_date(date_format))))
        __M_writer('</time></a></p>\n')
        if not post.meta('nocomments') and site_has_comments:
            __M_writer('                <p class="commentline">')
            __M_writer(str(comments.comment_link(post.permalink(), post._base_path)))
            __M_writer('\n')
        __M_writer('            ')
        __M_writer(str(html_sourcelink()))
        __M_writer('\n')
        if post.meta('link'):
            __M_writer('                    <p class="linkline"><a href="')
            __M_writer(str(post.meta('link')))
            __M_writer('">')
            __M_writer(str(messages("Original site")))
            __M_writer('</a></p>\n')
        __M_writer('        </div>\n        ')
        __M_writer(str(html_translations(post)))
        __M_writer('\n    </header>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 14
0
def render_content(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        cat_hierarchy = context.get('cat_hierarchy', UNDEFINED)
        cat_items = context.get('cat_items', UNDEFINED)
        range = context.get('range', UNDEFINED)
        title = context.get('title', UNDEFINED)
        items = context.get('items', UNDEFINED)
        len = context.get('len', UNDEFINED)
        hidden_tags = context.get('hidden_tags', UNDEFINED)
        messages = context.get('messages', UNDEFINED)
        def content():
            return render_content(context)
        __M_writer = context.writer()
        __M_writer('\n<article class="tagindex">\n    <header>\n        <h1>')
        __M_writer(filters.html_escape(str(title)))
        __M_writer('</h1>\n    </header>\n')
        if cat_items:
            if items:
                __M_writer('            <h2>')
                __M_writer(str(messages("Categories")))
                __M_writer('</h2>\n')
            for text, full_name, path, link, indent_levels, indent_change_before, indent_change_after in cat_hierarchy:
                for i in range(indent_change_before):
                    __M_writer('                <ul class="postlist">\n')
                __M_writer('            <li><a class="reference" href="')
                __M_writer(str(link))
                __M_writer('">')
                __M_writer(str(text))
                __M_writer('</a>\n')
                if indent_change_after <= 0:
                    __M_writer('                </li>\n')
                for i in range(-indent_change_after):
                    __M_writer('                </ul>\n')
                    if i + 1 < len(indent_levels):
                        __M_writer('                    </li>\n')
            if items:
                __M_writer('            <h2>')
                __M_writer(str(messages("Tags")))
                __M_writer('</h2>\n')
        if items:
            __M_writer('        <ul class="postlist">\n')
            for text, link in items:
                if text not in hidden_tags:
                    __M_writer('                <li><a class="reference listtitle" href="')
                    __M_writer(str(link))
                    __M_writer('">')
                    __M_writer(filters.html_escape(str(text)))
                    __M_writer('</a></li>\n')
            __M_writer('        </ul>\n')
        __M_writer('</article>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 15
0
def render_html_navigation_links(context):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, 'notes')._populate(_import_ns, ['*'])
        lang = _import_ns.get('lang', context.get('lang', UNDEFINED))
        tuple = _import_ns.get('tuple', context.get('tuple', UNDEFINED))
        navigation_links = _import_ns.get('navigation_links', context.get('navigation_links', UNDEFINED))
        permalink = _import_ns.get('permalink', context.get('permalink', UNDEFINED))
        isinstance = _import_ns.get('isinstance', context.get('isinstance', UNDEFINED))
        messages = _import_ns.get('messages', context.get('messages', UNDEFINED))
        rel_link = _import_ns.get('rel_link', context.get('rel_link', UNDEFINED))
        __M_writer = context.writer()
        __M_writer('\n')
        for url, text in navigation_links[lang]:
            if isinstance(url, tuple):
                __M_writer('            <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">')
                __M_writer(filters.html_escape(str(text)))
                __M_writer(' <b class="caret"></b></a>\n            <ul class="dropdown-menu">\n')
                for suburl, text in url:
                    if rel_link(permalink, suburl) == "#":
                        __M_writer('                    <li class="active"><a href="')
                        __M_writer(str(permalink))
                        __M_writer('">')
                        __M_writer(filters.html_escape(str(text)))
                        __M_writer(' <span class="sr-only">')
                        __M_writer(str(messages("(active)", lang)))
                        __M_writer('</span></a>\n')
                    else:
                        __M_writer('                    <li><a href="')
                        __M_writer(str(suburl))
                        __M_writer('">')
                        __M_writer(filters.html_escape(str(text)))
                        __M_writer('</a>\n')
                __M_writer('            </ul>\n')
            else:
                if rel_link(permalink, url) == "#":
                    __M_writer('                <li class="active"><a href="')
                    __M_writer(str(permalink))
                    __M_writer('">')
                    __M_writer(filters.html_escape(str(text)))
                    __M_writer(' <span class="sr-only">')
                    __M_writer(str(messages("(active)", lang)))
                    __M_writer('</span></a>\n')
                else:
                    __M_writer('                <li><a href="')
                    __M_writer(str(url))
                    __M_writer('">')
                    __M_writer(filters.html_escape(str(text)))
                    __M_writer('</a>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 16
0
def render_render_login_form(context, form_action=None):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, "__anon_0x1173c7fd0")._populate(_import_ns, [u"render_msg"])
        redirect = _import_ns.get("redirect", context.get("redirect", UNDEFINED))
        header = _import_ns.get("header", context.get("header", UNDEFINED))
        login = _import_ns.get("login", context.get("login", UNDEFINED))
        use_panels = _import_ns.get("use_panels", context.get("use_panels", UNDEFINED))
        h = _import_ns.get("h", context.get("h", UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 69
        __M_writer(u"\n\n    ")
        # SOURCE LINE 71

        if form_action is None:
            form_action = h.url_for(controller="user", action="login", use_panels=use_panels)

        # SOURCE LINE 74
        __M_writer(u"\n\n")
        # SOURCE LINE 76
        if header:
            # SOURCE LINE 77
            __M_writer(u"        ")
            __M_writer(unicode(header))
            __M_writer(u"\n")
            pass
        # SOURCE LINE 79
        __M_writer(
            u'    <div class="toolForm">\n        <div class="toolFormTitle">Login</div>\n        <form name="login" id="login" action="'
        )
        # SOURCE LINE 81
        __M_writer(unicode(form_action))
        __M_writer(
            u'" method="post" >\n            <div class="form-row">\n                <label>Username / Email Address:</label>\n                <input type="text" name="login" value="'
        )
        # SOURCE LINE 84
        __M_writer(filters.html_escape(unicode(login or "")))
        __M_writer(u'" size="40"/>\n                <input type="hidden" name="redirect" value="')
        # SOURCE LINE 85
        __M_writer(filters.html_escape(unicode(redirect)))
        __M_writer(
            u'" size="40"/>\n            </div>\n            <div class="form-row">\n                <label>Password:</label>\n                <input type="password" name="password" value="" size="40"/>\n                <div class="toolParamHelp" style="clear: both;">\n                    <a href="'
        )
        # SOURCE LINE 91
        __M_writer(unicode(h.url_for(controller="user", action="reset_password", use_panels=use_panels)))
        __M_writer(
            u'">Forgot password? Reset here</a>\n                </div>\n            </div>\n            <div class="form-row">\n                <input type="submit" name="login_button" value="Login"/>\n            </div>\n        </form>\n    </div>\n\n'
        )
        return ""
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 17
0
def render_body(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        flash = context.get("flash", UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u"\n")
        # SOURCE LINE 3
        if flash:
            # SOURCE LINE 4
            __M_writer(
                u'<div id="flash-message" class="flash-message">\n\t<div id="flash-message-list"></div>\n</div>\n<script>\n\tvar message = "<ul id=\'flash-message-items\'>";\n'
            )
            # SOURCE LINE 9
            if "error" in flash:
                # SOURCE LINE 10
                for message in flash["error"]:
                    # SOURCE LINE 11
                    __M_writer(u"\t\t\tmessage += \"<li class='error'>")
                    __M_writer(filters.html_escape(unicode(message)))
                    __M_writer(u'</li>";\n')
            # SOURCE LINE 14
            if "notice" in flash:
                # SOURCE LINE 15
                for message in flash["notice"]:
                    # SOURCE LINE 16
                    __M_writer(u"\t\t\tmessage += \"<li class='notice'>")
                    __M_writer(filters.html_escape(unicode(message)))
                    __M_writer(u'</li>";\n')
            # SOURCE LINE 19
            if "info" in flash:
                # SOURCE LINE 20
                for message in flash["info"]:
                    # SOURCE LINE 21
                    __M_writer(u"\t\t\tmessage += \"<li class='info'>")
                    __M_writer(filters.html_escape(unicode(message)))
                    __M_writer(u'</li>";\n')
            # SOURCE LINE 24
            if "success" in flash:
                # SOURCE LINE 25
                for message in flash["success"]:
                    # SOURCE LINE 26
                    __M_writer(u"\t\t\tmessage += \"<li class='success'>")
                    __M_writer(filters.html_escape(unicode(message)))
                    __M_writer(u'</li>";\n')
            # SOURCE LINE 29
            __M_writer(u"\tmessage += \"</ul>\";\n\tshowNotification(message, '', function(){});\n</script>\n")
        return ""
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 18
0
def render_content(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, 'ui')._populate(_import_ns, ['bar'])
        messages = _import_ns.get('messages', context.get('messages', UNDEFINED))
        crumbs = _import_ns.get('crumbs', context.get('crumbs', UNDEFINED))
        ui = _mako_get_namespace(context, 'ui')
        source_link = _import_ns.get('source_link', context.get('source_link', UNDEFINED))
        code = _import_ns.get('code', context.get('code', UNDEFINED))
        title = _import_ns.get('title', context.get('title', UNDEFINED))
        def content():
            return render_content(context)
        files = _import_ns.get('files', context.get('files', UNDEFINED))
        folders = _import_ns.get('folders', context.get('folders', UNDEFINED))
        __M_writer = context.writer()
        __M_writer('\n')
        __M_writer(str(ui.bar(crumbs)))
        __M_writer('\n')
        if folders or files:
            __M_writer('<ul>\n')
            for name in folders:
                __M_writer('    <li><a href="')
                __M_writer(filters.url_escape(str(name)))
                __M_writer('"><i class="glyphicon glyphicon-folder-open"></i> ')
                __M_writer(filters.html_escape(str(name)))
                __M_writer('</a>\n')
            for name in files:
                __M_writer('    <li><a href="')
                __M_writer(filters.url_escape(str(name)))
                __M_writer('.html"><i class="glyphicon glyphicon-file"></i> ')
                __M_writer(filters.html_escape(str(name)))
                __M_writer('</a>\n')
            __M_writer('</ul>\n')
        if code:
            __M_writer('<h1>')
            __M_writer(str(title))
            __M_writer('\n')
            if source_link:
                __M_writer('        <small><a href="')
                __M_writer(str(source_link))
                __M_writer('">(')
                __M_writer(str(messages("Source")))
                __M_writer(')</a></small>\n')
            __M_writer('    </h1>\n    ')
            __M_writer(str(code))
            __M_writer('\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 19
0
def render_extra_head(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:

        def extra_head():
            return render_extra_head(context)

        helper = _mako_get_namespace(context, "helper")
        parent = context.get("parent", UNDEFINED)
        post = context.get("post", UNDEFINED)
        __M_writer = context.writer()
        __M_writer("\n    ")
        __M_writer(str(parent.extra_head()))
        __M_writer("\n")
        if post.meta("keywords"):
            __M_writer('    <meta name="keywords" content="')
            __M_writer(filters.html_escape(str(post.meta("keywords"))))
            __M_writer('">\n')
        if post.description():
            __M_writer('    <meta name="description" itemprop="description" content="')
            __M_writer(filters.html_escape(str(post.description())))
            __M_writer('">\n')
        __M_writer('    <meta name="author" content="')
        __M_writer(filters.html_escape(str(post.author())))
        __M_writer('">\n')
        if post.prev_post:
            __M_writer('        <link rel="prev" href="')
            __M_writer(str(post.prev_post.permalink()))
            __M_writer('" title="')
            __M_writer(filters.html_escape(str(post.prev_post.title())))
            __M_writer('" type="text/html">\n')
        if post.next_post:
            __M_writer('        <link rel="next" href="')
            __M_writer(str(post.next_post.permalink()))
            __M_writer('" title="')
            __M_writer(filters.html_escape(str(post.next_post.title())))
            __M_writer('" type="text/html">\n')
        if post.is_draft:
            __M_writer('        <meta name="robots" content="noindex">\n')
        __M_writer("    ")
        __M_writer(str(helper.open_graph_metadata(post)))
        __M_writer("\n    ")
        __M_writer(str(helper.twitter_card_information(post)))
        __M_writer("\n    ")
        __M_writer(str(helper.meta_translations(post)))
        __M_writer("\n")
        return ""
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 20
0
def render_body(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        flash = context.get('flash', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'\n')
        # SOURCE LINE 3
        if flash:
            # SOURCE LINE 4
            __M_writer(u'<div class="container">\n\t<div id="flash-message" class="flash-message">\n\t\t<div id="flash-message-list"></div>\n\t</div>\n</div>\n<script>\n\tvar message = "<div id=\'flash-message-items\' class=\'col-md-8 col-md-offset-2\'>";\n')
            # SOURCE LINE 11
            if 'error' in flash:
                # SOURCE LINE 12
                for message in flash['error']:
                    # SOURCE LINE 13
                    __M_writer(u'\t\t\tmessage += "<div class=\'alert alert-danger\'><span class=\'glyphicon glyphicon-exclamation-sign\'></span>&nbsp;')
                    __M_writer(filters.html_escape(unicode(message )))
                    __M_writer(u'</div>";\n')
            # SOURCE LINE 16
            if 'notice' in flash:
                # SOURCE LINE 17
                for message in flash['notice']:
                    # SOURCE LINE 18
                    __M_writer(u'\t\t\tmessage += "<div class=\'alert alert-warning\'><span class=\'glyphicon glyphicon-warning-sign\'></span>&nbsp;')
                    __M_writer(filters.html_escape(unicode(message )))
                    __M_writer(u'</div>";\n')
            # SOURCE LINE 21
            if 'info' in flash:
                # SOURCE LINE 22
                for message in flash['info']:
                    # SOURCE LINE 23
                    __M_writer(u'\t\t\tmessage += "<div class=\'alert alert-info\'><span class=\'glyphicon glyphicon-comment\'></span>&nbsp;')
                    __M_writer(filters.html_escape(unicode(message )))
                    __M_writer(u'</div>";\n')
            # SOURCE LINE 26
            if 'success' in flash:
                # SOURCE LINE 27
                for message in flash['success']:
                    # SOURCE LINE 28
                    __M_writer(u'\t\t\tmessage += "<div class=\'alert alert-success\'><span class=\'glyphicon glyphicon-ok\'></span>&nbsp;')
                    __M_writer(filters.html_escape(unicode(message )))
                    __M_writer(u'</div>";\n')
            # SOURCE LINE 31
            __M_writer(u'\tmessage += "</div>";\n\tshowNotification(message, \'\', function(){});\n</script>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
def render_right_panel(context):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x7f5a30573590')._populate(_import_ns, [u'render_individual_tagging_element'])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        trans = _import_ns.get('trans', context.get('trans', UNDEFINED))
        stored = _import_ns.get('stored', context.get('stored', UNDEFINED))
        annotation = _import_ns.get('annotation', context.get('annotation', UNDEFINED))
        render_individual_tagging_element = _import_ns.get('render_individual_tagging_element', context.get('render_individual_tagging_element', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 386
        __M_writer(u'\n    <div class="unified-panel-header" unselectable="on">\n        <div class="unified-panel-header-inner">\n            Details\n        </div>\n    </div>\n    <div class="unified-panel-body" style="overflow: auto;">\n')
        # SOURCE LINE 394
        __M_writer(u'        <div id="edit-attributes" class="metadataForm right-content">\n            <div class="metadataFormTitle">Edit Workflow Attributes</div>\n            <div class="metadataFormBody">\n')
        # SOURCE LINE 398
        __M_writer(u'            <div id="workflow-name-area" class="form-row">\n                <label>Name:</label>\n                <span id="workflow-name" class="editable-text" title="Click to rename workflow">')
        # SOURCE LINE 400
        __M_writer(filters.html_escape(unicode(h.to_unicode( stored.name ) )))
        __M_writer(u'</span>\n            </div>\n')
        # SOURCE LINE 403
        __M_writer(u'            ')
        __M_writer(u'\n            <div class="form-row">\n                <label>\n                    Tags:\n                </label>\n                    <div style="float: left; width: 225px; margin-right: 10px; border-style: inset; border-width: 1px; margin-left: 2px">\n                        <style>\n                            .tag-area {\n                                border: none;\n                            }\n                        </style>\n                        ')
        # SOURCE LINE 414
        __M_writer(unicode(render_individual_tagging_element(user=trans.get_user(), tagged_item=stored, elt_context="edit_attributes.mako", use_toggle_link=False, input_size="20")))
        __M_writer(u'\n                    </div>\n                    <div class="toolParamHelp">Apply tags to make it easy to search for and find items with the same tag.</div>\n                </div>\n')
        # SOURCE LINE 420
        __M_writer(u'                <div id="workflow-annotation-area" class="form-row">\n                    <label>Annotation / Notes:</label>\n                    <div id="workflow-annotation" class="editable-text" title="Click to edit annotation">\n')
        # SOURCE LINE 423
        if annotation:
            # SOURCE LINE 424
            __M_writer(u'                        ')
            __M_writer(filters.html_escape(unicode(h.to_unicode( annotation ) )))
            __M_writer(u'\n')
            # SOURCE LINE 425
        else:
            # SOURCE LINE 426
            __M_writer(u'                        <em>Describe or add notes to workflow</em>\n')
            pass
        # SOURCE LINE 428
        __M_writer(u'                    </div>\n                    <div class="toolParamHelp">Add an annotation or notes to a workflow; annotations are available when a workflow is viewed.</div>\n                </div>\n            </div>\n        </div>\n\n')
        # SOURCE LINE 435
        __M_writer(u'        <div id="right-content" class="right-content"></div>\n\n')
        # SOURCE LINE 438
        __M_writer(u'        <div style="display:none;" id="workflow-output-area" class="metadataForm right-content">\n            <div class="metadataFormTitle">Edit Workflow Outputs</div>\n            <div class="metadataFormBody"><div class="form-row">\n                <div class="toolParamHelp">Tag step outputs to indicate the final dataset(s) to be generated by running this workflow.</div>\n                <div id="output-fill-area"></div>\n            </div></div>\n        </div>\n\n    </div>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 22
0
def render_css_link(context,path,media=''):
    __M_caller = context.caller_stack._push_frame()
    try:
        context._push_buffer()
        self = context.get('self', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'\n')
        # SOURCE LINE 3
        if path not in self.seen_css:
            # SOURCE LINE 4
            __M_writer(u'        <link rel="stylesheet" type="text/css" href="')
            __M_writer(filters.html_escape(unicode(path)))
            __M_writer(u'" media="')
            __M_writer(unicode(media))
            __M_writer(u'">\n')
        # SOURCE LINE 6
        __M_writer(u'    ')
        self.seen_css.add(path) 
        
        __M_writer(u'\n')
    finally:
        __M_buf, __M_writer = context._pop_buffer_and_writer()
        context.caller_stack._pop_frame()
    __M_writer(filters.trim(__M_buf.getvalue()))
    return ''
def render_center_panel(context):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x7f5a30573590')._populate(_import_ns, [u'render_individual_tagging_element'])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        stored = _import_ns.get('stored', context.get('stored', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 354
        __M_writer(u'\n\n    <div class="unified-panel-header" unselectable="on">\n        <div class="unified-panel-header-inner" style="float: right">\n            <a id="workflow-options-button" class="panel-header-button" href="#"><span class="fa fa-cog"></span></a>\n        </div>\n        <div class="unified-panel-header-inner">\n            Workflow Canvas | ')
        # SOURCE LINE 361
        __M_writer(filters.html_escape(unicode(h.to_unicode( stored.name ) )))
        __M_writer(u'\n        </div>\n    </div>\n    <div class="unified-panel-body">\n        <div id="canvas-viewport" style="width: 100%; height: 100%; position: absolute; overflow: hidden; background: #EEEEEE; background: white url(')
        # SOURCE LINE 365
        __M_writer(unicode(h.url_for('/static/images/light_gray_grid.gif')))
        __M_writer(u') repeat;">\n            <div id="canvas-container" style="position: absolute; width: 100%; height: 100%;"></div>\n        </div>\n        <div id="overview-border" style="position: absolute; width: 150px; height: 150px; right: 20000px; bottom: 0px; border-top: solid gray 1px; border-left: solid grey 1px; padding: 7px 0 0 7px; background: #EEEEEE no-repeat url(')
        # SOURCE LINE 368
        __M_writer(unicode(h.url_for('/static/images/resizable.png')))
        __M_writer(u'); z-index: 20000; overflow: hidden; max-width: 300px; max-height: 300px; min-width: 50px; min-height: 50px">\n            <div style="position: relative; overflow: hidden; width: 100%; height: 100%; border-top: solid gray 1px; border-left: solid grey 1px;">\n                <div id="overview" style="position: absolute;">\n                    <canvas width="0" height="0" style="background: white; width: 100%; height: 100%;" id="overview-canvas"></canvas>\n                    <div id="overview-viewport" style="position: absolute; width: 0px; height: 0px; border: solid blue 1px; z-index: 10;"></div>\n                </div>\n            </div>\n        </div>\n        <div id=\'workflow-parameters-box\' style="display:none; position: absolute; /*width: 150px; height: 150px;*/ right: 0px; top: 0px; border-bottom: solid gray 1px; border-left: solid grey 1px; padding: 7px; background: #EEEEEE; z-index: 20000; overflow: hidden; max-width: 300px; max-height: 300px; /*min-width: 50px; min-height: 50px*/">\n            <div style="margin-bottom:5px;"><b>Workflow Parameters</b></div>\n            <div id="workflow-parameters-container">\n            </div>\n        </div>\n        <div id="close-viewport" style="border-left: 1px solid #999; border-top: 1px solid #999; background: #ddd url(')
        # SOURCE LINE 381
        __M_writer(unicode(h.url_for('/static/images/overview_arrows.png')))
        __M_writer(u') 12px 0px; position: absolute; right: 0px; bottom: 0px; width: 12px; height: 12px; z-index: 25000;"></div>\n    </div>\n\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 24
0
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x2b47102b3310')._populate(_import_ns, [u'render_deleted_data_message'])
        truncated_data = _import_ns.get('truncated_data', context.get('truncated_data', UNDEFINED))
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        util = _import_ns.get('util', context.get('util', UNDEFINED))
        render_deleted_data_message = _import_ns.get('render_deleted_data_message', context.get('render_deleted_data_message', UNDEFINED))
        trans = _import_ns.get('trans', context.get('trans', UNDEFINED))
        data = _import_ns.get('data', context.get('data', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n')
        # SOURCE LINE 2
        __M_writer(u'\n\n')
        # SOURCE LINE 4
        __M_writer(unicode( render_deleted_data_message( data ) ))
        __M_writer(u'\n\n<div class="warningmessagelarge">\n    This dataset is large and only the first megabyte is shown below.<br />\n    <a href="')
        # SOURCE LINE 8
        __M_writer(unicode(h.url_for( controller='dataset', action='display', dataset_id=trans.security.encode_id( data.id ), filename='' )))
        __M_writer(u'">Show all</a> |\n    <a href="')
        # SOURCE LINE 9
        __M_writer(unicode(h.url_for( controller='dataset', action='display', dataset_id=trans.security.encode_id( data.id ), to_ext=data.ext )))
        __M_writer(u'">Save</a>\n</div>\n\n<pre>\n')
        # SOURCE LINE 13
        __M_writer(filters.html_escape(unicode( util.unicodify( truncated_data ) )))
        __M_writer(u'\n</pre>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
def render_center_panel(context):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x7f313c53ca10')._populate(_import_ns, [u'*'])
        _mako_get_namespace(context, '__anon_0x7f313c53c5d0')._populate(_import_ns, [u'render_individual_tagging_element', u'render_community_tagging_element'])
        item_data = _import_ns.get('item_data', context.get('item_data', UNDEFINED))
        get_class_display_name = _import_ns.get('get_class_display_name', context.get('get_class_display_name', UNDEFINED))
        self = _import_ns.get('self', context.get('self', UNDEFINED))
        item = _import_ns.get('item', context.get('item', UNDEFINED))
        get_item_name = _import_ns.get('get_item_name', context.get('get_item_name', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 96
        __M_writer(u'\n    <div class="unified-panel-header" unselectable="on">\n        <div class="unified-panel-header-inner">\n                ')
        # SOURCE LINE 99
        __M_writer(unicode(get_class_display_name( item.__class__ )))
        __M_writer(u'\n            | ')
        # SOURCE LINE 100
        __M_writer(filters.html_escape(unicode(get_item_name( item ) )))
        __M_writer(u'\n        </div>\n    </div>\n\n    <div class="unified-panel-body">\n        <div style="overflow: auto; height: 100%;">\n            <div class="page-body">\n                <div style="float: right">\n                    ')
        # SOURCE LINE 108
        __M_writer(unicode(self.render_item_links( item )))
        __M_writer(u'\n                </div>\n                <div>\n                    ')
        # SOURCE LINE 111
        __M_writer(unicode(self.render_item_header( item )))
        __M_writer(u'\n                </div>\n\n                ')
        # SOURCE LINE 114
        __M_writer(unicode(self.render_item( item, item_data )))
        __M_writer(u'\n            </div>\n        </div>\n    </div>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 26
0
def render_render_openid_form(context,redirect,auto_associate,openid_providers):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x10d7cba90')._populate(_import_ns, [u'render_msg'])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 102
        __M_writer(u'\n    <div class="toolForm">\n        <div class="toolFormTitle">OpenID Login</div>\n        <form name="openid" id="openid" action="')
        # SOURCE LINE 105
        __M_writer(unicode(h.url_for( controller='user', action='openid_auth' )))
        __M_writer(u'" method="post" target="_parent" >\n            <div class="form-row">\n                <label>OpenID URL:</label>\n                <input type="text" name="openid_url" size="60" style="background-image:url(\'')
        # SOURCE LINE 108
        __M_writer(unicode(h.url_for( '/static/images/openid-16x16.gif' )))
        __M_writer(u'\' ); background-repeat: no-repeat; padding-right: 20px; background-position: 99% 50%;"/>\n                <input type="hidden" name="redirect" value="')
        # SOURCE LINE 109
        __M_writer(filters.html_escape(unicode(redirect )))
        __M_writer(u'" size="40"/>\n            </div>\n            <div class="form-row">\n                Or, authenticate with your <select name="openid_provider">\n')
        # SOURCE LINE 113
        for provider in openid_providers:
            # SOURCE LINE 114
            __M_writer(u'                    <option value="')
            __M_writer(unicode(provider.id))
            __M_writer(u'">')
            __M_writer(unicode(provider.name))
            __M_writer(u'</option>\n')
            pass
        # SOURCE LINE 116
        __M_writer(u'                </select> account.\n            </div>\n            <div class="form-row">\n                <input type="submit" name="login_button" value="Login"/>\n            </div>\n        </form>\n    </div>\n\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 27
0
def render_render_item_header(context,item):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x7f72fc204250')._populate(_import_ns, [u'*'])
        _mako_get_namespace(context, '__anon_0x7315e50')._populate(_import_ns, [u'*'])
        _mako_get_namespace(context, '__anon_0x7315f90')._populate(_import_ns, [u'render_individual_tagging_element', u'render_community_tagging_element'])
        get_item_name = _import_ns.get('get_item_name', context.get('get_item_name', UNDEFINED))
        get_class_display_name = _import_ns.get('get_class_display_name', context.get('get_class_display_name', UNDEFINED))
        hasattr = _import_ns.get('hasattr', context.get('hasattr', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 160
        __M_writer(u'\n    <h3>Galaxy ')
        # SOURCE LINE 161
        __M_writer(unicode(get_class_display_name( item.__class__ )))
        __M_writer(u" '")
        __M_writer(filters.html_escape(unicode(get_item_name( item ))))
        __M_writer(u"'</h3>\n")
        # SOURCE LINE 162
        if hasattr( item, "annotation") and item.annotation is not None:
            # SOURCE LINE 163
            __M_writer(u'        <div class="annotation">Annotation: ')
            __M_writer(unicode(item.annotation))
            __M_writer(u'</div>\n')
            pass
        # SOURCE LINE 165
        __M_writer(u'    <hr/>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 28
0
def render_twitter_card_information(context,post):
    __M_caller = context.caller_stack._push_frame()
    try:
        twitter_card = context.get('twitter_card', UNDEFINED)
        __M_writer = context.writer()
        __M_writer('\n')
        if twitter_card and twitter_card['use_twitter_cards']:
            __M_writer('    <meta name="twitter:card" content="')
            __M_writer(filters.html_escape(str(twitter_card.get('card', 'summary'))))
            __M_writer('">\n')
            if 'site:id' in twitter_card:
                __M_writer('    <meta name="twitter:site:id" content="')
                __M_writer(str(twitter_card['site:id']))
                __M_writer('">\n')
            elif 'site' in twitter_card:
                __M_writer('    <meta name="twitter:site" content="')
                __M_writer(str(twitter_card['site']))
                __M_writer('">\n')
            if 'creator:id' in twitter_card:
                __M_writer('    <meta name="twitter:creator:id" content="')
                __M_writer(str(twitter_card['creator:id']))
                __M_writer('">\n')
            elif 'creator' in twitter_card:
                __M_writer('    <meta name="twitter:creator" content="')
                __M_writer(str(twitter_card['creator']))
                __M_writer('">\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 29
0
def render_extra_head(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, u'arusahni')._populate(_import_ns, [u'*'])
        def extra_head():
            return render_extra_head(context)
        post = _import_ns.get('post', context.get('post', UNDEFINED))
        helper = _mako_get_namespace(context, 'helper')
        parent = _import_ns.get('parent', context.get('parent', UNDEFINED))
        __M_writer = context.writer()
        __M_writer(u'\n    ')
        __M_writer(unicode(parent.extra_head()))
        __M_writer(u'\n')
        if post.meta('keywords'):
            __M_writer(u'        <meta name="keywords" content="')
            __M_writer(filters.html_escape(unicode(post.meta('keywords'))))
            __M_writer(u'">\n')
        __M_writer(u'    <meta name="author" content="')
        __M_writer(unicode(post.author()))
        __M_writer(u'">\n    ')
        __M_writer(unicode(helper.open_graph_metadata(post)))
        __M_writer(u'\n    ')
        __M_writer(unicode(helper.twitter_card_information(post)))
        __M_writer(u'\n    ')
        __M_writer(unicode(helper.meta_translations(post)))
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 30
0
def render_extra_head(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        def extra_head():
            return render_extra_head(context)
        post = context.get('post', UNDEFINED)
        helper = _mako_get_namespace(context, 'helper')
        __M_writer = context.writer()
        # SOURCE LINE 5
        __M_writer(u'\n')
        # SOURCE LINE 6
        __M_writer(unicode(helper.twitter_card_information(post)))
        __M_writer(u'\n')
        # SOURCE LINE 7
        if post.meta('keywords'):
            # SOURCE LINE 8
            __M_writer(u'    <meta name="keywords" content="')
            __M_writer(filters.html_escape(unicode(post.meta('keywords'))))
            __M_writer(u'">\n')
        # SOURCE LINE 10
        __M_writer(unicode(helper.meta_translations(post)))
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 31
0
def render_footer_extra(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        fragment = context.get('fragment', UNDEFINED)

        def footer_extra():
            return render_footer_extra(context)

        __M_writer = context.writer()
        __M_writer(u'\n')
        runtime._include_file(context,
                              u'/mathjax_include.html',
                              _template_uri,
                              disable_fast_preview=True)
        __M_writer(u'\n')
        __M_writer(
            filters.html_escape(filters.decode.utf8(HTML(
                fragment.foot_html()))))
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 32
0
def render_js(context, group):
    __M_caller = context.caller_stack._push_frame()
    try:
        settings = context.get('settings', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'\n')
        if settings.PIPELINE_ENABLED:
            __M_writer(u'    ')
            __M_writer(filters.decode.utf8(compressed_js(group)))
            __M_writer(u'\n')
        else:
            for filename in settings.PIPELINE_JS[group]['source_filenames']:
                __M_writer(u'      <script type="text/javascript" src="')
                __M_writer(
                    filters.html_escape(
                        filters.decode.utf8(
                            staticfiles_storage.url(
                                filename.replace('.coffee', '.js')))))
                __M_writer(u'"></script>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 33
0
    def viewlog(self,
                min_level=logger.INFO,
                log_filter=None,
                log_search=None,
                max_lines=1000,
                log_period='one_day',
                **kwargs):
        """View the log given the specified filters."""
        min_level = int(min_level)
        log_filter = log_filter if log_filter in log_name_filters else None

        t = PageTemplate(rh=self, filename='viewlogs.mako')

        period = log_periods.get(log_period)
        modification_time = datetime.now() - period if period else None
        data = [
            line for line in read_loglines(
                modification_time=modification_time,
                formatter=text_type,
                max_lines=max_lines,
                predicate=lambda l: filter_logline(l,
                                                   min_level=min_level,
                                                   thread_name=thread_names.
                                                   get(log_filter, log_filter),
                                                   search_query=log_search))
        ]

        return t.render(header='Log File',
                        title='Logs',
                        topmenu='system',
                        log_lines='\n'.join(
                            [html_escape(line) for line in data]),
                        min_level=min_level,
                        log_name_filters=log_name_filters,
                        log_filter=log_filter,
                        log_search=log_search,
                        log_period=log_period,
                        controller='errorlogs',
                        action='viewlogs')
Exemplo n.º 34
0
def render_css_link(context,path,media=''):
    __M_caller = context.caller_stack._push_frame()
    try:
        context._push_buffer()
        self = context.get('self', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'\n')
        if path not in self.seen_css:
            __M_writer(u'    <link rel="stylesheet" type="text/css" href="')
            __M_writer(filters.html_escape(unicode(path)))
            __M_writer(u'" media="')
            __M_writer(unicode(media))
            __M_writer(u'">\n')
        __M_writer(u'    ')
        self.seen_css.add(path) 
        
        __M_writer(u'\n')
    finally:
        __M_buf, __M_writer = context._pop_buffer_and_writer()
        context.caller_stack._pop_frame()
    __M_writer(filters.trim(__M_buf.getvalue()))
    return ''
Exemplo n.º 35
0
def render_webpack(context,entry,extension=None,config='DEFAULT',attrs=''):
    __M_caller = context.caller_stack._push_frame()
    try:
        capture = context.get('capture', UNDEFINED)
        caller = context.get('caller', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'\n    ')
        __M_writer(u'\n    ')

        body = capture(caller.body)
            
        
        __M_writer(u'\n    ')
        __M_writer(filters.html_escape(filters.decode.utf8(HTML(render_bundle(entry, extension=None, config='DEFAULT', attrs=attrs)))))
        __M_writer(u'\n')
        if body:
            __M_writer(u'      <script type="text/javascript">\n        ')
            __M_writer(filters.decode.utf8(body ))
            __M_writer(u'\n      </script>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 36
0
def render_require_module(context,module_name,class_name):
    __M_caller = context.caller_stack._push_frame()
    try:
        caller = context.get('caller', UNDEFINED)
        settings = context.get('settings', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'\n    ')
        __M_writer(u'\n')
        if not settings.REQUIRE_DEBUG:
            __M_writer(u'      <script type="text/javascript" src="')
            __M_writer(filters.html_escape(filters.decode.utf8(staticfiles_storage.url(module_name + '.js') + '?raw')))
            __M_writer(u'"></script>\n')
        __M_writer(u'    <script type="text/javascript">\n        (function (require) {\n            require([\'')
        __M_writer(js_escaped_string(module_name ))
        __M_writer(u"'], function (")
        __M_writer(filters.decode.utf8(class_name ))
        __M_writer(u') {\n                ')
        __M_writer(filters.decode.utf8(caller.body() ))
        __M_writer(u'\n            });\n        }).call(this, require || RequireJS.require);\n    </script>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 37
0
def render_top_content(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:

        def top_content():
            return render_top_content(context)

        form = context.get('form', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(
            '\n   <br /><br /><br /><br /><br /><br />\n   <div class="header_wrapper">\n\n      <h1 class="text-center">How would you rate your experience in secondary education?</h1>\n      <div class="row"id="star_div">\n         <div class="star_wrap 1"><i class="far fa-star fa-2x stars"></i></div>\n         <div class="star_wrap 2"><i class="far fa-star fa-2x stars"></i></div>\n         <div class="star_wrap 3"><i class="far fa-star fa-2x stars"></i></div>\n         <div class="star_wrap 4"><i class="far fa-star fa-2x stars"></i></div>\n         <div class="star_wrap 5"><i class="far fa-star fa-2x stars"></i></div>\n      </div>\n\n         <br />\n\n      '
        )
        __M_writer(str(form))
        __M_writer(
            '\n      <p id="textCharCount">280 of 280 characters remaining   </p>\n      <button type="submit" class="btn btn-outline-primary">'
        )
        __M_writer(filters.html_escape(str(form.submit_text)))
        __M_writer(
            '</button>\n   </form>\n   </div>\n   </div>\n\n\n\n\n\n\n\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 38
0
def render_body(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        graded = context.get('graded', UNDEFINED)
        current_score = context.get('current_score', UNDEFINED)
        content = context.get('content', UNDEFINED)
        total_possible = context.get('total_possible', UNDEFINED)
        ajax_url = context.get('ajax_url', UNDEFINED)
        element_id = context.get('element_id', UNDEFINED)
        attempts_used = context.get('attempts_used', UNDEFINED)
        id = context.get('id', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'<div id="problem_')
        __M_writer(filters.decode.utf8(element_id))
        __M_writer(
            u'" class="problems-wrapper" role="group"\n     aria-labelledby="')
        __M_writer(filters.decode.utf8(element_id))
        __M_writer(u'-problem-title"\n     data-problem-id="')
        __M_writer(filters.decode.utf8(id))
        __M_writer(u'" data-url="')
        __M_writer(filters.decode.utf8(ajax_url))
        __M_writer(u'"\n     data-problem-score="')
        __M_writer(filters.decode.utf8(current_score))
        __M_writer(u'"\n     data-problem-total-possible="')
        __M_writer(filters.decode.utf8(total_possible))
        __M_writer(u'"\n     data-attempts-used="')
        __M_writer(filters.decode.utf8(attempts_used))
        __M_writer(u'"\n     data-content="')
        __M_writer(filters.html_escape(filters.decode.utf8(content)))
        __M_writer(u'"\n     data-graded="')
        __M_writer(filters.decode.utf8(graded))
        __M_writer(
            u'">\n    <p class="loading-spinner">\n        <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i>\n        <span class="sr">Loading&hellip;</span>\n    </p>\n</div>\n'
        )
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 39
0
def render_content(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:

        def content():
            return render_content(context)

        date_format = context.get('date_format', UNDEFINED)
        posts = context.get('posts', UNDEFINED)
        messages = context.get('messages', UNDEFINED)
        title = context.get('title', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'\n<article class="listpage">\n    <header>\n        <h1>')
        __M_writer(unicode(title))
        __M_writer(u'</h1>\n    </header>\n')
        if posts:
            __M_writer(u'    <ul class="postlist">\n')
            for post in posts:
                __M_writer(u'        <li><a href="')
                __M_writer(unicode(post.permalink()))
                __M_writer(u'" class="listtitle">')
                __M_writer(filters.html_escape(unicode(post.title())))
                __M_writer(u'</a> <time class="listdate" datetime="')
                __M_writer(unicode(post.formatted_date('webiso')))
                __M_writer(u'" title="')
                __M_writer(unicode(post.formatted_date(date_format)))
                __M_writer(u'">')
                __M_writer(unicode(post.formatted_date(date_format)))
                __M_writer(u'</time></li>\n')
            __M_writer(u'    </ul>\n')
        else:
            __M_writer(u'    <p>')
            __M_writer(unicode(messages("No posts found.")))
            __M_writer(u'</p>\n')
        __M_writer(u'</article>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 40
0
def render_js_extra(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:

        def js_extra():
            return render_js_extra(context)

        static = _mako_get_namespace(context, 'static')
        __M_writer = context.writer()
        __M_writer(u'\n')

        def ccall(caller):
            def body():
                data = context.get('data', UNDEFINED)
                __M_writer = context.writer()
                __M_writer(u'\n    var options = ')
                __M_writer(dump_js_escaped_json(data))
                __M_writer(u';\n    LearnerProfileFactory(options);\n')
                return ''

            return [body]

        context.caller_stack.nextcaller = runtime.Namespace(
            'caller', context, callables=ccall(__M_caller))
        try:
            __M_writer(
                filters.html_escape(
                    filters.decode.utf8(
                        static.require_module(
                            class_name=u'LearnerProfileFactory',
                            module_name=
                            u'learner_profile/js/learner_profile_factory'))))
        finally:
            context.caller_stack.nextcaller = None
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 41
0
def render_extra_head(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, u'arusahni')._populate(_import_ns, [u'*'])

        def extra_head():
            return render_extra_head(context)

        post = _import_ns.get('post', context.get('post', UNDEFINED))
        helper = _mako_get_namespace(context, 'helper')
        parent = _import_ns.get('parent', context.get('parent', UNDEFINED))
        __M_writer = context.writer()
        __M_writer(u'\n    ')
        __M_writer(unicode(parent.extra_head()))
        __M_writer(u'\n')
        if post.meta('keywords'):
            __M_writer(u'        <meta name="keywords" content="')
            __M_writer(filters.html_escape(unicode(post.meta('keywords'))))
            __M_writer(u'">\n')
        __M_writer(u'    <meta name="author" content="')
        __M_writer(unicode(post.author()))
        __M_writer(u'">\n    ')
        __M_writer(unicode(helper.open_graph_metadata(post)))
        __M_writer(u'\n    ')
        __M_writer(unicode(helper.twitter_card_information(post)))
        __M_writer(u'\n    ')
        __M_writer(unicode(helper.meta_translations(post)))
        __M_writer(u'\n')
        if post.description():
            __M_writer(
                u'        <meta name="description" itemprop="description" content="'
            )
            __M_writer(unicode(post.description()))
            __M_writer(u'">\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 42
0
def render_body(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        form = context.get('form', UNDEFINED)
        self = context.get('self', UNDEFINED)
        csrf_input = context.get('csrf_input', UNDEFINED)
        extra = context.get('extra', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(str(django_mako_plus.links(self)))
        __M_writer('\n\n<div class="form-container">\n    <form id="')
        __M_writer(str(form.form_id))
        __M_writer('" action="')
        __M_writer(str(form.form_action or ''))
        __M_writer('" method="')
        __M_writer(str(form.form_method))
        __M_writer('">\n\n')
        __M_writer('        ')
        __M_writer(str(csrf_input))
        __M_writer('\n\n')
        __M_writer('        ')
        __M_writer(str(form.as_p()))
        __M_writer('\n\n')
        if extra:
            __M_writer('            ')
            __M_writer(str(extra))
            __M_writer('\n')
        __M_writer('\n')
        if form.submit_text is not None:
            __M_writer(
                '            <p class="text-center"><button type="submit" class="btn btn-primary">'
            )
            __M_writer(filters.html_escape(str(form.submit_text)))
            __M_writer('</button></p>\n')
        __M_writer('\n    </form>\n</div>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 43
0
    def viewlog(self,
                min_level=logging.INFO,
                log_filter=None,
                log_search=None,
                max_lines=1000,
                log_period='one_day',
                text_view=None,
                **kwargs):
        """View the log given the specified filters."""
        # @TODO: Replace index with this or merge it so ?search=true or ?query={queryString} enables this "view"
        min_level = int(min_level)
        log_filter = log_filter if log_filter in log_name_filters else None

        t = PageTemplate(rh=self, filename='viewlogs.mako')

        period = log_periods.get(log_period)
        modification_time = datetime.now() - period if period else None
        data = (html_escape(line) for line in read_loglines(
            modification_time=modification_time,
            formatter=text_type,
            max_lines=max_lines,
            predicate=lambda l: filter_logline(l,
                                               min_level=min_level,
                                               thread_name=thread_names.get(
                                                   log_filter, log_filter),
                                               search_query=log_search)))

        if not text_view:
            return t.render(log_lines='\n'.join(data),
                            min_level=min_level,
                            log_name_filters=log_name_filters,
                            log_filter=log_filter,
                            log_search=log_search,
                            log_period=log_period,
                            controller='errorlogs',
                            action='viewlogs')
        else:
            return '<br/>'.join(data)
Exemplo n.º 44
0
def render_html_title(context):
    __M_caller = context.caller_stack._push_frame()
    try:
        messages = context.get('messages', UNDEFINED)
        link = context.get('link', UNDEFINED)
        title = context.get('title', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'\n    <h1 class="p-name" itemprop="headline name">')
        # SOURCE LINE 3
        __M_writer(filters.html_escape(unicode(title)))
        __M_writer(u'</h1>\n')
        # SOURCE LINE 4
        if link:
            # SOURCE LINE 5
            __M_writer(u"            <p><a href='")
            __M_writer(unicode(link))
            __M_writer(u"'>")
            __M_writer(unicode(messages("Original site")))
            __M_writer(u'</a></p>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 45
0
def render_render_item_header(context, item):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x7f313c4cda10')._populate(
            _import_ns, [u'*'])
        _mako_get_namespace(context, '__anon_0x7f313c4cd310')._populate(
            _import_ns, [
                u'render_individual_tagging_element',
                u'render_community_tagging_element'
            ])
        get_item_name = _import_ns.get('get_item_name',
                                       context.get('get_item_name', UNDEFINED))
        get_class_display_name = _import_ns.get(
            'get_class_display_name',
            context.get('get_class_display_name', UNDEFINED))
        hasattr = _import_ns.get('hasattr', context.get('hasattr', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 167
        __M_writer(u'\n    <h3>Galaxy ')
        # SOURCE LINE 168
        __M_writer(unicode(get_class_display_name(item.__class__)))
        __M_writer(u" '")
        __M_writer(filters.html_escape(unicode(get_item_name(item))))
        __M_writer(u"'</h3>\n")
        # SOURCE LINE 169
        if hasattr(item, "annotation") and item.annotation is not None:
            # SOURCE LINE 170
            __M_writer(u'        <div class="annotation">Annotation: ')
            __M_writer(unicode(item.annotation))
            __M_writer(u'</div>\n')
            pass
        # SOURCE LINE 172
        __M_writer(u'    <hr/>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 46
0
def render_js_extra(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x7f4938752a50')._populate(
            _import_ns, [u'login_query'])

        def js_extra():
            return render_js_extra(context)

        static = _mako_get_namespace(context, 'static')
        __M_writer = context.writer()
        __M_writer(u'\n    ')

        def ccall(caller):
            def body():
                __M_writer = context.writer()
                __M_writer(u'\n    HeaderFactory();\n    ')
                return ''

            return [body]

        context.caller_stack.nextcaller = runtime.Namespace(
            'caller', context, callables=ccall(__M_caller))
        try:
            __M_writer(
                filters.html_escape(
                    filters.decode.utf8(
                        static.require_module(
                            class_name=u'HeaderFactory',
                            module_name=u'js/header_factory'))))
        finally:
            context.caller_stack.nextcaller = None
        __M_writer(u'\n    ')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 47
0
def render_extra_head(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:

        def extra_head():
            return render_extra_head(context)

        post_helper = _mako_get_namespace(context, 'post_helper')
        post = context.get('post', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 5
        __M_writer(u'\n')
        # SOURCE LINE 6
        __M_writer(unicode(post_helper.twitter_card_information(post)))
        __M_writer(u'\n')
        # SOURCE LINE 7
        if post.meta('keywords'):
            # SOURCE LINE 8
            __M_writer(u'    <meta name="keywords" content="')
            __M_writer(filters.html_escape(unicode(post.meta('keywords'))))
            __M_writer(u'"/>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 48
0
def render_render_openid_form(context,redirect,auto_associate,openid_providers):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x7f29582d45d0')._populate(_import_ns, [u'render_msg'])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        __M_writer = context.writer()
        __M_writer(u'\n    <div class="toolForm">\n        <div class="toolFormTitle">OpenID Login</div>\n        <form name="openid" id="openid" action="')
        __M_writer(unicode(h.url_for( controller='user', action='openid_auth' )))
        __M_writer(u'" method="post" target="_parent" >\n            <div class="form-row">\n                <label>OpenID URL:</label>\n                <input type="text" name="openid_url" size="60" style="background-image:url(\'')
        __M_writer(unicode(h.url_for( '/static/images/openid-16x16.gif' )))
        __M_writer(u'\' ); background-repeat: no-repeat; padding-right: 20px; background-position: 99% 50%;"/>\n                <input type="hidden" name="redirect" value="')
        __M_writer(filters.html_escape(unicode(redirect )))
        __M_writer(u'" size="40"/>\n            </div>\n            <div class="form-row">\n                Or, authenticate with your <select name="openid_provider">\n')
        for provider in openid_providers:
            __M_writer(u'                    <option value="')
            __M_writer(unicode(provider.id))
            __M_writer(u'">')
            __M_writer(unicode(provider.name))
            __M_writer(u'</option>\n')
        __M_writer(u'                </select> account.\n            </div>\n            <div class="form-row">\n                <input type="submit" name="login_button" value="Login"/>\n            </div>\n        </form>\n    </div>\n\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 49
0
def render_center_panel(context):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x7f5a30573590')._populate(
            _import_ns, [u'render_individual_tagging_element'])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        stored = _import_ns.get('stored', context.get('stored', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 354
        __M_writer(
            u'\n\n    <div class="unified-panel-header" unselectable="on">\n        <div class="unified-panel-header-inner" style="float: right">\n            <a id="workflow-options-button" class="panel-header-button" href="#"><span class="fa fa-cog"></span></a>\n        </div>\n        <div class="unified-panel-header-inner">\n            Workflow Canvas | '
        )
        # SOURCE LINE 361
        __M_writer(filters.html_escape(unicode(h.to_unicode(stored.name))))
        __M_writer(
            u'\n        </div>\n    </div>\n    <div class="unified-panel-body">\n        <div id="canvas-viewport" style="width: 100%; height: 100%; position: absolute; overflow: hidden; background: #EEEEEE; background: white url('
        )
        # SOURCE LINE 365
        __M_writer(unicode(h.url_for('/static/images/light_gray_grid.gif')))
        __M_writer(
            u') repeat;">\n            <div id="canvas-container" style="position: absolute; width: 100%; height: 100%;"></div>\n        </div>\n        <div id="overview-border" style="position: absolute; width: 150px; height: 150px; right: 20000px; bottom: 0px; border-top: solid gray 1px; border-left: solid grey 1px; padding: 7px 0 0 7px; background: #EEEEEE no-repeat url('
        )
        # SOURCE LINE 368
        __M_writer(unicode(h.url_for('/static/images/resizable.png')))
        __M_writer(
            u'); z-index: 20000; overflow: hidden; max-width: 300px; max-height: 300px; min-width: 50px; min-height: 50px">\n            <div style="position: relative; overflow: hidden; width: 100%; height: 100%; border-top: solid gray 1px; border-left: solid grey 1px;">\n                <div id="overview" style="position: absolute;">\n                    <canvas width="0" height="0" style="background: white; width: 100%; height: 100%;" id="overview-canvas"></canvas>\n                    <div id="overview-viewport" style="position: absolute; width: 0px; height: 0px; border: solid blue 1px; z-index: 10;"></div>\n                </div>\n            </div>\n        </div>\n        <div id=\'workflow-parameters-box\' style="display:none; position: absolute; /*width: 150px; height: 150px;*/ right: 0px; top: 0px; border-bottom: solid gray 1px; border-left: solid grey 1px; padding: 7px; background: #EEEEEE; z-index: 20000; overflow: hidden; max-width: 300px; max-height: 300px; /*min-width: 50px; min-height: 50px*/">\n            <div style="margin-bottom:5px;"><b>Workflow Parameters</b></div>\n            <div id="workflow-parameters-container">\n            </div>\n        </div>\n        <div id="close-viewport" style="border-left: 1px solid #999; border-top: 1px solid #999; background: #ddd url('
        )
        # SOURCE LINE 381
        __M_writer(unicode(h.url_for('/static/images/overview_arrows.png')))
        __M_writer(
            u') 12px 0px; position: absolute; right: 0px; bottom: 0px; width: 12px; height: 12px; z-index: 25000;"></div>\n    </div>\n\n'
        )
        return ''
    finally:
        context.caller_stack._pop_frame()
def render_comment_form(context,url,title,identifier):
    __M_caller = context.caller_stack._push_frame()
    try:
        comment_system_id = context.get('comment_system_id', UNDEFINED)
        utterances_config = context.get('utterances_config', UNDEFINED)
        __M_writer = context.writer()
        __M_writer('\n')
        if comment_system_id:
            __M_writer('        <div data-title="')
            __M_writer(filters.html_escape(str(title)))
            __M_writer('" id="utterances-thread"></div>\n        <script src="https://utteranc.es/client.js" repo="')
            __M_writer(str(comment_system_id))
            __M_writer('"\n')
            if utterances_config:
                for k, v in utterances_config.items():
                    __M_writer('        ')
                    __M_writer(str(k))
                    __M_writer('="')
                    __M_writer(str(v))
                    __M_writer('"\n')
            __M_writer('        ></script>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 51
0
    def form_begin(func, attr={}, **kwattr):

        all_attr = {}
        all_attr.update(attr)
        all_attr.update(kwattr)

        if func:
            target = "%s.%s" % (func.__self__.__class__._public_id,
                                func.action_hash)
            form_id = all_attr.pop('id', None)
        else:
            target = None
            form_id = all_attr.pop('id', None) or ''

        #
        # enctype: "multipart/form-data"
        all_attr.setdefault("enctype", "application/x-www-form-urlencoded")
        all_attr.setdefault("action", "")
        all_attr.setdefault("method", "post")

        if form_id:
            all_attr.setdefault("name", form_id)
            all_attr.setdefault("id", form_id)

        if not isinstance(all_attr['action'], str):
            all_attr['action'] = all_attr['action']()

        all_attr = " ".join([
            '%s="%s"' % (k, filters.html_escape(v))
            for k, v in list(all_attr.items())
        ])

        target_input = """<input type="hidden" name="__action_target" value="{}" />""".format(
            target) if target else ""

        return Markup("""<form {}>{}""".format(all_attr, target_input))
Exemplo n.º 52
0
def render_html_headstart(context):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, 'notes')._populate(_import_ns, ['*'])
        lang = _import_ns.get('lang', context.get('lang', UNDEFINED))
        blog_title = _import_ns.get('blog_title', context.get('blog_title', UNDEFINED))
        nextlink = _import_ns.get('nextlink', context.get('nextlink', UNDEFINED))
        use_base_tag = _import_ns.get('use_base_tag', context.get('use_base_tag', UNDEFINED))
        mathjax_config = _import_ns.get('mathjax_config', context.get('mathjax_config', UNDEFINED))
        comment_system = _import_ns.get('comment_system', context.get('comment_system', UNDEFINED))
        description = _import_ns.get('description', context.get('description', UNDEFINED))
        def html_stylesheets():
            return render_html_stylesheets(context)
        twitter_card = _import_ns.get('twitter_card', context.get('twitter_card', UNDEFINED))
        use_open_graph = _import_ns.get('use_open_graph', context.get('use_open_graph', UNDEFINED))
        use_cdn = _import_ns.get('use_cdn', context.get('use_cdn', UNDEFINED))
        def html_feedlinks():
            return render_html_feedlinks(context)
        title = _import_ns.get('title', context.get('title', UNDEFINED))
        prevlink = _import_ns.get('prevlink', context.get('prevlink', UNDEFINED))
        theme_color = _import_ns.get('theme_color', context.get('theme_color', UNDEFINED))
        abs_link = _import_ns.get('abs_link', context.get('abs_link', UNDEFINED))
        permalink = _import_ns.get('permalink', context.get('permalink', UNDEFINED))
        is_rtl = _import_ns.get('is_rtl', context.get('is_rtl', UNDEFINED))
        favicons = _import_ns.get('favicons', context.get('favicons', UNDEFINED))
        comment_system_id = _import_ns.get('comment_system_id', context.get('comment_system_id', UNDEFINED))
        url_replacer = _import_ns.get('url_replacer', context.get('url_replacer', UNDEFINED))
        extra_head_data = _import_ns.get('extra_head_data', context.get('extra_head_data', UNDEFINED))
        __M_writer = context.writer()
        __M_writer('\n<!DOCTYPE html>\n<html\n')
        if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) or (comment_system == 'facebook'):
            __M_writer("prefix='")
            if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']):
                __M_writer('og: http://ogp.me/ns# ')
            if use_open_graph:
                __M_writer('article: http://ogp.me/ns/article# ')
            if comment_system == 'facebook':
                __M_writer('fb: http://ogp.me/ns/fb# ')
            __M_writer("'")
        if is_rtl:
            __M_writer('dir="rtl" ')
        __M_writer('lang="')
        __M_writer(str(lang))
        __M_writer('">\n    <head>\n    <meta charset="utf-8">\n')
        if use_base_tag:
            __M_writer('    <base href="')
            __M_writer(str(abs_link(permalink)))
            __M_writer('">\n')
        if description:
            __M_writer('    <meta name="description" content="')
            __M_writer(filters.html_escape(str(description)))
            __M_writer('">\n')
        __M_writer('    <meta name="viewport" content="width=device-width, initial-scale=1">\n')
        if title == blog_title:
            __M_writer('        <title>')
            __M_writer(filters.html_escape(str(blog_title)))
            __M_writer('</title>\n')
        else:
            __M_writer('        <title>')
            __M_writer(filters.html_escape(str(title)))
            __M_writer(' | ')
            __M_writer(filters.html_escape(str(blog_title)))
            __M_writer('</title>\n')
        __M_writer('\n    ')
        __M_writer(str(html_stylesheets()))
        __M_writer('\n    <meta content="')
        __M_writer(str(theme_color))
        __M_writer('" name="theme-color">\n    ')
        __M_writer(str(html_feedlinks()))
        __M_writer('\n    <link rel="canonical" href="')
        __M_writer(str(abs_link(permalink)))
        __M_writer('">\n\n')
        if favicons:
            for name, file, size in favicons:
                __M_writer('            <link rel="')
                __M_writer(str(name))
                __M_writer('" href="')
                __M_writer(str(file))
                __M_writer('" sizes="')
                __M_writer(str(size))
                __M_writer('"/>\n')
        __M_writer('\n')
        if comment_system == 'facebook':
            __M_writer('        <meta property="fb:app_id" content="')
            __M_writer(str(comment_system_id))
            __M_writer('">\n')
        __M_writer('\n')
        if prevlink:
            __M_writer('        <link rel="prev" href="')
            __M_writer(str(prevlink))
            __M_writer('" type="text/html">\n')
        if nextlink:
            __M_writer('        <link rel="next" href="')
            __M_writer(str(nextlink))
            __M_writer('" type="text/html">\n')
        __M_writer('\n    ')
        __M_writer(str(mathjax_config))
        __M_writer('\n')
        if use_cdn:
            __M_writer('        <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->\n')
        else:
            __M_writer('        <!--[if lt IE 9]><script src="')
            __M_writer(str(url_replacer(permalink, '/assets/js/html5.js', lang)))
            __M_writer('"></script><![endif]-->\n')
        __M_writer('\n    ')
        __M_writer(str(extra_head_data))
        __M_writer('\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 53
0
def render_html_post_header(context):
    __M_caller = context.caller_stack._push_frame()
    try:
        post = context.get('post', UNDEFINED)
        author_pages_generated = context.get('author_pages_generated',
                                             UNDEFINED)
        site_has_comments = context.get('site_has_comments', UNDEFINED)

        def html_title():
            return render_html_title(context)

        messages = context.get('messages', UNDEFINED)

        def html_translations(post):
            return render_html_translations(context, post)

        _link = context.get('_link', UNDEFINED)
        date_format = context.get('date_format', UNDEFINED)

        def html_sourcelink():
            return render_html_sourcelink(context)

        comments = _mako_get_namespace(context, 'comments')
        __M_writer = context.writer()
        __M_writer('\n    <header>\n        ')
        __M_writer(str(html_title()))
        __M_writer(
            '\n        <div class="metadata">\n            <p class="byline author vcard"><span class="byline-name fn" itemprop="author">\n'
        )
        if author_pages_generated:
            __M_writer('                    <a href="')
            __M_writer(str(_link('author', post.author())))
            __M_writer('">')
            __M_writer(filters.html_escape(str(post.author())))
            __M_writer('</a>\n')
        else:
            __M_writer('                    ')
            __M_writer(filters.html_escape(str(post.author())))
            __M_writer('\n')
        __M_writer(
            '            </span></p>\n            <p class="dateline"><a href="'
        )
        __M_writer(str(post.permalink()))
        __M_writer(
            '" rel="bookmark"><time class="published dt-published" datetime="')
        __M_writer(str(post.formatted_date('webiso')))
        __M_writer('" itemprop="datePublished" title="')
        __M_writer(filters.html_escape(str(post.formatted_date(date_format))))
        __M_writer('">')
        __M_writer(filters.html_escape(str(post.formatted_date(date_format))))
        __M_writer('</time></a></p>\n')
        if not post.meta('nocomments') and site_has_comments:
            __M_writer('                <p class="commentline">')
            __M_writer(
                str(comments.comment_link(post.permalink(), post._base_path)))
            __M_writer('\n')
        __M_writer('            ')
        __M_writer(str(html_sourcelink()))
        __M_writer('\n')
        if post.meta('link'):
            __M_writer('                    <p class="linkline"><a href="')
            __M_writer(str(post.meta('link')))
            __M_writer('">')
            __M_writer(str(messages("Original site")))
            __M_writer('</a></p>\n')
        __M_writer('        </div>\n        ')
        __M_writer(str(html_translations(post)))
        __M_writer('\n    </header>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 54
0
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        int = context.get('int', UNDEFINED)
        fieldset = context.get('fieldset', UNDEFINED)
        F_ = context.get('F_', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 2

        _ = F_
        _focus_rendered = False
        
        
        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['_focus_rendered','_'] if __M_key in __M_locals_builtin()]))
        # SOURCE LINE 5
        __M_writer(u'')
        # SOURCE LINE 6
        __M_writer(u'\n')
        # SOURCE LINE 7
        for error in fieldset.errors.get(None, []):
            # SOURCE LINE 8
            __M_writer(u'<div class="fieldset_error">\n  ')
            # SOURCE LINE 9
            __M_writer(escape(_(error)))
            __M_writer(u'\n</div>\n')
        # SOURCE LINE 12
        __M_writer(u'\n')
        # SOURCE LINE 13
        for field in fieldset.render_fields.itervalues():
            # SOURCE LINE 14
            if field.requires_label:
                # SOURCE LINE 15
                __M_writer(u'<div>\n  <label class="')
                # SOURCE LINE 16
                __M_writer(escape(field.is_required() and 'field_req' or 'field_opt'))
                __M_writer(u'" for="')
                __M_writer(escape(field.renderer.name))
                __M_writer(u'">')
                __M_writer(filters.html_escape(escape([field.label_text, fieldset.prettify(field.key)][int(field.label_text is None)])))
                __M_writer(u'</label>\n  ')
                # SOURCE LINE 17
                __M_writer(field.render())
                __M_writer(u'\n')
                # SOURCE LINE 18
                if 'instructions' in field.metadata:
                    # SOURCE LINE 19
                    __M_writer(u'  <span class="instructions">')
                    __M_writer(escape(field.metadata['instructions']))
                    __M_writer(u'</span>\n')
                # SOURCE LINE 21
                for error in field.errors:
                    # SOURCE LINE 22
                    __M_writer(u'  <span class="field_error">')
                    __M_writer(escape(_(error)))
                    __M_writer(u'</span>\n')
                # SOURCE LINE 24
                __M_writer(u'</div>\n\n')
                # SOURCE LINE 26
                if (fieldset.focus == field or fieldset.focus is True) and not _focus_rendered:
                    # SOURCE LINE 27
                    if not field.is_readonly():
                        # SOURCE LINE 28
                        __M_writer(u'<script type="text/javascript">\n//<![CDATA[\ndocument.getElementById("')
                        # SOURCE LINE 30
                        __M_writer(escape(field.renderer.name))
                        __M_writer(u'").focus();\n//]]>\n</script>\n')
                        # SOURCE LINE 33
                        _focus_rendered = True 
                        
                        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['_focus_rendered'] if __M_key in __M_locals_builtin()]))
                        __M_writer(u'')
                # SOURCE LINE 36
            else:
                # SOURCE LINE 37
                __M_writer(field.render())
                __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 55
0
def render_content(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context,
                            'feeds_translations')._populate(_import_ns, ['*'])

        def content():
            return render_content(context)

        tag = _import_ns.get('tag', context.get('tag', UNDEFINED))
        kind = _import_ns.get('kind', context.get('kind', UNDEFINED))
        subcategories = _import_ns.get('subcategories',
                                       context.get('subcategories', UNDEFINED))
        title = _import_ns.get('title', context.get('title', UNDEFINED))
        description = _import_ns.get('description',
                                     context.get('description', UNDEFINED))
        date_format = _import_ns.get('date_format',
                                     context.get('date_format', UNDEFINED))
        posts = _import_ns.get('posts', context.get('posts', UNDEFINED))
        feeds_translations = _mako_get_namespace(context, 'feeds_translations')
        messages = _import_ns.get('messages',
                                  context.get('messages', UNDEFINED))
        __M_writer = context.writer()
        __M_writer('\n<article class="tagpage">\n    <header>\n        <h1>')
        __M_writer(filters.html_escape(str(title)))
        __M_writer('</h1>\n')
        if description:
            __M_writer('            <p>')
            __M_writer(str(description))
            __M_writer('</p>\n')
        if subcategories:
            __M_writer('        ')
            __M_writer(str(messages('Subcategories:')))
            __M_writer('\n        <ul>\n')
            for name, link in subcategories:
                __M_writer('            <li><a href="')
                __M_writer(str(link))
                __M_writer('">')
                __M_writer(filters.html_escape(str(name)))
                __M_writer('</a></li>\n')
            __M_writer('        </ul>\n')
        __M_writer('        <div class="metadata">\n            ')
        __M_writer(str(feeds_translations.feed_link(tag, kind=kind)))
        __M_writer('\n        </div>\n        ')
        __M_writer(str(feeds_translations.translation_link(kind)))
        __M_writer('\n    </header>\n')
        if posts:
            __M_writer('        <ul class="postlist">\n')
            for post in posts:
                __M_writer('            <li><time class="listdate" datetime="')
                __M_writer(str(post.formatted_date('webiso')))
                __M_writer('" title="')
                __M_writer(
                    filters.html_escape(str(post.formatted_date(date_format))))
                __M_writer('">')
                __M_writer(
                    filters.html_escape(str(post.formatted_date(date_format))))
                __M_writer('</time> <a href="')
                __M_writer(str(post.permalink()))
                __M_writer('" class="listtitle">')
                __M_writer(filters.html_escape(str(post.title())))
                __M_writer('<a></li>\n')
            __M_writer('        </ul>\n')
        __M_writer('</article>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 56
0
def render_body(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        _import_ns = {}
        _mako_get_namespace(context, 'base')._populate(_import_ns, ['*'])
        _mako_get_namespace(context, 'notes')._populate(_import_ns, ['*'])
        show_sourcelink = _import_ns.get(
            'show_sourcelink', context.get('show_sourcelink', UNDEFINED))
        base = _mako_get_namespace(context, 'base')

        def content():
            return render_content(context._locals(__M_locals))

        blog_title = _import_ns.get('blog_title',
                                    context.get('blog_title', UNDEFINED))
        notes = _mako_get_namespace(context, 'notes')
        js_date_format = _import_ns.get(
            'js_date_format', context.get('js_date_format', UNDEFINED))
        post = _import_ns.get('post', context.get('post', UNDEFINED))
        annotations = _import_ns.get('annotations',
                                     context.get('annotations', UNDEFINED))
        momentjs_locales = _import_ns.get(
            'momentjs_locales', context.get('momentjs_locales', UNDEFINED))
        date_fanciness = _import_ns.get(
            'date_fanciness', context.get('date_fanciness', UNDEFINED))
        body_end = _import_ns.get('body_end',
                                  context.get('body_end', UNDEFINED))
        lang = _import_ns.get('lang', context.get('lang', UNDEFINED))

        def extra_head():
            return render_extra_head(context._locals(__M_locals))

        abs_link = _import_ns.get('abs_link',
                                  context.get('abs_link', UNDEFINED))
        messages = _import_ns.get('messages',
                                  context.get('messages', UNDEFINED))
        search_form = _import_ns.get('search_form',
                                     context.get('search_form', UNDEFINED))

        def belowtitle():
            return render_belowtitle(context._locals(__M_locals))

        len = _import_ns.get('len', context.get('len', UNDEFINED))
        _link = _import_ns.get('_link', context.get('_link', UNDEFINED))
        content_footer = _import_ns.get(
            'content_footer', context.get('content_footer', UNDEFINED))

        def extra_js():
            return render_extra_js(context._locals(__M_locals))

        template_hooks = _import_ns.get(
            'template_hooks', context.get('template_hooks', UNDEFINED))
        logo_url = _import_ns.get('logo_url',
                                  context.get('logo_url', UNDEFINED))

        def sourcelink():
            return render_sourcelink(context._locals(__M_locals))

        show_blog_title = _import_ns.get(
            'show_blog_title', context.get('show_blog_title', UNDEFINED))
        translations = _import_ns.get('translations',
                                      context.get('translations', UNDEFINED))
        set_locale = _import_ns.get('set_locale',
                                    context.get('set_locale', UNDEFINED))
        __M_writer = context.writer()
        __M_writer('\n')
        __M_writer('\n')
        __M_writer(str(set_locale(lang)))
        __M_writer('\n')
        __M_writer(str(base.html_headstart()))
        __M_writer('\n')
        if 'parent' not in context._data or not hasattr(
                context._data['parent'], 'extra_head'):
            context['self'].extra_head(**pageargs)

        __M_writer('\n')
        __M_writer(str(template_hooks['extra_head']()))
        __M_writer(
            '\n</head>\n<body>\n<a href="#content" class="sr-only sr-only-focusable">'
        )
        __M_writer(str(messages("Skip to main content")))
        __M_writer(
            '</a>\n\n<!-- Menubar -->\n\n<nav class="navbar navbar-inverse navbar-static-top">\n    <div class="container"><!-- This keeps the margins nice -->\n        <div class="navbar-header">\n            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-navbar" aria-controls="bs-navbar" aria-expanded="false">\n            <span class="sr-only">'
        )
        __M_writer(str(messages("Toggle navigation")))
        __M_writer(
            '</span>\n            <span class="icon-bar"></span>\n            <span class="icon-bar"></span>\n            <span class="icon-bar"></span>\n            </button>\n            <a class="navbar-brand" href="'
        )
        __M_writer(str(abs_link(_link("root", None, lang))))
        __M_writer('">\n')
        if logo_url:
            __M_writer('                <img src="')
            __M_writer(str(logo_url))
            __M_writer('" alt="')
            __M_writer(filters.html_escape(str(blog_title)))
            __M_writer('" id="logo">\n')
        __M_writer('\n')
        if show_blog_title:
            __M_writer('                <span id="blog-title">')
            __M_writer(filters.html_escape(str(blog_title)))
            __M_writer('</span>\n')
        __M_writer(
            '            </a>\n        </div><!-- /.navbar-header -->\n        <div class="collapse navbar-collapse" id="bs-navbar" aria-expanded="false">\n            <ul class="nav navbar-nav">\n                '
        )
        __M_writer(str(base.html_navigation_links()))
        __M_writer('\n                ')
        __M_writer(str(template_hooks['menu']()))
        __M_writer('\n            </ul>\n')
        if search_form:
            __M_writer('                ')
            __M_writer(str(search_form))
            __M_writer('\n')
        __M_writer(
            '\n            <ul class="nav navbar-nav navbar-right">\n                '
        )
        if 'parent' not in context._data or not hasattr(
                context._data['parent'], 'belowtitle'):
            context['self'].belowtitle(**pageargs)

        __M_writer('\n')
        if show_sourcelink:
            __M_writer('                    ')
            if 'parent' not in context._data or not hasattr(
                    context._data['parent'], 'sourcelink'):
                context['self'].sourcelink(**pageargs)

            __M_writer('\n')
        __M_writer('                ')
        __M_writer(str(template_hooks['menu_alt']()))
        __M_writer(
            '\n            </ul>\n        </div><!-- /.navbar-collapse -->\n    </div><!-- /.container -->\n</nav>\n\n<!-- End of Menubar -->\n\n<div class="container" id="content" role="main">\n    <div class="body-content">\n        <!--Body content-->\n        <div class="row">\n            '
        )
        __M_writer(str(template_hooks['page_header']()))
        __M_writer('\n            ')
        if 'parent' not in context._data or not hasattr(
                context._data['parent'], 'content'):
            context['self'].content(**pageargs)

        __M_writer(
            '\n        </div>\n        <!--End of body content-->\n\n        <footer id="footer">\n            '
        )
        __M_writer(str(content_footer))
        __M_writer('\n            ')
        __M_writer(str(template_hooks['page_footer']()))
        __M_writer('\n        </footer>\n    </div>\n</div>\n\n')
        __M_writer(str(base.late_load_js()))
        __M_writer(
            '\n    <script>$(\'a.image-reference:not(.islink) img:not(.islink)\').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>\n    <!-- fancy dates -->\n    <script>\n    moment.locale("'
        )
        __M_writer(str(momentjs_locales[lang]))
        __M_writer('");\n    fancydates(')
        __M_writer(str(date_fanciness))
        __M_writer(', ')
        __M_writer(str(js_date_format))
        __M_writer(');\n    </script>\n    <!-- end fancy dates -->\n    ')
        if 'parent' not in context._data or not hasattr(
                context._data['parent'], 'extra_js'):
            context['self'].extra_js(**pageargs)

        __M_writer('\n')
        if annotations and post and not post.meta('noannotations'):
            __M_writer('        ')
            __M_writer(str(notes.code()))
            __M_writer('\n')
        elif not annotations and post and post.meta('annotations'):
            __M_writer('        ')
            __M_writer(str(notes.code()))
            __M_writer('\n')
        __M_writer(str(body_end))
        __M_writer('\n')
        __M_writer(str(template_hooks['body_end']()))
        __M_writer('\n</body>\n</html>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 57
0
def render_right_panel(context):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x7fa52c605a50')._populate(
            _import_ns, [u'*'])
        _mako_get_namespace(context, '__anon_0x7fa52c605a10')._populate(
            _import_ns, [
                u'render_individual_tagging_element',
                u'render_community_tagging_element'
            ])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        len = _import_ns.get('len', context.get('len', UNDEFINED))
        render_community_tagging_element = _import_ns.get(
            'render_community_tagging_element',
            context.get('render_community_tagging_element', UNDEFINED))
        item = _import_ns.get('item', context.get('item', UNDEFINED))
        get_class_display_name = _import_ns.get(
            'get_class_display_name',
            context.get('get_class_display_name', UNDEFINED))
        render_individual_tagging_element = _import_ns.get(
            'render_individual_tagging_element',
            context.get('render_individual_tagging_element', UNDEFINED))
        trans = _import_ns.get('trans', context.get('trans', UNDEFINED))
        __M_writer = context.writer()
        __M_writer(
            u'\n    <div class="unified-panel-header" unselectable="on">\n        <div class="unified-panel-header-inner">\n            About this '
        )
        __M_writer(unicode(get_class_display_name(item.__class__)))
        __M_writer(
            u'\n        </div>\n    </div>\n\n    <div class="unified-panel-body">\n        <div style="overflow: auto; height: 100%;">\n            <div style="padding: 10px;">\n                <h4>Author</h4>\n\n                <p>'
        )
        __M_writer(filters.html_escape(unicode(item.history.user.username)))
        __M_writer(
            u'</p>\n\n                <div><img src="https://secure.gravatar.com/avatar/'
        )
        __M_writer(unicode(h.md5(item.history.user.email)))
        __M_writer(u'?d=identicon&s=150"></div>\n\n')
        __M_writer(u'\n')
        __M_writer(u'\n')
        __M_writer(
            u'                <p>\n                <h4>Tags</h4>\n                <p>\n'
        )
        __M_writer(
            u'                <div>\n                    Community:\n                    '
        )
        __M_writer(
            unicode(
                render_community_tagging_element(
                    tagged_item=item,
                    tag_click_fn='community_tag_click',
                    use_toggle_link=False)))
        __M_writer(u'\n')
        if len(item.tags) == 0:
            __M_writer(u'                        none\n')
        __M_writer(u'                </div>\n')
        __M_writer(
            u'                <p>\n                <div>\n                    Yours:\n                    '
        )
        __M_writer(
            unicode(
                render_individual_tagging_element(
                    user=trans.get_user(),
                    tagged_item=item,
                    elt_context='view.mako',
                    use_toggle_link=False,
                    tag_click_fn='community_tag_click')))
        __M_writer(
            u'\n                </div>\n            </div>\n        </div>\n    </div>\n\n'
        )
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 58
0
def render_body(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x7f49385f73d0')._populate(
            _import_ns, [u'login_query'])
        marketing_link = _import_ns.get(
            'marketing_link', context.get('marketing_link', UNDEFINED))
        settings = _import_ns.get('settings',
                                  context.get('settings', UNDEFINED))
        combined_login_and_register = _import_ns.get(
            'combined_login_and_register',
            context.get('combined_login_and_register', UNDEFINED))
        course = _import_ns.get('course', context.get('course', UNDEFINED))
        static = _mako_get_namespace(context, 'static')
        login_query = _import_ns.get('login_query',
                                     context.get('login_query', UNDEFINED))
        __M_writer = context.writer()
        __M_writer(u'\n')
        __M_writer(u'\n\n')
        __M_writer(u'\n')
        __M_writer(u'\n\n')
        __M_writer(u'\n\n')

        mktg_site_enabled = static.get_value(
            'ENABLE_MKTG_SITE', settings.FEATURES.get('ENABLE_MKTG_SITE',
                                                      False))
        courses_are_browsable = settings.FEATURES.get('COURSES_ARE_BROWSABLE')
        allows_login = not settings.FEATURES[
            'DISABLE_LOGIN_BUTTON'] and not combined_login_and_register
        can_discover_courses = settings.FEATURES.get('ENABLE_COURSE_DISCOVERY')
        restrict_enroll_for_course = course and settings.FEATURES.get(
            'RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain
        allow_public_account_creation = static.get_value(
            'ALLOW_PUBLIC_ACCOUNT_CREATION',
            settings.FEATURES.get('ALLOW_PUBLIC_ACCOUNT_CREATION'))

        __M_locals_builtin_stored = __M_locals_builtin()
        __M_locals.update(
            __M_dict_builtin([
                (__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in [
                    'restrict_enroll_for_course', 'can_discover_courses',
                    'mktg_site_enabled', 'allow_public_account_creation',
                    'courses_are_browsable', 'allows_login'
                ] if __M_key in __M_locals_builtin_stored
            ]))
        __M_writer(u'\n<nav class="nav-links" aria-label=')
        __M_writer(
            filters.html_escape(filters.decode.utf8(_("Supplemental Links"))))
        __M_writer(u'>\n  <div class="main">\n')
        if mktg_site_enabled:
            __M_writer(
                u'    <div class="mobile-nav-item hidden-mobile nav-item">\n      <a href="'
            )
            __M_writer(
                filters.html_escape(
                    filters.decode.utf8(marketing_link('HOW_IT_WORKS'))))
            __M_writer(u'">')
            __M_writer(
                filters.html_escape(filters.decode.utf8(_("How it Works"))))
            __M_writer(u'</a>\n    </div>\n')
            if courses_are_browsable:
                __M_writer(
                    u'      <div class="mobile-nav-item hidden-mobile nav-item">\n        <a href="'
                )
                __M_writer(
                    filters.html_escape(
                        filters.decode.utf8(marketing_link('COURSES'))))
                __M_writer(u'">')
                __M_writer(
                    filters.html_escape(filters.decode.utf8(_("Courses"))))
                __M_writer(u'</a>\n      </div>\n')
            __M_writer(
                u'    <div class="mobile-nav-item hidden-mobile nav-item">\n      <a href="'
            )
            __M_writer(
                filters.html_escape(
                    filters.decode.utf8(marketing_link('SCHOOLS'))))
            __M_writer(u'">')
            __M_writer(filters.html_escape(filters.decode.utf8(_("Schools"))))
            __M_writer(u'</a>\n    </div>\n')
        if allows_login:
            if can_discover_courses:
                __M_writer(
                    u'      <div class="mobile-nav-item hidden-mobile nav-item">\n        <a href="/courses">'
                )
                __M_writer(
                    filters.html_escape(
                        filters.decode.utf8(_('Explore courses'))))
                __M_writer(u'</a>\n      </div>\n')
        __M_writer(u'  </div>\n  <div class="secondary">\n    <div>\n')
        if allows_login:
            if restrict_enroll_for_course:
                __M_writer(
                    u'          <div class="mobile-nav-item hidden-mobile nav-item">\n            <a class="register-btn btn" href="'
                )
                __M_writer(
                    filters.html_escape(
                        filters.decode.utf8(
                            reverse('course-specific-register',
                                    args=[text_type(course.id)]))))
                __M_writer(u'">')
                __M_writer(
                    filters.html_escape(filters.decode.utf8(_("Register"))))
                __M_writer(
                    u'</a>\n          </div>\n          <div class="mobile-nav-item hidden-mobile nav-item">\n            <a class="sign-in-btn btn" href="'
                )
                __M_writer(
                    filters.html_escape(
                        filters.decode.utf8(
                            reverse('course-specific-login',
                                    args=[text_type(course.id)]))))
                __M_writer(
                    filters.html_escape(filters.decode.utf8(login_query())))
                __M_writer(u'">')
                __M_writer(
                    filters.html_escape(filters.decode.utf8(_("Sign in"))))
                __M_writer(u'</a>\n          </div>\n')
            else:
                if allow_public_account_creation:
                    __M_writer(
                        u'            <div class="mobile-nav-item hidden-mobile nav-item">\n              <a class="register-btn btn" href="/register'
                    )
                    __M_writer(
                        filters.html_escape(filters.decode.utf8(
                            login_query())))
                    __M_writer(u'">')
                    __M_writer(
                        filters.html_escape(filters.decode.utf8(
                            _("Register"))))
                    __M_writer(u'</a>\n            </div>\n')
                __M_writer(
                    u'          <div class="mobile-nav-item hidden-mobile nav-item">\n            <a class="sign-in-btn btn" href="/login'
                )
                __M_writer(
                    filters.html_escape(filters.decode.utf8(login_query())))
                __M_writer(u'">')
                __M_writer(
                    filters.html_escape(filters.decode.utf8(_("Sign in"))))
                __M_writer(u'</a>\n          </div>\n')
        __M_writer(u'    </div>\n  </div>\n</nav>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 59
0
def render_content(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, u'ui')._populate(_import_ns, [u'bar'])
        folders = _import_ns.get('folders', context.get('folders', UNDEFINED))
        permalink = _import_ns.get('permalink',
                                   context.get('permalink', UNDEFINED))
        photo_array = _import_ns.get('photo_array',
                                     context.get('photo_array', UNDEFINED))
        title = _import_ns.get('title', context.get('title', UNDEFINED))
        comments = _mako_get_namespace(context, 'comments')

        def content():
            return render_content(context)

        ui = _mako_get_namespace(context, 'ui')
        crumbs = _import_ns.get('crumbs', context.get('crumbs', UNDEFINED))
        site_has_comments = _import_ns.get(
            'site_has_comments', context.get('site_has_comments', UNDEFINED))
        enable_comments = _import_ns.get(
            'enable_comments', context.get('enable_comments', UNDEFINED))
        post = _import_ns.get('post', context.get('post', UNDEFINED))
        __M_writer = context.writer()
        __M_writer(u'\n    ')
        __M_writer(unicode(ui.bar(crumbs)))
        __M_writer(u'\n')
        if title:
            __M_writer(u'    <h1>')
            __M_writer(filters.html_escape(unicode(title)))
            __M_writer(u'</h1>\n')
        if post:
            __M_writer(u'    <p>\n        ')
            __M_writer(unicode(post.text()))
            __M_writer(u'\n    </p>\n')
        if folders:
            __M_writer(u'    <ul>\n')
            for folder, ftitle in folders:
                __M_writer(u'        <li><a href="')
                __M_writer(unicode(folder))
                __M_writer(
                    u'"><i class="glyphicon glyphicon-folder-open"></i>&nbsp;')
                __M_writer(unicode(ftitle))
                __M_writer(u'</a></li>\n')
            __M_writer(u'    </ul>\n')
        __M_writer(u'\n<div id="gallery_container"></div>\n')
        if photo_array:
            __M_writer(u'<noscript>\n<ul class="thumbnails">\n')
            for image in photo_array:
                __M_writer(u'        <li><a href="')
                __M_writer(unicode(image['url']))
                __M_writer(u'" class="thumbnail image-reference" title="')
                __M_writer(unicode(image['title']))
                __M_writer(u'">\n            <img src="')
                __M_writer(unicode(image['url_thumb']))
                __M_writer(u'" alt="')
                __M_writer(unicode(image['title']))
                __M_writer(u'" /></a>\n')
            __M_writer(u'</ul>\n</noscript>\n')
        if site_has_comments and enable_comments:
            __M_writer(unicode(comments.comment_form(None, permalink, title)))
            __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()
Exemplo n.º 60
0
def render_content(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        def content():
            return render_content(context)
        static = _mako_get_namespace(context, 'static')
        settings = context.get('settings', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'\n\n<div class="wrapper-content-header wrapper">\n  <section class="content content-header">\n    <header>\n      <h1><span class="wrapper-text-welcome">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Welcome to {studio_name}").format(
          studio_name=settings.STUDIO_NAME
      ))))
        __M_writer(u'</span></h1>\n      <p class="tagline">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("{studio_name} helps manage your online courses, so you can focus on teaching them").format(
        studio_name=settings.STUDIO_SHORT_NAME
      ))))
        __M_writer(u'</p>\n    </header>\n  </section>\n</div>\n\n<div class="wrapper-content-features wrapper">\n  <section class="content content-features">\n    <header>\n      <h2 class="sr">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("{studio_name}'s Many Features").format(studio_name=settings.STUDIO_SHORT_NAME))))
        __M_writer(u'</h2>\n    </header>\n\n    <ol class="list-features">\n      <li class="feature">\n        <figure class="img zoom">\n          <a rel="modal" href="#hiw-feature1">\n            <img src="')
        __M_writer(filters.html_escape(filters.decode.utf8(static.url("images/thumb-hiw-feature1.png"))))
        __M_writer(u'" alt="')
        __M_writer(filters.html_escape(filters.decode.utf8(_('{studio_name} Helps You Keep Your Courses Organized').format(studio_name=settings.STUDIO_SHORT_NAME))))
        __M_writer(u'" />\n            <figcaption class="sr">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("{studio_name} Helps You Keep Your Courses Organized").format(studio_name=settings.STUDIO_NAME))))
        __M_writer(u'</figcaption>\n            <span class="action-zoom">\n              <span class="icon fa fa-search-plus" aria-hidden="true"></span><span class="sr">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Enlarge image"))))
        __M_writer(u'</span>\n            </span>\n          </a>\n        </figure>\n\n        <div class="copy">\n          <h3>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Keeping Your Course Organized"))))
        __M_writer(u'</h3>\n          <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(Text(_("The backbone of your course is how it is organized. {studio_name} offers an {strong_start}Outline{strong_end} editor, providing a simple hierarchy and easy drag and drop to help you and your students stay organized.")).format(
                  studio_name=settings.STUDIO_SHORT_NAME,
                  strong_start=HTML('<strong>'),
                  strong_end=HTML('</strong>')
              ))))
        __M_writer(u'</p>\n\n          <ul class="list-proofpoints">\n            <li class="proofpoint">\n              <h4 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Simple Organization For Content"))))
        __M_writer(u'</h4>\n              <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(Text(_("{studio_name} uses a simple hierarchy of {strong_start}sections{strong_end} and {strong_start}subsections{strong_end} to organize your content.")).format(
                    studio_name=settings.STUDIO_SHORT_NAME,
                    strong_start=HTML('<strong>'),
                    strong_end=HTML('</strong>')
                  ))))
        __M_writer(u'</p>\n            </li>\n\n            <li class="proofpoint">\n              <h4 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Change Your Mind Anytime"))))
        __M_writer(u'</h4>\n              <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Draft your outline and build content anywhere. Simple drag and drop tools let you reorganize quickly."))))
        __M_writer(u'</p>\n            </li>\n\n            <li class="proofpoint">\n              <h4 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Go A Week Or A Semester At A Time"))))
        __M_writer(u'</h4>\n              <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(Text(_("Build and release {strong_start}sections{strong_end} to your students incrementally. You don't have to have it all done at once.")).format(
                    strong_start=HTML('<strong>'),
                    strong_end=HTML('</strong>')
                  ))))
        __M_writer(u'</p>\n            </li>\n          </ul>\n        </div>\n      </li>\n\n      <li class="feature">\n        <figure class="img zoom">\n        <a rel="modal" href="#hiw-feature2">\n          <img src="')
        __M_writer(filters.html_escape(filters.decode.utf8(static.url("images/thumb-hiw-feature2.png"))))
        __M_writer(u'" alt="')
        __M_writer(filters.html_escape(filters.decode.utf8(_('Learning is More than Just Lectures'))))
        __M_writer(u'" />\n          <figcaption class="sr">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Learning is More than Just Lectures"))))
        __M_writer(u'</figcaption>\n          <span class="action-zoom">\n            <span class="icon fa fa-search-plus" aria-hidden="true"></span><span class="sr">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Enlarge image"))))
        __M_writer(u'</span>\n          </span>\n        </a>\n        </figure>\n\n        <div class="copy">\n          <h3>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Learning is More than Just Lectures"))))
        __M_writer(u'</h3>\n          <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("{studio_name} lets you weave your content together in a way that reinforces learning. Insert videos, discussions, and a wide variety of exercises with just a few clicks.").format(studio_name=settings.STUDIO_SHORT_NAME))))
        __M_writer(u' </p>\n\n          <ul class="list-proofpoints">\n            <li class="proofpoint">\n              <h4 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Create Learning Pathways"))))
        __M_writer(u'</h4>\n              <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Help your students understand one concept at a time with multimedia, HTML, and exercises."))))
        __M_writer(u'</p>\n            </li>\n\n            <li class="proofpoint">\n              <h4 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Work Visually, Organize Quickly"))))
        __M_writer(u'</h4>\n              <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Work visually and see exactly what your students will see. Reorganize all your content with drag and drop."))))
        __M_writer(u'</p>\n            </li>\n\n            <li class="proofpoint">\n              <h4 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("A Broad Library of Problem Types"))))
        __M_writer(u'</h4>\n              <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("It's more than just multiple choice. {studio_name} supports more than a dozen types of problems to challenge your learners.").format(studio_name=settings.STUDIO_SHORT_NAME))))
        __M_writer(u'</p>\n            </li>\n          </ul>\n        </div>\n      </li>\n\n      <li class="feature">\n        <figure class="img zoom">\n          <a rel="modal" href="#hiw-feature3">\n            <img src="')
        __M_writer(filters.html_escape(filters.decode.utf8(static.url("images/thumb-hiw-feature3.png"))))
        __M_writer(u'" alt="')
        __M_writer(filters.html_escape(filters.decode.utf8(_('{studio_name} Gives You Simple, Fast, and Incremental Publishing. With Friends.').format(studio_name=settings.STUDIO_SHORT_NAME))))
        __M_writer(u'" />\n            <figcaption class="sr">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("{studio_name} Gives You Simple, Fast, and Incremental Publishing. With Friends.").format(studio_name=settings.STUDIO_SHORT_NAME))))
        __M_writer(u'</figcaption>\n            <span class="action-zoom">\n              <span class="icon fa fa-search-plus" aria-hidden="true"></span><span class="sr">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Enlarge image"))))
        __M_writer(u'</span>\n            </span>\n          </a>\n        </figure>\n\n        <div class="copy">\n          <h3>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Simple, Fast, and Incremental Publishing. With Friends."))))
        __M_writer(u'</h3>\n          <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("{studio_name} works like web applications you already know, yet understands how you build curriculum. Instant publishing to the web when you want it, incremental release when it makes sense. And with co-authors, you can have a whole team building a course, together.").format(studio_name=settings.STUDIO_SHORT_NAME))))
        __M_writer(u'</p>\n\n          <ul class="list-proofpoints">\n            <li class="proofpoint">\n              <h4 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Instant Changes"))))
        __M_writer(u'</h4>\n              <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Caught a bug? No problem. When you want, your changes go live when you click Save."))))
        __M_writer(u'</p>\n            </li>\n\n            <li class="proofpoint">\n              <h4 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Release-On Date Publishing"))))
        __M_writer(u'</h4>\n              <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(Text(_("When you've finished a {strong_start}section{strong_end}, pick when you want it to go live and {studio_name} takes care of the rest. Build your course incrementally.")).format(
                      studio_name=settings.STUDIO_SHORT_NAME,
                      strong_start=HTML('<strong>'),
                      strong_end=HTML('</strong>')
                  ))))
        __M_writer(u'</p>\n            </li>\n\n            <li class="proofpoint">\n              <h4 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Work in Teams"))))
        __M_writer(u'</h4>\n              <p>')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Co-authors have full access to all the same authoring tools. Make your course better through a team effort."))))
        __M_writer(u'</p>\n            </li>\n          </ul>\n        </div>\n      </li>\n    </ol>\n  </section>\n</div>\n\n<div class="wrapper-content-cta wrapper">\n  <section class="content content-cta">\n    <header>\n      <h2 class="sr">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Sign Up for {studio_name} Today!").format(studio_name=settings.STUDIO_SHORT_NAME))))
        __M_writer(u'</h2>\n    </header>\n\n    <ul class="list-actions">\n      <li class="action-item">\n        <a href="')
        __M_writer(filters.html_escape(filters.decode.utf8(reverse('signup'))))
        __M_writer(u'" class="action action-primary">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Sign Up & Start Making Your {platform_name} Course").format(platform_name=settings.PLATFORM_NAME))))
        __M_writer(u'</a>\n      </li>\n      <li class="action-item">\n        <a href="')
        __M_writer(filters.html_escape(filters.decode.utf8(reverse('login'))))
        __M_writer(u'" class="action action-secondary">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Already have a {studio_name} Account? Sign In").format(studio_name=settings.STUDIO_SHORT_NAME))))
        __M_writer(u'</a>\n      </li>\n    </ul>\n  </section>\n</div>\n\n<div class="content-modal" id="hiw-feature1">\n  <h3 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Outlining Your Course"))))
        __M_writer(u'</h3>\n  <figure>\n    <img src="')
        __M_writer(filters.html_escape(filters.decode.utf8(static.url("images/hiw-feature1.png"))))
        __M_writer(u'" alt="" />\n    <figcaption class="description">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Simple two-level outline to organize your course. Drag and drop, and see your course at a glance."))))
        __M_writer(u'</figcaption>\n  </figure>\n\n  <a href="" rel="view" class="action action-modal-close">\n    <span class="icon fa fa-times-circle" aria-hidden="true"></span>\n    <span class="label">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("close modal"))))
        __M_writer(u'</span>\n  </a>\n</div>\n\n<div class="content-modal" id="hiw-feature2">\n  <h3 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("More than Just Lectures"))))
        __M_writer(u'</h3>\n  <figure>\n    <img src="')
        __M_writer(filters.html_escape(filters.decode.utf8(static.url("images/hiw-feature2.png"))))
        __M_writer(u'" alt="" />\n    <figcaption class="description">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Quickly create videos, text snippets, inline discussions, and a variety of problem types."))))
        __M_writer(u'</figcaption>\n  </figure>\n\n  <a href="" rel="view" class="action action-modal-close">\n    <span class="icon fa fa-times-circle" aria-hidden="true"></span>\n    <span class="label">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("close modal"))))
        __M_writer(u'</span>\n  </a>\n</div>\n\n<div class="content-modal" id="hiw-feature3">\n  <h3 class="title">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Publishing on Date"))))
        __M_writer(u'</h3>\n  <figure>\n    <img src="')
        __M_writer(filters.html_escape(filters.decode.utf8(static.url("images/hiw-feature3.png"))))
        __M_writer(u'" alt="" />\n    <figcaption class="description">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("Simply set the date of a section or subsection, and {studio_name} will publish it to your students for you.").format(studio_name=settings.STUDIO_SHORT_NAME))))
        __M_writer(u'</figcaption>\n  </figure>\n\n  <a href="" rel="view" class="action action-modal-close">\n    <span class="icon fa fa-times-circle" aria-hidden="true"></span>\n    <span class="label">')
        __M_writer(filters.html_escape(filters.decode.utf8(_("close modal"))))
        __M_writer(u'</span>\n  </a>\n</div>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()