{% macro courseStatus(status) %}
    {% if status == 'draft' %}
        <span class="color-gray">{{ '未发布'|trans }}</span>
    {% elseif  status == 'published' %}
        <span class="color-success">{{ '已发布'|trans }}</span>
    {% elseif status == 'closed' %}
        <span class="color-danger">{{ '已关闭'|trans }}</span>
    {% endif %}
{% endmacro %}

{% macro fileType(type) %}
    {% if type == 'video' %}
        <span class="glyphicon glyphicon-facetime-video color-success">{{ '视频'|trans }}</span>
    {% elseif type == 'audio' %}
        <span class="glyphicon glyphicon-music color-success">{{ '音频'|trans }}</span>
    {% elseif type == 'document' %}
        <span class="glyphicon glyphicon-briefcase color-success">{{ '文档'|trans }}</span>
    {% elseif type == 'image' %}
        <span class="glyphicon glyphicon-picture color-success">{{ '图片'|trans }}</span>
    {% elseif type == 'other' %}
        <span class="glyphicon glyphicon-question-sign color-success">{{ '其他'|trans }}</span>
    {% endif %}
{% endmacro %}

{% macro  orderStatus(status) %}
    {% if status == 'created' %}
        <span class="label label-danger">{{ '未付款'|trans }}</span>
    {% elseif status == 'paid' %}
        <span class="label label-success">{{ '已付款'|trans }}</span>
    {% elseif status == 'refunding' %}
        <span class="text-warning">{{ '退款中'|trans }}</span>
    {% elseif status == 'refunded' %}
        <span class="color-danger">{{ '已退款'|trans }}</span>
    {% elseif status == 'cancelled' %}
        <span class="color-gray">{{ '已关闭'|trans }}</span>
    {% endif %}
{% endmacro %}

{% macro refundStatus(status) %}
    {% if status == 'created' %}
        <span class="text-warning">{{ '已申请'|trans }}</span>
    {% elseif status == 'success' %}
        <span class="color-success">{{ '退款成功'|trans }}</span>
    {% elseif status == 'failed' %}
        <span class="color-danger">{{ '退款失败'|trans }}</span>
    {% elseif status == 'cancelled' %}
        <span class="color-gray">{{ '已取消'|trans }}</span>
    {% endif %}
{% endmacro %}

{% macro logLevel(level) %}
    {% if level == 'info' %}
        <span>{{ '提示'|trans }}</span>
    {% elseif level == 'warning' %}
        <span class="text-warning">{{ '警告'|trans }}</span>
    {% elseif level == 'error' %}
        <span class="color-danger">{{ '错误'|trans }}</span>
    {% endif %}
{% endmacro %}

{% macro contentStatus(status) %}
    {% if status == 'published' %}
        <span class="color-success">{{ '已发布'|trans }}</span>
    {% elseif status == 'unpublished' %}
        <span class="color-gray">{{ '未发布'|trans }}</span>
    {% elseif status == 'trash' %}
        <span class="text-warning">{{ '回收站'|trans }}</span>
    {% endif %}
{% endmacro %}

{% macro articleStatus(status) %}
    {% if status == 'published' %}
        <span class="color-success">{{ '已发布'|trans }}</span>
    {% elseif status == 'unpublished' %}
        <span class="color-gray">{{ '未发布'|trans }}</span>
    {% elseif status == 'trash' %}
        <span class="text-warning">{{ '回收站'|trans }}</span>
    {% endif %}
{% endmacro %}

{% macro discountStatus(status) %}
    {% if status == 'unstart' %}
        <span class="color-gray">{{ '未开始'|trans }}</span>
    {% elseif status == 'running' %}
        <span class="color-success">{{ '进行中'|trans }}</span>
    {% elseif status == 'finished' %}
        <span class="color-gray">{{ '已结束'|trans }}</span>
    {% endif %}
{% endmacro %}

{% macro  video_quality(option) %}
     {% if option == 'low' %}
       {{'流畅'|trans}} <span class="color-gray">({{'适合PPT讲解'|trans}})</span>
    {% elseif option == 'normal' %}
      {{'标准'|trans}} <span class="color-gray">({{'适合屏幕录制、摄像头拍摄'|trans}})</span>
    {% elseif option == 'high' %}
      {{'精细'|trans}} <span class="color-gray">({{'适合动态电影'|trans}})</span>
    {% endif %}
{% endmacro %}