-
+ {% for w in rota.workers.all %}
+
- + {{ w.name }} + + + + {% empty %} +
- No workers assigned + {% endfor %} +
diff --git a/.gitignore b/.gitignore index 2cf93b1..fc82acb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ sample.txt -*.html *.log *.pyc *.bak @@ -16,5 +15,6 @@ web/rota cons/ - +output/*.html +output/tests/*.html *.sqlite3 \ No newline at end of file diff --git a/djangorota/djangorota/templates/rota/index.html b/djangorota/djangorota/templates/rota/index.html new file mode 100644 index 0000000..6d33cd6 --- /dev/null +++ b/djangorota/djangorota/templates/rota/index.html @@ -0,0 +1,27 @@ +{% load static %} + +
++ Add worker + Create rota +
+{{ initial.key|default:'Add option' }}
+ +| Key | Value | Actions |
|---|---|---|
{{ k }} |
+ {{ v|json_script:k }} |
+ + + + | +
| No options set | ||
| No options set | ||
Edit Rota Options
+ +Confirm delete
+ +Are you sure you want to delete shift {{ shift.name }}?
+ +Shift
+ +Confirm delete
+ +Are you sure you want to delete worker {{ worker.name }}?
+ +Add Worker
+ ++ Edit rota +
+{{ rota.description }}
+Period: {{ rota.start_date }} → {{ rota.end_date }}
+ ++ +
+ {% include 'rota/partials/worker_list.html' %} ++ View generated HTML (no solver) + Generate + Solve (may be slow) +
+View and edit the rota's `options` used by the builder. Click Edit to open a modal editor.
+| Key | +Default | +Current | +Description | +
|---|---|---|---|
{{ key }} |
+ {{ info.default|default:"" }} |
+ {{ info.current|default:"" }} |
+
+ {{ info.description|default:"" }}
+ {% comment %} Quick action: add default value if none set {% endcomment %}
+ {% if info.current is None or info.current == "" %}
+
+
+
+ {% endif %}
+ |
+
| No constraint metadata available | |||
+ +
+ +Status: {{ run.get_status_display }} ({{ run.status }})
+Created: {{ run.created_at|localtime }} started: {{ run.started_at|localtime }} finished: {{ run.finished_at|localtime }}
+ +{{ run.log }}
+ {{ run.result }}
+ + {% if run.export_html %} + View Stored Export + Download Stored Export + {% else %} + No stored export + {% endif %} +
+ + +Status: {{ run.status }}{% if run.finished_at %} — finished {{ run.finished_at }}{% endif %}
+ +{{ run.result|safe }}
+
+ + Download HTML + Back +
+{{ worker.email }} - {{ worker.site }}
+ +