salmanishere / pagure

Forked from pagure 5 years ago
Clone

2955bbc Show a rebase button in the UI when needed

Authored and Committed by pingou 5 years ago
    Show a rebase button in the UI when needed
    
    The rebase button shows in two situations:
    - the PR can be merged via a merge commit (merge status: MERGE)
    - the project enforces fast-forward merge and needs to be rebased
      (merge status: NEEDSREBASE)
    
    A lot of the churn after that is to compensate for the use of toggleClass,
    since it both adds and removes, we need to explicitly remove all the
    class it could possibly have added and add the ones that were there before
    on all the different elements touched.
    
    Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>