 		if end < total_pages - 1
 			pages.push '...'
 			pages.push total_pages - 1
-		show_pages 0 < index, pages, index < total_pages - 1
+		show_pages enable_previous, pages, enable_next
 
 
 resize = ->

	total_pages = Math.floor total / 10
	if total_pages % 10 != 1
		total_pages += 1
	if index >= total_pages or total_pages == 0
		throw new Error("Not Implemented")

	if total_pages <= 11
		show_pages 0 < index, [0...total_pages], index < total_pages - 1
	else
		start = index - 4
		end = index + 4
		if start <= 2
			start = 0
		if end >= total_pages - 3

		tasks_element.appendChild task

render_pages = (total) ->
	show_pages = (enable_previous, pages, enable_next) ->
		pages_element.innerHTML = ''

		previous = document.createElement 'a'
		previous.textContent = '«'
		previous.classList.add 'previous'
		if enable_previous
			previous.onclick = ->
				index--
				refresh()
