Mys.wareIndexListItem = function(data, config)
{
	Mys.wareIndexListItem.superclass.constructor.call(this, data, config);
};

Ext.extend(Mys.wareIndexListItem, Mys.TemplateItem, {
	className : "mys-ware-item",
	id : "item_id",
	
	template : (new Ext.Template([
		'<div class="{className}" id="{className}-{item_id}">',
			'<div class="mys-ware-img"><img src="/images/common/dot_bl.gif" width="2" height="2" /></div>',
			'<nobr class="mys-ware-list">{newImage}<a href="{viewURL}" class="txt1166 go-view" title="{summary}" {target}>{title}</a></nobr>',
		'</div>'
	
	])).compile(),
	
	prepareData : function(data)
	{
		data = Mys.wareIndexListItem.superclass.prepareData.call(this, data);
		
		data.title = data.title || "제목없음";
		data.summary = (data.summary || "내용 없음").replace(/\"/g, "");
		
		data.viewURL = ViewManager.getViewURL(data);
		
		var insertDate = Date.parseDate(data.insert_date, "Y-m-d H:i:s");
		if(insertDate && (new Date).getTime() - insertDate.getTime() < 1000 * 60 * 60 * 24 * 7)
			data.newImage = '<img src="/images/main/new.gif" class="new-image"/>';
		else
			data.newImage = "";
		
		return data;
	}
});