Add All link on view pager
Yes see the Pager Options for your Block or Views Page:



EDIT:

Allow me to clarify. This gets the - All - text option into the configuration of the View. If you want custom business logic that says if there is 5 or more results I want to show/hide the Next and Previous and include the All options I recommend you look at hook_views_pre_view() or other Views hooks to implement hiding/removing options as needed. For ease I recommend hiding/showing the options using CSS or Javascript.

Again, this option builds the option into the page -- but doesn't really enforce your business logic.

EDIT 2:

The module Pagerer might get you a little further, but probably not all of your custom logic is possible out of the box with that module. It has an API to fine-grain it's custom pager views.