<div class="info-block" tal:define="sections view/instructorOf"
     tal:condition="view/isTeacher"
     i18n:domain="schooltool">
  <h5 i18n:translate="">Sections Taught</h5>
  <ul tal:condition="sections">
    <tal:loop repeat="item sections">
      <li>
        <tal:if condition="item/section/can_access:title"
                tal:define="section item/section">
          <a title=""
             tal:attributes="href section/@@absolute_url;
                             title section/description|section/title"
             tal:content="section/label"></a>
        </tal:if>
        <tal:if condition="not:item/section/can_access:title">
          <span tal:replace="item/title" />
        </tal:if>
      </li>
    </tal:loop>
  </ul>
</div>

<div class="info-block" tal:define="sections view/learnerOf"
                        tal:condition="view/isLearner">
  <h5 i18n:translate="">Courses</h5>
    <ul tal:condition="sections">
      <tal:loop repeat="group sections">
        <li>
          <a title=""
             tal:attributes="href group/section/@@absolute_url;
                             title group/section/description|group/section/title"
             tal:content="group/section/label"
             i18n:translate=""></a>
          <span class="hint" tal:condition="group/group">
            <span i18n:translate="">
              via group
            </span>
            <a href=""
               tal:attributes="href group/group/@@absolute_url"
               tal:content="group/group/title" />
          </span>
        </li>
      </tal:loop>
    </ul>
</div>
