add some logic to show buttons.

For portal sites, add some logic to show buttons: if new sites, show
extract links, otherwise show add blocks and preview blocks.