コード例 #1
0
def licence_icon(licence):
    if licence == "non-standard/Other_Licence/Terms":
        img_location = "{}images/licence_icons/licences/other.png".format(MEDIA_URL)
    else:
        img_location = "{}images/licence_icons/licences/{}.png".format(MEDIA_URL,licence)
    return u"".join(u"<img style=\"padding:1px\" src=\"{}\" title=\"{}\" alt=\"{}\" height=\"19\"/>" \
                    .format(img_location, pretty_camel(licence), pretty_camel(licence)))
コード例 #2
0
def licence_icon(licence):
    img_location = "{}metashare/images/licence_icons/licences/{}.png" \
                        .format(STATIC_URL, licence)
    return u"<img style=\"padding:1px\" src=\"{}\" title=\"{}\" alt=\"{}\" height=\"20\"/>" \
            .format(img_location, pretty_camel(licence), pretty_camel(licence))
コード例 #3
0
def condition_icon(condition):
    img_location = "{}metashare/images/licence_icons/conditions" \
        "/{}.png".format(STATIC_URL, condition)
    return u"<img style=\"padding:1px\" src=\"{}\" title=\"{}\" alt=\"{}\" width=\"17\" height=\"17\"/>" \
        .format(img_location, pretty_camel(condition), pretty_camel(condition))
コード例 #4
0
def licence_icon(licence):
    img_location = "{}metashare/images/licence_icons/licences/{}.png" \
                        .format(STATIC_URL, licence)
    return u"<img style=\"padding:1px\" src=\"{}\" title=\"{}\" alt=\"{}\" height=\"20\"/>" \
            .format(img_location, pretty_camel(licence), pretty_camel(licence))
コード例 #5
0
def condition_icon(condition):
    img_location = "{}metashare/images/licence_icons/conditions" \
        "/{}.png".format(STATIC_URL, condition)
    return u"<img style=\"padding:1px\" src=\"{}\" title=\"{}\" alt=\"{}\" width=\"17\" height=\"17\"/>" \
        .format(img_location, pretty_camel(condition), pretty_camel(condition))
コード例 #6
0
def licence_human(licence):
    return pretty_camel(licence)
コード例 #7
0
def condition_icon(condition):
    img_location = "{}images/licence_icons/conditions/{}.png".format(MEDIA_URL,condition)
    return u"".join(u"<img style=\"padding:1px\" src=\"{}\" title=\"{}\" alt=\"{}\" width=\"17\" height=\"17\"/>" \
                    .format(img_location, pretty_camel(condition), pretty_camel(condition)))