view_announce.html

 1   <div class="row">
 2   	<div class="col-sm-3">
 3   		<#include "navigation_menu.html">
 4   	</div>
 5   	<div class="col-sm-9">
 6   		<div class="well">
 7   
 8   		<#if isExtendInstalled?? && isExtendInstalled && announce.published && !announce.suspended && !announce.suspendedByUser>
 9   			@ExtenderParameter[${announce.id},announce,opengraph]@
 10   		</#if>
 11   		<#if allow_access>
 12   			<div class="portlet-background append-bottom">
 13   				<legend>
 14   					${announce.title}
 15   				</legend>
 16   				<div class="">
 17   					<#if user_is_author>
 18   						<!-- user controls on his announce -->
 19   						<div class="possible-actions">
 20   							#i18n{announce.view_announce.actions.title}:
 21   							<a href="jsp/site/Portal.jsp?page=announce&action=modify_announce&announce_id=${announce.id}">
 22   								<img src="images/local/skin/plugins/announce/actions/modify.png" alt="#i18n{announce.my_announces.actionTitleModify}" title="#i18n{announce.my_announces.actionTitleModify}"/>
 23   							</a>
 24   							<a href="jsp/site/Portal.jsp?page=announce&action=delete_announce&announce_id=${announce.id}">
 25   								<img src="images/local/skin/plugins/announce/actions/delete.png" alt="#i18n{announce.my_announces.actionTitleDelete}" title="#i18n{announce.my_announces.actionTitleDelete}"/>
 26   							</a>
 27   
 28   							<#if !announce.suspendedByUser>
 29   								<a href="jsp/site/Portal.jsp?page=announce&action=suspend_by_user&announce_id=${announce.id}">
 30   									<img src="images/local/skin/plugins/announce/actions/suspend_by_user.png" alt="#i18n{announce.my_announces.actionTitleSuspend}" title="#i18n{announce.my_announces.actionTitleSuspend}"/>
 31   								</a>
 32   							<#else>
 33   								<a href="jsp/site/Portal.jsp?page=announce&action=enable_by_user&announce_id=${announce.id}">
 34   									<img src="images/local/skin/plugins/announce/actions/enable_by_user.png" alt="#i18n{announce.my_announces.actionTitleEnable}" title="#i18n{announce.my_announces.actionTitleEnable}"/>
 35   								</a>
 36   							</#if>
 37   						</div>
 38   					</#if>
 39   
 40   					<#if user?exists && user.name == announce.userName>
 41   						<!-- Eventual messages -->
 42   						<#if !announce.published && !announce.suspended>
 43   							<div >
 44   								<div class="notice">#i18n{announce.view_announce.message.notPublishedYet}</div>
 45   							</div>
 46   						<#else>
 47   							<#if announce.suspendedByUser>
 48   								<div class="portlet-background-content -lutece-border-radius-bottom">
 49   									<div class="notice">#i18n{announce.view_announce.message.suspendedByUser}</div>
 50   								</div>
 51   							<#elseif announce.suspended>
 52   								<div class="portlet-background-content -lutece-border-radius-bottom">
 53   									<div class="error">#i18n{announce.view_announce.message.suspended}</div>
 54   								</div>
 55   							</#if>
 56   						</#if>
 57   					</#if>
 58   					<#if isExtendInstalled?? && isExtendInstalled && announce.published && !announce.suspended && !announce.suspendedByUser>
 59   						<div class="row-fluid">
 60   							<div class="span3 offset9">
 61   								<div class="pull-right">
 62   									@Extender[${announce.id},announce,opengraph,{footer:false, header:false}]@
 63   									@Extender[${announce.id},announce,hit,{show:true}]@
 64   									@Extender[${announce.id},announce,rating,{show:"all"}]@
 65   								</div>
 66   							</div>
 67   						</div>
 68   					</#if>
 69   
 70   					<div class="form-horizontal well">
 71   					<#if announce.category.displayPrice>
 72   						<div class="form-group">
 73   							<label class="col-sm-2 control-label" for='price'>#i18n{announce.view_announce.price}</label>
 74   							<div class="col-sm-10" id="price">
 75   								${announce.price}
 76   							</div>
 77   						</div>
 78   					</#if>
 79   					<div class="form-group">
 80   						<label class="col-sm-2 control-label" for="contact">#i18n{announce.view_announce.contactInformation}</label>
 81   						<div class="col-sm-10" id="contact">
 82   							${announce.contactInformation}
 83   						</div>
 84   					</div>
 85   					<div class="form-group">
 86   						<label class="col-sm-2 control-label" for="description">#i18n{announce.view_announce.description.title}</label>
 87   						<div class="col-sm-10" id="description">
 88   							${announce.description}
 89   						</div>
 90   					</div>
 91   					<#assign imageIndex = 1>
 92   					<#list list_responses as response>
 93   		      	<#if response.toStringValueResponse?has_content || response.file??>
 94   		         	<#if entrySave?exists && entrySave.idEntry!=response.entry.idEntry>
 95   		          	 		</div>
 96   		             	</div>
 97   		             	<#if isImage?? && isImage>
 98   										</div>
 99   		            		<#assign isImage = false>
 100   		             	</#if>
 101   		      			</#if>
 102   					<#if response.field?? && response.field.title??>
 103   							<#if response.field.title == "X">
 104   								<#assign lat = response.toStringValueResponse>
 105   							<#elseif response.field.title == "Y">
 106   								<#assign lon = response.toStringValueResponse>
 107   							<#elseif response.field.title == "idAddress">
 108   							<#elseif response.field.title == "address">
 109   								<#assign addressAnnounce = response.toStringValueResponse>
 110   								<div class="form-group">
 111   									<label class="col-sm-2 control-label" for="response">${response.entry.title}</label>
 112   									<div class="col-sm-10" id="response">
 113   										<#list list_entryTypeGeolocation as entry>
 114   											<#if entry.mapProvider?has_content && entry.idEntry == response.entry.idEntry >
 115   												${addressAnnounce}
 116   												<#include entry.mapProvider.htmlRecapCode />
 117   											</#if>
 118   
 119   										</#list>
 120   									</div>
 121   								</div>
 122   							</#if>
 123   		       			<#elseif !entrySave?exists || entrySave.idEntry!=response.entry.idEntry>
 124   		                  	<#assign entrySave=response.entry>
 125   		                		<div class="form-group">
 126   		                    	    <label class="col-sm-2 control-label" for="response">${response.entry.title}</label>
 127   		                            <div class="col-sm-10" id="response">
 128   		                            <#if response.file?? && response.file.idFile &gt; 0>
 129   		                            	<#assign isImage = true>
 130   																		<div id="gallery">
 131   																			<a title="#i18n{announce.view_announce.imagesCaption}" href="image?resource_type=announce_img&id=${response.idResponse}">
 132   																				<img src="image?resource_type=announce_img&id=${response.idResponse}" title="${announce.title} - image ${imageIndex}" alt="#i18n{announce.view_announce.imagesCaption}" />
 133   																			</a>
 134   									<#elseif response.entry.entryType.beanName?? && response.entry.entryType.beanName=="announce.entryTypeDate">
 135   										<#assign dateval = response.responseValue?number?number_to_date?iso_local>
 136   										${dateval}
 137   		                            <#else>
 138   
 139   		                            	${response.toStringValueResponse}
 140   		                            </#if>
 141   		                  	    <#else>
 142   			                    	<#if isImage?? && isImage>
 143   															<a title="#i18n{announce.view_announce.imagesCaption}" href="image?resource_type=announce_img&id=${response.idResponse}">
 144   																<img src="image?resource_type=announce_img&id=${response.idResponse}" title="${announce.title} - image ${imageIndex}" alt="#i18n{announce.view_announce.imagesCaption}" />
 145   															</a>
 146   			                    	<#else>
 147   			                    		<br />${response.toStringValueResponse}
 148   			                    	</#if>
 149   			                 	</#if>
 150   							</#if>
 151   							<#assign imageIndex=imageIndex+1>
 152   						</#list>
 153   						</div>
 154   					</div>
 155   					<#if isExtendInstalled?? && isExtendInstalled && announce.published && !announce.suspended && !announce.suspendedByUser >
 156   						@Extender[${announce.id},announce,comment]@
 157   						@Extender[${announce.id},announce,feedback]@
 158   						@Extender[${announce.id},announce,opengraph,{footer:true}]@
 159   					</#if>
 160   				</div>
 161   			</div>
 162   		</div>
 163   		<#else>
 164   			<div class="well">
 165   				<legend>#i18n{announce.view_announce.unvailableTitle}</legend>
 166   				<div>
 167   					<div class="notice">#i18n{announce.view_announce.message.unvailable}</div>
 168   				</div>
 169   			</div>
 170   		</#if>
 171   	</div>
 172   	</div>
 173   </div>