mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
92 lines
4.3 KiB
Twig
92 lines
4.3 KiB
Twig
{% macro format_diapo(record, session) %}
|
|
{% import 'common/thumbnail.html.twig' as thumbnail %}
|
|
<div class="diapo">
|
|
{{thumbnail.format(record.get_thumbnail(), 100, 100, '', session, true)}}
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
<style type="text/css">
|
|
.record_list .sortable.ui-sortable-placeholder{
|
|
width:112px;
|
|
height:118px;
|
|
position:relative;
|
|
float:left;
|
|
}
|
|
</style>
|
|
|
|
<div class="PNB" style="height:200px;bottom:auto;">
|
|
<div class="PNB10 record_list" style="overflow:auto;">
|
|
{% for record in publishing.get_elements %}
|
|
<div class="sortable" style="position:relative;float:left;">
|
|
{{ _self.format_diapo(record, session) }}
|
|
<form>
|
|
<input type="hidden" name="sbas_id" value="{{record.get_sbas_id()}}" />
|
|
<input type="hidden" name="record_id" value="{{record.get_record_id()}}" />
|
|
</form>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
<form class="main_form" method="post" action="/prod/feeds/entry/create/">
|
|
<input type="hidden" name="lst" value="{{ publishing.get_serialize_list() }}" />
|
|
<div class="PNB" style="top:200px; bottom:50px;">
|
|
<div class="PNB" style="width:50%; right:auto;">
|
|
<div class="PNB10 fields">
|
|
{% set title = '' %}
|
|
{% set desc = '' %}
|
|
{% if publishing.is_basket() %}
|
|
{% set title = publishing.get_original_basket().getName() %}
|
|
{% set desc = publishing.get_original_basket().getDescription() %}
|
|
{% endif %}
|
|
<label for="feed_add_title">{% trans 'publication : titre' %}</label>
|
|
<input class="required_text" type="text" name="title" id="feed_add_title" value="{{title}}" />
|
|
<label for="feed_add_subtitle">{% trans 'publication : sous titre' %}</label>
|
|
<textarea id="feed_add_subtitle" name="subtitle">{{desc}}</textarea>
|
|
<label for="feed_add_author_name">{% trans 'publication : autheur' %}</label>
|
|
<input class="required_text" type="text" name="author_name" id="feed_add_author_name" value="{{ user.get_display_name() }}" />
|
|
<label for="feed_add_author_mail">{% trans 'publication : email autheur' %}</label>
|
|
<input class="required_text" type="text" name="author_mail" id="feed_add_author_mail" value="{{ user.get_email() }}" />
|
|
</div>
|
|
</div>
|
|
<div class="PNB" style="width:50%;left:auto;">
|
|
<div class="PNB10 feeds">
|
|
<h1>{% trans 'Fils disponibles' %}</h1>
|
|
<div class="list">
|
|
{% for feed in feeds.get_feeds() %}
|
|
{% if feed.is_publisher(user) %}
|
|
<div class="feed {% if loop.index is odd%}odd{% endif %}">
|
|
<span>{{ feed.get_title() }}</span>
|
|
{% if feed.is_public() %}
|
|
<img src="/skins/icons/ligth-on.png" title="{% trans 'This feed is public' %}"/>
|
|
{% endif %}
|
|
<input type="hidden" value="{{ feed.get_id() }}"/>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<input type="hidden" value="" name="feed_id" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="PNB" style="top:auto; height:50px; text-align:center;">
|
|
<div class="PNB10">
|
|
<button class="valid_form btn btn-inverse">{% trans 'boutton::publier' %}</button>
|
|
<button class="close_dialog btn btn-inverse">{% trans 'boutton::annuler' %}</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$('#modal_feed .record_list').sortable({
|
|
stop:function(event, ui){
|
|
var lst = [];
|
|
$('#modal_feed .record_list .sortable form').each(function(i, el){
|
|
lst.push($('input[name="sbas_id"]', el).val()+'_'+$('input[name="record_id"]', el).val());
|
|
});
|
|
$('#modal_feed form.main_form input[name="lst"]').val(lst.join(';'));
|
|
}
|
|
});
|
|
});
|
|
</script> |