Personally, I'd go with the i5 system. Simply because the i5 is a better gaming CPU. The 7770 is also an ok card for gaming (but obviously not as good as the R7 260x). The main thing is, you can easily change the card along the way, let's say in a year or two if you need more performance. A CPU is a lot harder to replace since you usually need to change the motherboard because of socket compatibility.
For these reasons, I'd go with the system that has the best CPU, with the idea that the video card can easily be replaced at a later time. And it's not as if the 7770 was a bad card, it will be able to play any game at medium settings, and even high settings in some.
But of course, if you could find an i5 system that has a R7 260x for the same price it would be ideal.