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
13e3552f
Commit
13e3552f
authored
8 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
when editing appoijntment info about subject is visible (and link to
edit subject is available)
parent
87d4ad84
No related branches found
No related tags found
1 merge request
!5
Appointments dev
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
smash/web/templates/appointments/edit.html
+33
-1
33 additions, 1 deletion
smash/web/templates/appointments/edit.html
smash/web/views.py
+9
-1
9 additions, 1 deletion
smash/web/views.py
with
42 additions
and
2 deletions
smash/web/templates/appointments/edit.html
+
33
−
1
View file @
13e3552f
...
...
@@ -58,7 +58,7 @@
Status:
</label>
<div
class=
"btn-group-vertical col-sm-8"
>
<label
class=
"btn btn-primary"
>
{{ status }}
</label>
<label
class=
"btn btn-primary"
>
{{
appointment.
status }}
</label>
<a
href=
"{% url 'web.views.appointment_mark' id 'finished' %}"
class=
"btn btn-warning btn-block"
>
Mark as finished
</a>
<a
href=
"{% url 'web.views.appointment_mark' id 'cancelled' %}"
class=
"btn btn-warning btn-block"
>
Mark as cancelled
</a>
<a
href=
"{% url 'web.views.appointment_mark' id 'no_show' %}"
class=
"btn btn-warning btn-block"
>
Mark as no show
</a>
...
...
@@ -74,6 +74,38 @@
<a
href=
"{% url 'web.views.appointments' %}"
class=
"btn btn-block btn-default"
onclick=
"history.back()"
>
Cancel
</a>
</div>
</div>
<!-- /.box-footer -->
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Subject's details
</h3>
</div>
<form
class=
"form-horizontal"
>
<div
class=
"box-body"
>
{% for field in subject_form %}
<div
class=
"col-md-6 form-group {% if field.errors %}has-error{% endif %}"
>
<label
for=
"{# TODO #}"
class=
"col-sm-4 control-label"
>
{{ field.label }}
</label>
<div
class=
"col-sm-8"
>
{{ field|disable|add_class:'form-control' }}
</div>
{% if field.errors %}
<span
class=
"help-block"
>
{{ field.errors }}
</span>
{% endif %}
</div>
{% endfor %}
</div>
<!-- /.box-body -->
<div
class=
"box-footer"
>
<a
href=
"{% url 'web.views.subject_edit' appointment.visit.subject.id %}"
type=
"button"
class=
"btn btn-block btn-default"
>
Edit subject
</a>
<a
href=
"{% url 'web.views.subjects' %}"
class=
"btn btn-block btn-default"
onclick=
"history.back()"
>
Back
</a>
</div>
<!-- /.box-footer -->
</form>
</form>
</div>
{% endblock %}
...
...
This diff is collapsed.
Click to expand it.
smash/web/views.py
+
9
−
1
View file @
13e3552f
...
...
@@ -554,7 +554,15 @@ def appointment_edit(request, id):
return
redirect
(
appointments
)
else
:
form
=
AppointmentEditForm
(
instance
=
the_appointment
)
return
wrap_response
(
request
,
'
appointments/edit.html
'
,
{
'
form
'
:
form
,
'
id
'
:
id
,
'
status
'
:
the_appointment
.
status
})
subject_form
=
SubjectDetailForm
(
instance
=
the_appointment
.
visit
.
subject
)
return
wrap_response
(
request
,
'
appointments/edit.html
'
,
{
'
form
'
:
form
,
'
subject_form
'
:
subject_form
,
'
id
'
:
id
,
'
appointment
'
:
the_appointment
})
def
appointment_edit_datetime
(
request
,
id
):
...
...
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