  
<div class="settings-list js-settings-list clearfix">
  <div class="settings-item {% if tasks.preparation|default(null) %} active {% endif %}">
    <a href="javascript:;" 
      data-backdrop="static" data-keyboard="false"
      data-help="popover" data-placement="top" data-html="true" data-trigger="hover"
      {% if not tasks.preparation|default(null) %}
        class="js-lesson-create-btn"
        data-content="{{'course.plan_task.preparation_tips'|trans({'%taskName%':setting('course.task_name')|default('admin.setting_course.task'|trans)})}}"
        data-url="{{ path('course_manage_task_create', {courseId:course.id, type: 'preparation', categoryId: lesson.id}) }}">
      {% else %}
        data-toggle="modal" data-target="#modal"
        data-content="<i class='mr10 es-icon
          {% if activity_metas(tasks.preparation.type) %}
            {{ activity_metas(tasks.preparation.type).icon }}
          {% endif %}'></i>{{tasks.preparation.title|trans}}"
        data-url= "{{ path('course_manage_task_update', {id:tasks.preparation.id,courseId:tasks.preparation.courseId, type:'preparation', categoryId: lesson.id}) }}">
      {% endif %}
      <i class="mrm es-icon es-icon-yulan "
        {% if tasks.preparation.id|default(null) %}
          data-role="task"
        {% endif %}>
      </i>
      {{'course.plan_task.preparation'|trans}}
    </a>
    <i class="es-icon es-icon-angledoubleright after"></i>
  </div>
  <div class="settings-item js-settings-item active">
    <a href="javascript:;" data-role='update-task' data-toggle="modal" data-target="#modal"
      data-url="{{ path('course_manage_task_update', {id:task.id,courseId:task.courseId, type:'lesson'}) }}"
      data-help="popover" data-placement="top" data-html="true" data-trigger="hover"
      data-content="<i class='mr10 es-icon
        {% if activity_metas(task.activity.mediaType) %}
          {{ activity_metas(task.activity.mediaType).icon }}
        {% endif %} '></i>{{task.title|trans}}">
      <i class="es-icon es-icon-book mrm" data-role="task"></i>
      {{'course.plan_task.task'|trans({'%taskName%':setting('course.task_name')|default('admin.setting_course.task'|trans)})}}
    </a>
    <i class="es-icon es-icon-angledoubleright after"></i>
  </div>
  <div class="settings-item {% if tasks.exercise|default(null) %} active {% endif %}">
    <a href="javascript:;" data-backdrop="static" data-keyboard="false"
      data-help="popover" data-placement="top" data-html="true" data-trigger="hover"
      {% if not tasks.exercise|default(null) %}
        class="js-lesson-create-btn" 
        data-content="{{'course.plan_task.practice_tips'|trans}}"
        data-url="{{ path('course_manage_task_create', {courseId:course.id, type: 'exercise', categoryId: lesson.id}) }}">
      {% else %}
        data-toggle="modal" data-target="#modal"
        data-content="<i class='mr10 es-icon
          {% if activity_metas(tasks.exercise.type) %}
            {{ activity_metas(tasks.exercise.type).icon }}
          {% endif %}
        '></i>{{tasks.exercise.title|trans}}"
        data-url="{{ path('course_manage_task_update', {id:tasks.exercise.id,courseId:tasks.exercise.courseId, type:'exercise', categoryId: lesson.id}) }}">
      {% endif %}
      <i class="es-icon es-icon-mylibrarybooks mrm" {% if tasks.exercise.id|default(null) %}data-role="task"{% endif %}></i>
      {{'course.plan_task.practice'|trans}}
    </a>
    <i class="es-icon es-icon-angledoubleright after"></i>
  </div>
  <div class="settings-item {% if tasks.homework|default(null) %} active {% endif %}">
    <a href="javascript:;" 
      data-backdrop="static" data-keyboard="false"
      data-help="popover" data-placement="top" data-html="true" data-trigger="hover"
      {% if not tasks.homework|default(null) %}
        class="js-lesson-create-btn"
        data-content="{{'course.plan_task.homework_tips'|trans}}"
        data-url="{{ path('course_manage_task_create', {courseId:course.id, type: 'homework', categoryId: lesson.id}) }}">
      {% else %}
        data-toggle="modal" data-target="#modal"
        data-content="<i class='mr10 es-icon
          {% if activity_metas(tasks.homework.type) %}
            {{ activity_metas(tasks.homework.type).icon }}
          {% endif %}
        '></i>{{tasks.homework.title|trans}}"
        data-url="{{ path('course_manage_task_update', {id:tasks.homework.id,courseId:tasks.homework.courseId, type:'homework', categoryId: lesson.id}) }}">
      {% endif %}
    <i class="es-icon es-icon-zuoye mrm" {% if tasks.homework.id|default(null) %}data-role="task"{% endif %}></i>
      {{'course.plan_task.homework'|trans}}
    </a>
    <i class="es-icon es-icon-angledoubleright after"></i>
  </div>

  <div class="settings-item {% if tasks.extraClass|default(null) %} active {% endif %}">
    <a href="javascript:;" 
      data-backdrop="static" data-keyboard="false"
      data-help="popover" data-placement="top" data-html="true" data-trigger="hover"
      {% if not  tasks.extraClass|default(null) %}
        class="js-lesson-create-btn"
        data-content="{{'course.plan_task.extra_class_tips'|trans}}"
        data-url="{{ path('course_manage_task_create', {courseId:course.id, type: 'extraClass', categoryId: lesson.id}) }}">
      {% else %}
        data-toggle="modal" data-target="#modal"
        data-content="<i class='mr10 es-icon
        {% if activity_metas(tasks.extraClass.type) %}
          {{ activity_metas(tasks.extraClass.type).icon }}
        {% endif %}
        '></i>{{tasks.extraClass.title|trans}}"
        data-url="{{ path('course_manage_task_update', {id:tasks.extraClass.id,courseId:tasks.extraClass.courseId, type:'extraClass', categoryId: lesson.id}) }}">
      {% endif %}
      <i class="es-icon es-icon-sun mrm" {% if tasks.extraClass.id|default(null) %}data-role="task"{% endif %}></i>
      {{'course.plan_task.extra_class'|trans}}
    </a>
  </div>
</div>