diff options
-rw-r--r-- | Assistant/WebApp/DashBoard.hs | 3 | ||||
-rw-r--r-- | templates/dashboard/transfers.hamlet | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Assistant/WebApp/DashBoard.hs b/Assistant/WebApp/DashBoard.hs index 6e71e9cc6..73d9d229a 100644 --- a/Assistant/WebApp/DashBoard.hs +++ b/Assistant/WebApp/DashBoard.hs @@ -52,6 +52,9 @@ transfersDisplay warnNoScript = do , $(widgetFile "dashboard/transfers") ) else $(widgetFile "dashboard/transfers") + where + isrunning info = not $ + transferPaused info || isNothing (startedTime info) {- Called by client to get a display of currently in process transfers. - diff --git a/templates/dashboard/transfers.hamlet b/templates/dashboard/transfers.hamlet index 6ace2ae84..1953f9a3c 100644 --- a/templates/dashboard/transfers.hamlet +++ b/templates/dashboard/transfers.hamlet @@ -27,8 +27,8 @@ <div .progress .progress-striped> <div .bar style="width: #{percent};"> <div .btn-group .span2> - $if isNothing (startedTime info) - ^{actionButton (StartTransferR transfer) Nothing "btn" "icon-play"} - $else + $if isrunning info ^{actionButton (PauseTransferR transfer) Nothing "btn" "icon-pause"} + $else + ^{actionButton (StartTransferR transfer) Nothing "btn" "icon-play"} ^{actionButton (CancelTransferR transfer) Nothing "btn" "icon-remove"} |