parent
4017113fca
commit
130c388705
@ -0,0 +1,62 @@ |
||||
{% extends '@SonataBlock/Block/block_base.html.twig' %} |
||||
|
||||
{% block block %} |
||||
{% if settings.format %} |
||||
<div class="{{ settings.class }}"> |
||||
{% if settings.title %} |
||||
<h3> |
||||
{% if settings.icon %} |
||||
<i class="{{ settings.icon }}" aria-hidden="true"></i> |
||||
{% endif %} |
||||
{% if settings.translation_domain %} |
||||
{{ settings.title|trans({}, settings.translation_domain) }} |
||||
{% else %} |
||||
{{ settings.title }} |
||||
{% endif %} |
||||
</h3> |
||||
{% endif %} |
||||
|
||||
<div id="carousel-{{ block.id }}" class="carousel slide" |
||||
data-interval="{{ settings.pauseTime }}" |
||||
{% if settings.startPaused != 1 %}data-ride="carousel"{% endif %} |
||||
> |
||||
|
||||
<!-- Indicators --> |
||||
<ol class="carousel-indicators"> |
||||
{% for element in elements %} |
||||
{{ block('element_indicator') }} |
||||
{% endfor %} |
||||
</ol> |
||||
|
||||
<!-- Wrapper for slides --> |
||||
<div class="carousel-inner"> |
||||
{% for element in elements %} |
||||
{{ block('element_display') }} |
||||
{% endfor %} |
||||
</div> |
||||
|
||||
<!-- Controls --> |
||||
<a class="left carousel-control" href="#carousel-{{ block.id }}" data-slide="prev"> |
||||
<span class="glyphicon glyphicon-chevron-left"></span> |
||||
</a> |
||||
<a class="right carousel-control" href="#carousel-{{ block.id }}" data-slide="next"> |
||||
<span class="glyphicon glyphicon-chevron-right"></span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
{% endif %} |
||||
{% endblock %} |
||||
|
||||
{% block element_indicator %} |
||||
<li data-target="#carousel-{{ block.id }}" data-slide-to="{{ loop.index0 }}"{% if loop.first %} class="active"{% endif %}></li> |
||||
{% endblock element_indicator %} |
||||
|
||||
{% block element_display %} |
||||
<div class="item{% if loop.first %} active{% endif %}"> |
||||
{% media element.media, settings.format %} |
||||
<div class="carousel-caption"> |
||||
<h4>{{ element.title }}</h4> |
||||
<p>{{ element.caption }}</p> |
||||
</div> |
||||
</div> |
||||
{% endblock element_display %} |
||||
@ -0,0 +1,5 @@ |
||||
{% extends '@ChamiloPage/base_layout.html.twig' %} |
||||
|
||||
{% block page_content %} |
||||
{{ parent() }} |
||||
{% endblock %} |
||||
@ -0,0 +1,21 @@ |
||||
{% extends '@ChamiloPage/base_layout.html.twig' %} |
||||
|
||||
{% block sonata_page_content %} |
||||
{{ parent() }} |
||||
{% if page is defined %} |
||||
<div class="col-md-6"> |
||||
{% if page.name != 'global'%} |
||||
{{ sonata_page_render_container('left_col', 'global') }} |
||||
{% endif %} |
||||
{{ sonata_page_render_container('left_col', page) }} |
||||
</div> |
||||
<div class="col-md-6"> |
||||
{% if page.name != 'global'%} |
||||
{{ sonata_page_render_container('right_col', 'global') }} |
||||
{% endif %} |
||||
{{ sonata_page_render_container('right_col', page) }} |
||||
</div> |
||||
<div style="clear: both"></div> |
||||
{% endif %} |
||||
{% endblock %} |
||||
|
||||
@ -1,38 +0,0 @@ |
||||
{# |
||||
|
||||
This file is part of the Sonata package. |
||||
|
||||
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org> |
||||
|
||||
For the full copyright and license information, please view the LICENSE |
||||
file that was distributed with this source code. |
||||
|
||||
#} |
||||
{% extends 'SonataPageBundle::2columns_layout.html.twig' %} |
||||
|
||||
{% block sonata_page_body_tag %} |
||||
{{ parent() }} |
||||
|
||||
{% include "SonataSeoBundle:Block:_facebook_sdk.html.twig" %} |
||||
{% include "SonataSeoBundle:Block:_twitter_sdk.html.twig" %} |
||||
{% include "SonataSeoBundle:Block:_pinterest_sdk.html.twig" %} |
||||
|
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_javascripts %} |
||||
<script type="text/javascript"> |
||||
var basket_update_confirmation_message = '{{ 'sonata_basket_update_confirmation'|trans({}, 'SonataDemoBundle')|escape('js') }}'; |
||||
</script> |
||||
|
||||
<script src="{{ asset('assetic/sonata_front_js.js') }}" type="text/javascript"></script> |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_container %} |
||||
<div class="demonstration-bar">{{ 'sonata.demo.demonstration.message'|trans({}, 'SonataDemoBundle') }}</div> |
||||
|
||||
<a href="https://github.com/sonata-project"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a> |
||||
|
||||
{{ parent() }} |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_breadcrumb %}{% endblock %} |
||||
@ -1,62 +1,90 @@ |
||||
{# |
||||
|
||||
This file is part of the Sonata package. |
||||
|
||||
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org> |
||||
|
||||
For the full copyright and license information, please view the LICENSE |
||||
file that was distributed with this source code. |
||||
|
||||
#} |
||||
{% extends sonata_block.templates.block_base %} |
||||
|
||||
{% block block %} |
||||
<div class="box box-primary"> |
||||
<div class="panel panel-default {{ settings.class }}"> |
||||
{% if settings.title is not empty %} |
||||
<div class="box-header with-border"> |
||||
<h4 class="box-title"> |
||||
<i class="fa fa-clock-o fa-fw"></i> {{ settings.title }} |
||||
<div class="panel-heading"> |
||||
<h4 class="panel-title"> |
||||
{% if settings.icon %} |
||||
<i class="{{ settings.icon }}" aria-hidden="true"></i> |
||||
{% endif %} |
||||
{% if settings.translation_domain %} |
||||
{{ settings.title|trans({}, settings.translation_domain) }} |
||||
{% else %} |
||||
{{ settings.title }} |
||||
{% endif %} |
||||
</h4> |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<div class="box-body"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<ul class="timeline"> |
||||
{% for entry in entries %} |
||||
|
||||
{% if currentDay is not defined or currentDay != entry.createdAt|format_date %} |
||||
{% set currentDay = entry.createdAt|format_date %} |
||||
<li class="time-label"> |
||||
<span class="bg-red">{{ currentDay }}</span> |
||||
</li> |
||||
{% endif %} |
||||
|
||||
{% set subject = entry.getComponent('subject') %} |
||||
{% set target = entry.getComponent('target') %} |
||||
{% set target_text_component = entry.getComponent('target_text') %} |
||||
|
||||
{% if subject.data %} |
||||
{% set subject_text = sonata_timeline_generate_link(subject, entry) %} |
||||
{% else %} |
||||
{% set subject_text = '<abbr title="' ~ 'element_reference_deleted'|trans({'%reference%': target.hash}, "SonataTimelineBundle") ~ '">' ~ 'element_deleted'|trans({}, "SonataTimelineBundle") ~ '</abbr>' %} |
||||
{% endif %} |
||||
|
||||
{% if target.data is defined and target.data is not empty %} |
||||
{% set target_text = sonata_timeline_generate_link(target, entry) %} |
||||
{% elseif target_text_component %} |
||||
{% set target_text = '<abbr title="' ~ 'element_deleted'|trans({}, "SonataTimelineBundle") ~ '">'~target_text_component~'</abbr>' %} |
||||
{% else %} |
||||
{% set target_text = '<abbr title="' ~ 'element_reference_deleted'|trans({'%reference%': target.hash}, "SonataTimelineBundle") ~ '">' ~ 'element_deleted'|trans({}, "SonataTimelineBundle") ~ '</abbr>' %} |
||||
{% endif %} |
||||
|
||||
{% set verb = "actions."~entry.verb %} |
||||
{% set icon = "actions.icon."~entry.verb %} |
||||
|
||||
<li> |
||||
<i class="{{ icon|trans({}, "SonataTimelineBundle") }}"></i> |
||||
<div class="timeline-item" style="background: #f3f4f5;"> |
||||
<span class="time"><i class="fa fa-clock-o"></i> {{ entry.createdAt|format_time }}</span> |
||||
<div class="timeline-body" style="border-bottom: none;">{{ verb|trans({'%subject%': subject_text, '%target%': target_text}, "SonataTimelineBundle")|raw }}</div> |
||||
</div> |
||||
</li> |
||||
{% else %} |
||||
{{ 'no_action'|trans({}, "SonataTimelineBundle") }} |
||||
{% endfor %} |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="panel-body"> |
||||
<ul class="timeline"> |
||||
{% for entry in entries %} |
||||
{% if currentDay is not defined or currentDay != entry.createdAt|format_date %} |
||||
{% set currentDay = entry.createdAt|format_date %} |
||||
<li class="time-label"> |
||||
<span class="bg-red">{{ currentDay }}</span> |
||||
</li> |
||||
{% endif %} |
||||
|
||||
{% set subject = entry.getComponent('subject') %} |
||||
{% set target = entry.getComponent('target') %} |
||||
{% set target_text_component = entry.getComponent('target_text') %} |
||||
|
||||
{% if subject.data %} |
||||
{% set subject_text = sonata_timeline_generate_link(subject) %} |
||||
{% else %} |
||||
{% set subject_text %} |
||||
<abbr title="{{ 'element_reference_deleted'|trans({'%reference%': subject.hash}, "SonataTimelineBundle") }}"> |
||||
{{ 'element_deleted'|trans({}, "SonataTimelineBundle") }} |
||||
</abbr> |
||||
{% endset %} |
||||
{% endif %} |
||||
|
||||
{% if target.data is defined and target.data is not empty %} |
||||
{% set target_text = sonata_timeline_generate_link(target, entry) %} |
||||
{% elseif target_text_component %} |
||||
{% set target_text %} |
||||
<abbr title="{{ 'element_deleted'|trans({}, "SonataTimelineBundle") }}"> |
||||
{{ target_text_component }} |
||||
</abbr> |
||||
{% endset %} |
||||
{% else %} |
||||
{% set target_text %} |
||||
<abbr title="{{ 'element_reference_deleted'|trans({'%reference%': target.hash}, "SonataTimelineBundle") }}"> |
||||
{{ 'element_deleted'|trans({}, "SonataTimelineBundle") }} |
||||
</abbr> |
||||
{% endset %} |
||||
{% endif %} |
||||
|
||||
{% set verb = "actions."~entry.verb %} |
||||
{% set icon = "actions.icon."~entry.verb %} |
||||
|
||||
<li> |
||||
<i class="{{ icon|trans({}, "SonataTimelineBundle") }}"></i> |
||||
<div class="timeline-item" style="background: #f3f4f5;"> |
||||
<span class="time"> |
||||
<i class="fa fa-clock-o"></i> {{ entry.createdAt|format_time }} |
||||
</span> |
||||
<div class="timeline-body" style="border-bottom: none;"> |
||||
{{ verb|trans({'%subject%': subject_text, '%target%': target_text}, "SonataTimelineBundle")|raw }} |
||||
</div> |
||||
</div> |
||||
</li> |
||||
{% else %} |
||||
<p>{{ 'no_action'|trans({}, "SonataTimelineBundle") }}</p> |
||||
{% endfor %} |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
Loading…
Reference in new issue