JC:fixed bug in index view for if in edit. More CN.
JC: more CN. refectoring show view.