Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Commits
79a92a74
Commit
79a92a74
authored
8 years ago
by
Jacek Lebioda
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://git-r3lab.uni.lu/piotr.atyjaszyk/scheduling-system
parents
1505f3f4
a6ae9f0e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
smash/web/forms.py
+0
-1
0 additions, 1 deletion
smash/web/forms.py
smash/web/templates/visits/index.html
+60
-3
60 additions, 3 deletions
smash/web/templates/visits/index.html
smash/web/views.py
+6
-4
6 additions, 4 deletions
smash/web/views.py
with
66 additions
and
8 deletions
smash/web/forms.py
+
0
−
1
View file @
79a92a74
...
@@ -28,7 +28,6 @@ class WorkerAddForm(ModelForm):
...
@@ -28,7 +28,6 @@ class WorkerAddForm(ModelForm):
class
Meta
:
class
Meta
:
model
=
Worker
model
=
Worker
exclude
=
[
'
appointments
'
]
exclude
=
[
'
appointments
'
]
#fields = '__all__'
class
WorkerDetailForm
(
ModelForm
):
class
WorkerDetailForm
(
ModelForm
):
...
...
This diff is collapsed.
Click to expand it.
smash/web/templates/visits/index.html
+
60
−
3
View file @
79a92a74
...
@@ -23,11 +23,56 @@
...
@@ -23,11 +23,56 @@
{% block maincontent %}
{% block maincontent %}
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-5"
>
<h3>
Planning
</h3>
<h3>
Visits
</h3>
{% if visit_list %}
<table
id=
"visit_table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<th>
Subject name
</th>
<th>
Full information
</th>
<th>
Visit begins
</th>
<th>
Visit ends
</th>
<th>
Visit type
</th>
<th>
Finished?
</th>
</tr>
</thead>
<tbody>
{% for visit in visit_list %}
<tr>
<td>
{{ visit.subject.firstName }} {{ visit.subject.lastName }}
</td>
<td>
<button
type=
"button"
class=
"btn btn-block btn-default btn-xs"
>
See full information
</button>
</td>
<td>
{{ visit.visitBegin }}
</td>
<td>
{{ visit.visitEnd }}
</td>
<td>
{{ visit.get_visitType_display }}
</td>
<td>
{% if visit.visitFinished %}
<button
type=
"button"
class=
"btn btn-block btn-danger"
>
YES
</button>
{% else %}
<button
type=
"button"
class=
"btn btn-block btn-success"
>
NO
</button>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>
No visits to display.
</p>
{% endif %}
<hr
/>
None
</div>
</div>
</div>
</div>
{% endblock maincontent %}
{% endblock maincontent %}
...
@@ -39,4 +84,16 @@
...
@@ -39,4 +84,16 @@
<script
src=
"{% static 'AdminLTE/plugins/moment.js/moment.min.js' %}"
></script>
<script
src=
"{% static 'AdminLTE/plugins/moment.js/moment.min.js' %}"
></script>
<script
src=
"{% static 'AdminLTE/plugins/fullcalendar/fullcalendar.min.js' %}"
></script>
<script
src=
"{% static 'AdminLTE/plugins/fullcalendar/fullcalendar.min.js' %}"
></script>
<script>
$
(
function
()
{
$
(
'
#planning_table, #approaching_table
'
).
DataTable
({
"
paging
"
:
true
,
"
lengthChange
"
:
false
,
"
searching
"
:
true
,
"
ordering
"
:
true
,
"
info
"
:
true
,
"
autoWidth
"
:
false
});
</script>
{% endblock scripts %}
{% endblock scripts %}
This diff is collapsed.
Click to expand it.
smash/web/views.py
+
6
−
4
View file @
79a92a74
...
@@ -52,12 +52,14 @@ def logout(request):
...
@@ -52,12 +52,14 @@ def logout(request):
return
redirect
(
'
/login?error=
'
+
message
)
return
redirect
(
'
/login?error=
'
+
message
)
def
assignments
(
request
):
return
wrap_response
(
request
,
'
assignments/index.html
'
,
{})
def
visits
(
request
):
def
visits
(
request
):
return
wrap_response
(
request
,
'
visits/index.html
'
,
{})
visit_list
=
Visit
.
objects
.
order_by
(
'
-visitBegin
'
)
context
=
{
'
visit_list
'
:
visit_list
}
return
wrap_response
(
request
,
'
visits/index.html
'
,
context
)
def
subjects
(
request
):
def
subjects
(
request
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment