<!-- add listing photo -->

{rlHook name='addPhotoTop'}

<script type="text/javascript" src="{$smarty.const.RL_LIBS_URL}jquery/jquery.jcrop.js"></script>
<script src="{$rlTplBase}js/crop.js" type="text/javascript"></script>

<style type="text/css">
@import url("{$smarty.const.RL_LIBS_URL}jquery/jcrop/jquery.Jcrop.css");
</style>

<div class="content-padding">
	{if $listing.fields}
		{include file='blocks'|cat:$smarty.const.RL_DS|cat:'fieldset_header.tpl' id='photo_listing_details' name=$lang.listing_details tall=true}

		<a class="link-large" target="_blank" href="{$listing.url}">{if $listing.listing_title}{$listing.listing_title}{else}{assign var='phrase' value='pages+title+view_details'}{$lang.$phrase}{/if}</a>

		<div style="margin-top: 10px;">
			{foreach from=$listing.fields item='item' key='field' name='fListings'}
				{if !empty($item.value) && $item.Details_page && ($price_tag && $item.Key != 'price') || !$price_tag && $item.Key != 'time_frame'}
					{include file='blocks'|cat:$smarty.const.RL_DS|cat:'field_out.tpl'}
				{/if}
			{/foreach}
			{if $plan_info.name}
				<div class="table-cell clearfix" id="df_field_plan">
					<div class="name"><div>{$lang.plan}</div></div>
					<div class="value">{$plan_info.name}</div>
				</div>
			{/if}
		</div>
		
		{include file='blocks'|cat:$smarty.const.RL_DS|cat:'fieldset_footer.tpl'}
	{/if}
	
	{include file='blocks'|cat:$smarty.const.RL_DS|cat:'fieldset_header.tpl' id='crop_area' name=$lang.pictures_manager}
	{include file='blocks'|cat:$smarty.const.RL_DS|cat:'photo_manager.tpl'}
	{include file='blocks'|cat:$smarty.const.RL_DS|cat:'fieldset_footer.tpl'}

	<!-- file crop -->
	<div id="width_detect"></div>
	<div id="crop_block" class="hide">
		<div style="margin: 15px 0 0;"></div>
		{include file='blocks'|cat:$smarty.const.RL_DS|cat:'fieldset_header.tpl' id='crop_area' name=$lang.photo_cropping}
	
		<div class="dark">{$lang.crop_notice}</div>
		<div id="crop_obj" style="padding: 10px 0;"></div>
	
		<input type="button" class="button" value="{$lang.rl_accept}" id="crop_accept" /> 
		<a class="close red margin" id="crop_cancel" href="">{$lang.cancel}</a>
	
		{include file='blocks'|cat:$smarty.const.RL_DS|cat:'fieldset_footer.tpl'}
	</div>
	<!-- file crop end -->
</div>

{rlHook name='addPhotoBottom'}

<!-- add listing photo end -->