Conflicts:

	lib/Alchemy/Phrasea/Controller/Prod/Records.php
	templates/web/prod/Share/record.html.twig
This commit is contained in:
Nicolas Le Goff
2012-10-12 19:55:55 +02:00
parent 34e2fdba99
commit 45c3e564df
12 changed files with 551 additions and 409 deletions

View File

@@ -1,79 +1,76 @@
{% set preview = record.get_preview()%}
{% set permalink = preview.get_permalink() %}
{% if preview is iterable %}
<p>{% trans 'No preview available.' %}</p>
{% elseif permalink is none %}
{% elseif preview.get_permalink() is none %}
<p>{% trans 'No permalink available.' %}</p>
{% else %}
{% set type = record.get_type() %}
{% set url = permalink.get_url() %}
<div id="tabs">
<ul>
<li>
<a href="#share">{% trans 'reponses:: partager' %}</a>
</li>
</ul>
<div id="share">
{% set url = preview.get_permalink().get_url() %}
<div class="boxCloser" onclick="parent.hideDwnl();">{% trans 'boutton::fermer' %} ?></div>
<div id="tweet">
<div style="margin-left:20px;padding:10px 0 5px;"><a href="http://www.twitter.com/home/?status={{ url|url_encode }}view/" target="_blank"><img src="/skins/icons/twitter.ico" title="share this on twitter" style="vertical-align:middle;padding:0 5px;"/> Send to Twitter</a></div>
<div style="margin-left:20px;padding:5px 0 10px;"><a href="http://www.facebook.com/sharer.php?u={{ url|url_encode }}view/" target="_blank"><img src="/skins/icons/facebook.ico" title="share on facebook" style="vertical-align:middle;padding:0 5px;"/> Send to Facebook</a></div>
</div>
<div id="embed" style="text-align:center;padding:10px 0;">
<div style="text-align:left;margin-left:20px;padding:10px 0;">URL : </div>
{% if url is not empty %}
<input style="width:90%;" readonly="true" type="text" value="{{ url|url_encode }}view/" onfocus="this.focus();this.select();" onclick="this.focus();this.select();" />
<div style="text-align:left;margin-left:20px;padding:10px 0;">Embed :</div>
<textarea onfocus="this.focus();this.select();" onclick="this.focus();this.select();" style="width:90%;height:50px;" readonly="true" >
{% if type == 'video' %}
<object width="100%" height="100%" type="application/x-shockwave-flash" data="{{ app['phraseanet.registry'].get('GV_ServerName')}}include/jslibs/flowplayer/flowplayer-3.2.12.swf">
<param value="true" name="allowfullscreen">
<param value="always" name="allowscriptaccess">
<param value="high" name="quality">
<param value="false" name="cachebusting">
<param value="#000000" name="bgcolor">
<param value="config={&quot;clip&quot;:{&quot;url&quot;:&quot;{{ url|url_encode }}&quot;},&quot;playlist&quot;:[{&quot;url&quot;:&quot;{{ url|url_encode }}&quot;}]}" name="flashvars">
</object>
{% elseif type == 'document' %}
<object width="600" height="500" type="application/x-shockwave-flash" data="{{app['phraseanet.registry'].get('GV_ServerName')}}include/FlexPaper_flash/FlexPaperViewer.swf" style="visibility: visible; width: 600px; height: 500px; top: 0px;">
<param name="menu" value="false">
<param name="flashvars" value="SwfFile={{ url|url_encode }}&amp;Scale=0.6&amp;ZoomTransition=easeOut&amp;ZoomTime=0.5&amp;ZoomInterval=0.1&amp;FitPageOnLoad=true&amp;FitWidthOnLoad=true&amp;PrintEnabled=false&amp;FullScreenAsMaxWindow=false&amp;localeChain={{ app['locale'] }}">
<param name="allowFullScreen" value="true">
<param name="wmode" value="transparent">
</object>
{% elseif type == 'audio' %}
<object width="290" height="24" data="{{ app['phraseanet.registry'].get('GV_ServerName') }}include/jslibs/audio-player/player.swf" type="application/x-shockwave-flash">
<param value="{{ app['phraseanet.registry'].get('GV_ServerName') }}include/jslibs/audio-player/player.swf" name="movie"/>
<param value="playerID=1&amp;autostart=yes&amp;soundFile={{ url|url_encode }}" name="FlashVars"/>
<param value="high" name="quality"/>
<param value="false" name="menu"/>
</object>
{% else %}
<a href="{{ url|url_encode }}view/"><img src="{{ url|url_encode }}" title="" /></a>
{% endif %}
</textarea>
</div>
{% else %}
<div><{% trans 'Aucune URL disponible' %}</div>
{% endif %}
{% if url is not empty %}
<div id="tabs">
<ul>
<li>
<a href="#share">{% trans 'reponses:: partager' %}</a>
</li>
</ul>
<div id="share">
<div id="tweet">
<div style="margin-left:20px;padding:10px 0 5px;"><a href="http://www.twitter.com/home/?status={{ url|url_encode }}view/" target="_blank"><img src="/skins/icons/twitter.ico" title="share this on twitter" style="vertical-align:middle;padding:0 5px;"/> Send to Twitter</a></div>
<div style="margin-left:20px;padding:5px 0 10px;"><a href="http://www.facebook.com/sharer.php?u={{ url|url_encode }}view/" target="_blank"><img src="/skins/icons/facebook.ico" title="share on facebook" style="vertical-align:middle;padding:0 5px;"/> Send to Facebook</a></div>
</div>
<div id="embed" style="text-align:center;padding:10px 0;">
<div style="text-align:left;margin-left:20px;padding:10px 0;">URL : </div>
<div style="text-align:center;padding:20px 0;">
<input class="input-button" type="button" value="{% trans 'boutton::fermer' %}" onclick="parent.hideDwnl();" />
<input style="width:90%;" readonly="true" type="text" value="{{ url|url_encode }}view/" onfocus="this.focus();this.select();" onclick="this.focus();this.select();" />
<div style="text-align:left;margin-left:20px;padding:10px 0;">Embed :</div>
<textarea onfocus="this.focus();this.select();" onclick="this.focus();this.select();" style="width:90%;height:50px;" readonly="true" >
{% if type == 'video' %}
<object width="100%" height="100%" type="application/x-shockwave-flash" data="{{ app['phraseanet.registry'].get('GV_ServerName')}}include/jslibs/flowplayer/flowplayer-3.2.12.swf">
<param value="true" name="allowfullscreen">
<param value="always" name="allowscriptaccess">
<param value="high" name="quality">
<param value="false" name="cachebusting">
<param value="#000000" name="bgcolor">
<param value="config={&quot;clip&quot;:{&quot;url&quot;:&quot;{{ url|url_encode }}&quot;},&quot;playlist&quot;:[{&quot;url&quot;:&quot;{{ url|url_encode }}&quot;}]}" name="flashvars">
</object>
{% elseif type == 'document' %}
<object width="600" height="500" type="application/x-shockwave-flash" data="{{app['phraseanet.registry'].get('GV_ServerName')}}include/FlexPaper_flash/FlexPaperViewer.swf" style="visibility: visible; width: 600px; height: 500px; top: 0px;">
<param name="menu" value="false">
<param name="flashvars" value="SwfFile={{ url|url_encode }}&amp;Scale=0.6&amp;ZoomTransition=easeOut&amp;ZoomTime=0.5&amp;ZoomInterval=0.1&amp;FitPageOnLoad=true&amp;FitWidthOnLoad=true&amp;PrintEnabled=false&amp;FullScreenAsMaxWindow=false&amp;localeChain={{ app['locale'] }}">
<param name="allowFullScreen" value="true">
<param name="wmode" value="transparent">
</object>
{% elseif type == 'audio' %}
<object width="290" height="24" data="{{ app['phraseanet.registry'].get('GV_ServerName') }}include/jslibs/audio-player/player.swf" type="application/x-shockwave-flash">
<param value="{{ app['phraseanet.registry'].get('GV_ServerName') }}include/jslibs/audio-player/player.swf" name="movie"/>
<param value="playerID=1&amp;autostart=yes&amp;soundFile={{ url|url_encode }}" name="FlashVars"/>
<param value="high" name="quality"/>
<param value="false" name="menu"/>
</object>
{% else %}
<a href="{{ url|url_encode }}view/"><img src="{{ url|url_encode }}" title="" /></a>
{% endif %}
</textarea>
</div>
<div style="text-align:center;padding:20px 0;">
<input class="input-button" type="button" value="{% trans 'boutton::fermer' %}" />
</div>
</div>
</div>
</div>
<script language="javascript">
$(document).ready(function(){
$('#tabs').tabs();
$('input.ui-state-default').hover(
function(){$(this).addClass('ui-state-hover')},
function(){$(this).removeClass('ui-state-hover')}
);
});
</script>
<script language="javascript">
$(document).ready(function(){
$('#tabs').tabs();
$('input.ui-state-default').hover(
function(){$(this).addClass('ui-state-hover')},
function(){$(this).removeClass('ui-state-hover')}
);
});
</script>
{% else %}
<div><{% trans 'Aucune URL disponible' %}</div>
{% endif %}
{% endif %}