Method: Exceler.export_item_html

Defined in:
lib/exceler.rb

.export_item_html(items, title, subtitle) ⇒ Object

タスクの状況をHTMLにする。transform task status to html string.

Args

items

アイテムの配列

Return

HTML Content



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/exceler.rb', line 293

def self.export_item_html( items , title , subtitle )
	s=""
	if( title != nil )
		s+="<p class='exceler-title'><h3>"+title
		if( subtitle != nil )
			s+=+"-" + subtitle+ ":" + items.length.to_s
		end
		s+="</h3><br>"
	end
	s += "<table class='exceler-table'>"
	for item in items
		s+="<tr>"
		if( item.file != nil )
			s+=( "<td>"+ item.file + "</td>" )
		end
		if( item.content != nil )
			s+=( "<td>"+ item.content.to_s + "</td>" )
		end
		if( item.limit != nil )
			s+=( "<td>"+ item.limit.to_s + "</td>" )
		end
		s+="</td>"
	end
	s+= "</table>"
	s+= "</p>"	
	return s
end