ECMS-6493: modify UI temple of share activity, improve code