lessons with accordion mode category - refs BT#12880

pull/2487/head
Alex Aragon 9 years ago
parent aa9d72f9c5
commit baf6811153
  1. 89
      main/template/default/learnpath/list.tpl

@ -11,7 +11,7 @@
{{ introduction_section }}
{% set configuration = 'lp_category_accordeon'|api_get_configuration_value %}
<div class="lp-accordeon panel-group" id="lp-accordion" role="tablist" aria-multiselectable="true">
{% for lp_data in data %}
{% set show_category = true %}
@ -173,12 +173,90 @@
{% endif %}
<!--- end old view -->
{% else %}
<!-- new view block accordeon -->
{% if lp_data.category.id == 0 %}
{% if lp_data.lp_list %}
<div class="table-responsive">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ "Title"|get_lang }}</th>
{% if is_allowed_to_edit %}
<th>{{ "PublicationDate"|get_lang }}</th>
<th>{{ "ExpirationDate"|get_lang }}</th>
<th>{{ "Progress"|get_lang }}</th>
<th>{{ "AuthoringOptions"|get_lang }}</th>
{% else %}
{% if not is_invitee %}
<th>{{ "Progress"|get_lang }}</th>
{% endif %}
<th>{{ "Actions"|get_lang }}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for row in lp_data.lp_list %}
<tr>
<td>
{{ row.learnpath_icon }}
<a href="{{ row.url_start }}">
{{ row.title }}
{{ row.session_image }}
{{ row.extra }}
</a>
</td>
{% if is_allowed_to_edit %}
<td>
{% if row.start_time %}
<span class="small">{{ row.start_time }}</span>
{% endif %}
</td>
<td>
<span class="small">{{ row.end_time }}</span>
</td>
<td>
{{ row.dsp_progress }}
</td>
{% else %}
{% if not is_invitee %}
<td>
{{ row.dsp_progress }}
</td>
{% endif %}
{% endif %}
<td>
{{ row.action_build }}
{{ row.action_edit }}
{{ row.action_visible }}
{{ row.action_tracking }}
{{ row.action_publish }}
{{ row.action_subscribe_users }}
{{ row.action_serious_game }}
{{ row.action_reinit }}
{{ row.action_default_view }}
{{ row.action_debug }}
{{ row.action_export }}
{{ row.action_copy }}
{{ row.action_auto_launch }}
{{ row.action_pdf }}
{{ row.action_delete }}
{{ row.action_order }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endif %}
{% if categories|length > 1 and lp_data.category.id %}
<div class="lp-accordeon panel-group" id="lp-accordion-{{ lp_data.category.getId() }}" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading-{{ lp_data.category.getId() }}">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#lp-accordion-{{ lp_data.category.getId() }}" href="#collapse-{{ lp_data.category.getId() }}" aria-expanded="true" aria-controls="collapse-{{ lp_data.category.getId() }}">
<a role="button" data-toggle="collapse" data-parent="#lp-accordion" href="#collapse-{{ lp_data.category.getId() }}" aria-expanded="true" aria-controls="collapse-{{ lp_data.category.getId() }}">
{{ lp_data.category.getName() }}
</a>
</h4>
@ -327,13 +405,14 @@
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
<!-- end view block accordeon -->
{% endif %}
{% endif %}
{% endfor %}
</div>
{% if is_allowed_to_edit and not lp_is_shown %}
<div id="no-data-view">
<h2>{{ "LearningPaths"|get_lang }}</h2>

Loading…
Cancel
Save