diff options
Diffstat (limited to 'templates/status.tpl')
-rw-r--r-- | templates/status.tpl | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/templates/status.tpl b/templates/status.tpl index 9201f04..2665861 100644 --- a/templates/status.tpl +++ b/templates/status.tpl @@ -11,28 +11,38 @@ <h1>Status of Lorry Controller</h1> -% if running_queue: -<form method="POST" action="/1.0/stop-queue"> - <p>New jobs are allowed. - <input type="submit" name="submit" value="Don't allow new jobs" /> - <input type="hidden" name="redirect" value="/1.0/status-html" /> - </p> -</form> +% if links: +% if running_queue: + <form method="POST" action="/1.0/stop-queue"> + <p>New jobs are allowed. + <input type="submit" name="submit" value="Don't allow new jobs" /> + <input type="hidden" name="redirect" value="/1.0/status-html" /> + </p> + </form> +% else: + <form method="POST" action="/1.0/start-queue"> + <p>New jobs are NOT allowed. + <input type="submit" name="submit" value="Allow new jobs" /> + <input type="hidden" name="redirect" value="/1.0/status-html" /> + </p> + </form> +% end % else: -<form method="POST" action="/1.0/start-queue"> - <p>New jobs are NOT allowed. - <input type="submit" name="submit" value="Allow new jobs" /> - <input type="hidden" name="redirect" value="/1.0/status-html" /> - </p> -</form> +% if running_queue: + <p>New jobs are allowed.</p> +% else: + <p>New jobs are NOT allowed.</p> +% end % end -<form method="POST" action="/1.0/read-configuration"> - <p> - <input type="submit" name="submit" value="Re-read configuration" /> - <input type="hidden" name="redirect" value="/1.0/status-html" /> - </p> -</form> +% if links: + <form method="POST" action="/1.0/read-configuration"> + <p> + <input type="submit" name="submit" value="Re-read configuration" /> + <input type="hidden" name="redirect" value="/1.0/status-html" /> + </p> + </form> +% end <p>Maximum number of jobs: {{max_jobs}}.</p> |