I'm trying to understand David Tong's http://www.damtp.cam.ac.uk/user/tong/gaugetheory.html, specifically the discussion around page 92 where he's arguing that a different symmetry group may the group of QCD, namely $G'=SU(N)/Z_N$ instead of $G=SU(N)$.

I understand that having $G'$ as a group leads to a different quantization of the $\theta$ term, but I want to know if this is really the crucial aspect? Namely, how does the cyclic group $Z_N$ act on the fundamental fields (quarks, gluons)? Can anybody show this invariance to me at the level of the Lagrangian? I'm a bit confused so even the most pedestrian computation would help :)