Populate History list with data from database and implement item click