<table width="100%" height="100%" border="0" CELLSPACING="0" CELLPADDING="0">
    <tr valign="top">


    	#if $portlet.getTypeName() == 'Worktop':
    		<td>
    			#include source = $getFileContents($staticJstlPath+""+$portlet.getJstlFile())
    		</td>
        #else if $portlet.getConfig() and $portlet.getTypeName() == 'Report':
        	<td>
	        	 <script>
				    var url = '$portlet.getConfig().getValue('Url')';
				    var groupby = $portlet.getConfig().getValue('GroupBy');
				    var measures = $portlet.getConfig().getValue('Measures');
				    var chart = $portlet.getConfig().getValue('Chart');
				    var theme = '$portlet.getConfig().getValue('Theme')';
				    var filterList = '$portlet.getConfig().getValue('Filter')';
				    var filterjson = $portlet.getDefaultFilter();
				</script>
				<textarea id="layout" style="display: none;">
					#include source = $getFileContents($staticJstlPath+"/static/jstl/reports/report.layout.jstl")
				</textarea>
				<textarea id="parameter" style="display: none;">
				    $getFileContents($staticJstlPath+"/static/jstl/reports/report.filter.jstl")
				</textarea>
				<textarea id="series1" style="display: none;">
				    $getFileContents($staticJstlPath+"/static/jstl/reports/chart.series1.jstl")
				</textarea>
				 <textarea id="series2" style="display: none;">
				    $getFileContents($staticJstlPath+"/static/jstl/reports/chart.series2.jstl")
				</textarea>
				<textarea id="table" style="display: none;">
				    $getFileContents($staticJstlPath+"/static/jstl/reports/report.table.jstl")
				</textarea>
			</td>
			<td align="left" id="$portlet.getPortletId()" class="portlet {type:'$portlet.getControllerType()', typeName:'$portlet.getTypeName()', url:url, groupby:groupby, measures:measures, chart:chart, theme:theme}">
				<div style="font-weight:bold;" class="sel">Please Wait  <img align="bottom" src="/static/images/please_wait.gif"/></div>
			</td>
        #else
        <td>
	        <script>
	        	var validate = typeof validateImmediate=="undefined"?false:validateImmediate
	        </script>

	        <textarea id="layout" style="display: none;">
				#include source = $getFileContents($staticJstlPath+"/static/jstl/portlet.layout.jstl")
			</textarea>
			<textarea id="content" style="display: none;">
					<input type='hidden'></input>
	    			#filter WebSafe
						$getFileContents($staticJstlPath+""+$portlet.getJstlFile())
					#end filter
			</textarea>

			#if $portlet.getUrl().__contains__("/report/") and $portlet.getTypeName() == 'Inbox' and len($portlet.getDefaultFilter())>2:
				 <script>
				 	var filterjson = $portlet.getDefaultFilter();
				 </script>
				<textarea id="parameter" style="display: none;">
						$getFileContents($staticJstlPath+"/static/jstl/reports/report.filter.jstl")
				</textarea>
			#end if
		</td>
        <td id="$portlet.getPortletId()" class="portlet {type: '$portlet.getControllerType()', typeName: '$portlet.getTypeName()', form: '$portlet.getForm()', url: '$portlet.getUrl()', filter: $portlet.getFilter(), validate:validate}">
        </td>
        #end if
        #if $httprequest.getNative().path.__contains__("report") and ($context.getUser().getValue('IsAdmin') or ($context.getUser().getSheetMetadata().getPublicCellMetadataDict().has_key('UserProfile') and $context.getUser().getValue('UserProfile') == 'Administration')):
        	<td style="padding:10px 10px 10px 10px;width:65px;display:block;cursor:pointer;text-align:center;">
					<img alt="Report Configuration" Title="Report Configuration" align="middle" src="/static/images/report-Preference.png" onClick="window.open('$httprequest.getNative().path/meta?mimetype=text/html', 'Edit Preferences','width=1000, height=500,left=150,top=50')">
					<a href="javascript:void(0);" style="text-decoration: none;color:black;" onClick="window.open('$httprequest.getNative().path/meta?mimetype=text/html', 'Edit Preferences','width=1000, height=500,left=150,top=50')">Report Configuration</a>
        	</td>
        #end if
    </tr>
</table>
