<% if (m.subheading) { %>
	<div class="organizer_subheading">{{m.subheading}}</div>
<% } %>

<div
	id="organizer_item_{{m.id|escape}}"
	data-id="{{m.id|escape}}"
	onclick="zenarioO.pi.itemClick('{{m.id|escape}}', event);"
	class="
		organizer_row
		{{m.css_class|escape}}
		{{m.selected? ' organizer_selected' : ''|escape}}
		{{m.canClickThrough? 'organizer_doubleclickable' : ''|escape}}
		
		<% if (zenarioO.chooseButtonActive()) { %>
			{{zenarioO.checkItemPickable(m.id)? 'organizer_can_choose' : 'organizer_cant_choose'|escape}}
		<% } %>
	"
>
	
	<% if (zenarioO.inspectionViewEnabled()) { %>
		<div
			id="organizer_slidedown_view_toggle_{{m.id|escape}}"
			class="organizer_slidedown_view_toggle
				{{m.open_in_inspection_view? 'organizer_slidedown_view_toggle_open' : 'organizer_slidedown_view_toggle_closed'|escape}}
				organizer_cell"
			onclick="zenario.stop(event); zenarioO.toggleInspectionView('{{m.id|escape}}');"
		></div>
	<% } %>
	
	<div class="organizer_cell organizer_checkbox_col" onclick="zenarioO.pi.checkboxClick('{{m.id|escape}}', event); return false;" ondblclick="return zenario.stop(event);">
		<% if (m.showCheckbox) { %>
			<input
				type="{{zenarioO.selectionDisplayType()}}"
				{{m.selected? ' checked="checked"' : ''}}
				id="organizer_itemcheckbox_{{m.id|escape}}"
			/>
		<% } %>
	</div>
	<div
		class="organizer_cell firstcol listicon"
		style="width: {{zenarioO.firstColWidth}}px;"
	>
	
		<div class="organizer_list_view_icon_border" title="{{m.tooltip|escape}}">
			<div
				class="image organizer_item_image organizer_list_view_icon {{m.image_css_class|escape}}
			
					<% if (m.image) { %>
						organizer_list_view_image
						
						<%
							var ibs = zenarioO.tuix.item_buttons,
								nbs = zenarioO.tuix.inline_buttons,
								items = {};
							
							items[m.id] = true;
						%>
					
						<% if (ibs && ibs.view_image && !zenarioO.checkButtonHidden(ibs.view_image, items)) { %>
						
							organizer_clickable_thumbnail_image" onclick="zenarioO.itemButtonClick('view_image', '{{m.id|escape}}');
					
						<% } else if (nbs && nbs.view_image && !zenarioO.checkButtonHidden(nbs.view_image, items)) { %>
						
							organizer_clickable_thumbnail_image" onclick="zenarioO.inlineButtonClick('view_image', '{{m.id|escape}}');
					
						<% } else if (ibs && ibs.view && !zenarioO.checkButtonHidden(ibs.view, items)) { %>
						
							organizer_clickable_thumbnail_image" onclick="zenarioO.itemButtonClick('view', '{{m.id|escape}}');
					
						<% } else if (nbs && nbs.view && !zenarioO.checkButtonHidden(nbs.view, items)) { %>
						
							organizer_clickable_thumbnail_image" onclick="zenarioO.inlineButtonClick('view', '{{m.id|escape}}');
					
						<% } %>
				
						" style="background-image: url('{{m.image|escape}}');
					<% } %>
				"
			></div>
		</div>
		
		{{m.inline_buttons? '<div class="organizer_inline_buttons" style="width: ' + (m.inline_buttons.length * 20) + 'px;">' + zenarioT.microTemplate('zenario_organizer_list_inline_button', m.inline_buttons) + '</div>' : ''}} 
		 
		<% if (m.canClickThrough) { %>
			<a
				class="organizer_doubleclick"
				title="{{m.tooltip_when_link_is_active|escape}}"
				onclick="return zenarioO.itemClickThrough('{{m.id|escape}}', event);"
			></a>
		<% } %>
	</div>
	
	

	{{zenarioT.microTemplate('zenario_organizer_list_cell', m.cells)}}

</div>

<% if (zenarioO.inspectionViewEnabled()) { %>
	<% if (m.open_in_inspection_view) { %>
		<div id="organizer_slidedown_{{m.id|escape}}" class="organizer_slidedown_view organizer_slidedown_view_open">
			{{zenarioT.microTemplate(zenarioO.tuix.slidedown_view_microtemplate, {id: m.id})}}
		</div>
	<% } else { %>
		<div id="organizer_slidedown_{{m.id|escape}}" class="organizer_slidedown_view organizer_slidedown_view_closed"></div>
	<% } %>
<% } %>

<% if (m.subtotal) { %>
	<div class="organizer_subtotal">{{m.subtotal}}</div>
<% } %>

