158 lines
5 KiB
Twig
158 lines
5 KiB
Twig
{% extends "TrinityAdminBundle:BaseAdmin:index.html.twig" %}
|
|
|
|
{% block title %}
|
|
{% endblock %}
|
|
|
|
{% block menu %}
|
|
{% endblock %}
|
|
|
|
{% block breadcrumb %}
|
|
{% endblock %}
|
|
|
|
{% block panel %}
|
|
<div id="panel" class="tinymce">
|
|
<div class="tabbable">
|
|
<ul class="nav nav-tabs">
|
|
<li class="active">
|
|
<a href="#pan-1" data-toggle="tab"><i class="icon-th-list"></i> {{ 'crud.panel.filters'|trans({}, 'TrinityAdminBundle') }}</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
<div class="tab-pane active" id="pan-1">
|
|
{% render controller(bundle_name ~ ":" ~ controller_name ~ ":filters", { routePrefix: route_prefix }) %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block stylesheets %}
|
|
|
|
{{ parent() }}
|
|
|
|
<style type="text/css">
|
|
body {
|
|
padding:0;
|
|
padding-left:10px;
|
|
}
|
|
|
|
#crud.tinymce .media-thumb {
|
|
float:left;
|
|
}
|
|
|
|
#crud.tinymce .media-thumb .button-choose {
|
|
text-align: center;
|
|
margin-bottom: 3px;
|
|
margin-left: 10px;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
#crud.tinymce .media-thumb .thumbnail {
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.new .btn {
|
|
float: left;
|
|
margin-top: 15px;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
{% set colspan = 0 %}
|
|
<div id="crud" class="tinymce">
|
|
<div class="row container-fluid">
|
|
<form id="crud-datas" action="{{ path(route_prefix ~ 'batch') }}" method="post" {{ form_enctype(form_batch) }}>
|
|
<div>
|
|
{% for object in pager %}
|
|
<div class="media-thumb" {% if rankable %}data-id="{{ object.id }}"{% endif %}>
|
|
<div class="button-choose">
|
|
<div class="thumbnail">
|
|
{% for action, template in list_actions %}
|
|
{% include template %}
|
|
{% endfor%}
|
|
</div>
|
|
</div>
|
|
|
|
{% for key, field in fields %}
|
|
<div class="thumbnail">
|
|
{% set href = list_actions.edit is defined and key == 0 ? path(route_prefix ~ "edit", { id: object.id }) : false %}
|
|
|
|
{% if object.type %}
|
|
{{ field_render(object.type, 'getWebPathForThumbnail', field.template, href) }}
|
|
<div style="width:100px;text-align: center;">
|
|
{{ object.file }}
|
|
</div>
|
|
{% else %}
|
|
{{ field_render(object, field.method, field.template, href) }}
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% if loop.index is divisibleby(3) %}
|
|
<div class="clear"></div>
|
|
<hr />
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="row container-fluid new">
|
|
{% render controller(bundle_name ~ ":" ~ controller_name ~ ":flash") %}
|
|
|
|
{% for action,template in index_actions %}
|
|
{% include template %}
|
|
{% endfor %}
|
|
|
|
<div class="clear"></div>
|
|
<div class="sep"></div>
|
|
</div>
|
|
|
|
<div class="row container-fluid">
|
|
{% include "TrinityAdminBundle:BaseAdmin:pager.html.twig" %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block javascripts %}
|
|
{{ parent() }}
|
|
|
|
<script type="text/javascript">
|
|
var getWin = function() {
|
|
return (!window.frameElement && window.dialogArguments) || opener || parent || top;
|
|
}
|
|
|
|
var close = function() {
|
|
function close() {
|
|
tinymce.EditorManager.activeEditor.windowManager.close(window);
|
|
tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup
|
|
};
|
|
|
|
if (tinymce.isOpera) {
|
|
getWin().setTimeout(close, 0);
|
|
}
|
|
else {
|
|
this.close();
|
|
}
|
|
}
|
|
|
|
$('.tinymce_select').live("click", function(event){
|
|
var w = getWin();
|
|
tinymce = w.tinymce;
|
|
|
|
var mimes = $(this).data('mime');
|
|
var iconType = $(this).data('icon');
|
|
|
|
if (mimes) {
|
|
tinymce.EditorManager.activeEditor.insertContent('<a target="_blank" href="'+ $(this).data('file') +'"><img src="' + iconType +'"></a>');
|
|
} else{
|
|
tinymce.EditorManager.activeEditor.insertContent('<img src="' + $(this).data('file') +'">');
|
|
}
|
|
|
|
close();
|
|
});
|
|
</script>
|
|
{% endblock %}
|