Merge branch '3.8'

Conflicts:
	lib/Alchemy/Phrasea/Controller/Prod/Export.php
	lib/Alchemy/Phrasea/Core/Version.php
	lib/Alchemy/Phrasea/Helper/Prod.php
	lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngine.php
	lib/Alchemy/Phrasea/SearchEngine/SphinxSearch/SphinxSearchEngine.php
	lib/classes/User/Adapter.php
	lib/classes/caption/Field/Value.php
	lib/classes/collection.php
	lib/classes/module/report/filter.php
	lib/classes/task/period/ftp.php
	templates/web/common/dialog_export.html.twig
	templates/web/report/ajax_dashboard_content_child.html.twig
	tests/Alchemy/Tests/Phrasea/Controller/Admin/UsersTest.php
This commit is contained in:
Romain Neutron
2013-12-18 12:12:58 +01:00
44 changed files with 389 additions and 170 deletions

View File

@@ -3,23 +3,27 @@
{% set b_height = b_h|default(b_w) %}
{% set b_ratio = b_width / b_height %}
{% set i_ratio = thumbnail.get_width() / thumbnail.get_height() %}
{% set thumbnail_height = thumbnail.get_height() > 0 ? thumbnail.get_height() : 120 %}
{% set thumbnail_width = thumbnail.get_width() > 0 ? thumbnail.get_width() : 120 %}
{% set i_ratio = thumbnail_width / thumbnail_height %}
{% if i_ratio > b_ratio%}
{% if b_width > thumbnail.get_width() %}
{% set d_width = thumbnail.get_width() %}
{% if b_width > thumbnail_width %}
{% set d_width = thumbnail_width %}
{% else %}
{% set d_width = b_width %}
{% endif %}
{% set d_height = d_width / thumbnail.get_width() * thumbnail.get_height() %}
{% set d_height = d_width / thumbnail_width * thumbnail_height %}
{% set top = (b_height - d_height) / 2 %}
{% else %}
{% if b_height > thumbnail.get_height() %}
{% set d_height = thumbnail.get_height() %}
{% if b_height > thumbnail_height %}
{% set d_height = thumbnail_height %}
{% else %}
{% set d_height = b_height %}
{% endif %}
{% set d_width = d_height * thumbnail.get_width() / thumbnail.get_height() %}
{% set d_width = d_height * thumbnail_width / thumbnail_height %}
{% set top = ((b_height - d_height) / 2) %}
{% endif %}
@@ -37,8 +41,8 @@
{% set random = thumbnail.get_random() %}
<div class="record record_document imgTips" style="width:{{d_width|round}}px;height:{{d_height|round}}px;top:{{top|round}}px;">
<div id="preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}" class="PNB" style=""></div>
<input type="hidden" name="width" value="{{thumbnail.get_width()}}"/>
<input type="hidden" name="height" value="{{thumbnail.get_height()}}"/>
<input type="hidden" name="width" value="{{thumbnail_width}}"/>
<input type="hidden" name="height" value="{{thumbnail_height}}"/>
</div>
<script type="text/javascript">
swfobject.embedSWF("/include/FlexPaper_flash/FlexPaperViewer.swf",
@@ -50,20 +54,20 @@
{% set random = thumbnail.get_random() %}
<div class="record record_audio audioTips" style="width:{{d_width|round}}px;height:{{d_height|round}}px;top:{{top|round}}px;">
<div id="preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}" class="PNB" style=""></div>
<input type="hidden" name="width" value="{{thumbnail.get_width()}}"/>
<input type="hidden" name="height" value="{{thumbnail.get_height()}}"/>
<input type="hidden" name="width" value="{{thumbnail_width}}"/>
<input type="hidden" name="height" value="{{thumbnail_height}}"/>
</div>
<script type="text/javascript">
swfobject.embedSWF("/include/jslibs/audio-player/player.swf",
"preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}",
"{{thumbnail.get_width()}}", "{{thumbnail.get_height()}}", "9.0.0", false, false,
"{{thumbnail_width}}", "{{thumbnail_height}}", "9.0.0", false, false,
{menu: "false",flashvars: "playerID=2&autostart=yes&noinfo=yes&animation=no&remaining=yes&soundFile={{thumbnail.get_url()}}", movie: "/include/jslibs/audio-player/player.swf", allowFullScreen :"true",wmode: "transparent"}, false);</script>
{% else %}
<img class="record record_image imgTips zoomable thumb" oncontextMenu="return(false);"
style="width:{{d_width|round}}px;height:{{d_height|round}}px;top:{{top|round}}px;"
src="{{thumbnail.get_url()}}" ondragstart="return false;">
<input type="hidden" name="width" value="{{thumbnail.get_width()}}"/>
<input type="hidden" name="height" value="{{thumbnail.get_height()}}"/>
<input type="hidden" name="width" value="{{thumbnail_width}}"/>
<input type="hidden" name="height" value="{{thumbnail_height}}"/>
{% endif %}
</div>