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
fe21863a
Commit
fe21863a
authored
8 years ago
by
Piotr Matyjaszyk
Browse files
Options
Downloads
Patches
Plain Diff
Halfway working subject list
parent
34f978fd
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/models.py
+1
-0
1 addition, 0 deletions
smash/web/models.py
smash/web/templates/subjects/index.html
+24
-48
24 additions, 48 deletions
smash/web/templates/subjects/index.html
smash/web/views.py
+7
-2
7 additions, 2 deletions
smash/web/views.py
with
32 additions
and
50 deletions
smash/web/models.py
+
1
−
0
View file @
fe21863a
...
...
@@ -35,6 +35,7 @@ class Subject(models.Model):
address
=
models
.
CharField
(
max_length
=
255
)
postalCode
=
models
.
CharField
(
max_length
=
6
)
city
=
models
.
CharField
(
max_length
=
50
)
country
=
models
.
CharField
(
max_length
=
50
)
screeningNo
=
models
.
CharField
(
max_length
=
50
)
ndno
=
models
.
CharField
(
max_length
=
6
)
visitNumber
=
models
.
IntegerField
()
...
...
This diff is collapsed.
Click to expand it.
smash/web/templates/subjects/index.html
+
24
−
48
View file @
fe21863a
...
...
@@ -11,7 +11,7 @@
{% block page_header %}Subjects{% endblock page_header %}
{% block page_description %}{% endblock page_description %}
{% block breadcrumb %}
{% block breadcrumb %}
<li><a
href=
"#"
><i
class=
"fa fa-dashboard"
></i>
Dashboard
</a></li>
<li
class=
"active"
>
Subjects
</li>
{% endblock breadcrumb %}
...
...
@@ -25,81 +25,57 @@
</div>
<div
class=
"box-body"
>
<table
id=
"table"
class=
"table table-bordered table-striped"
>
{% if subjects_list %}
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<th>
No.
</th>
<th>
First name
</th>
<th>
Last name
</th>
<th>
Country
</th>
<th>
Language
</th>
<th>
Language
s
</th>
<th>
Type
</th>
<th>
Last visit
</th>
<th>
Details
</th>
<th>
Edit
</th>
<th>
Resigned
</th>
<th>
Delete
</th>
</tr>
</thead>
<tbody>
{% for subject in subjects_list %}
<tr>
<td>
#1
</td>
<td>
Johny
</td>
<td>
English
</td>
<td>
Luxembourg
</td>
<td><span
class=
"label label-success"
>
english
</span></td>
<td>
Patient - IPD
</td>
<td>
12-10-2016
</td>
<td><button
type=
"button"
class=
"btn btn-block btn-default"
>
Details
</button></td>
<td><button
type=
"button"
class=
"btn btn-block btn-default"
>
Edit
</button></td>
<td>
<span
class=
"label label-info"
>
No
</span>
</td>
</tr>
<tr>
<td>
#2
</td>
<td>
Henry
</td>
<td>
French
</td>
<td>
France
</td>
<td>
{{ forloop.counter }}
</td>
<td>
{{ subject.firstName }}
</td>
<td>
{{ subject.lastName }}
</td>
<td>
{{ subject.country }}
</td>
<td>
<span
class=
"label label-success"
>
english
</span>
<span
class=
"label label-success"
>
french
</span>
</td>
<td>
Patient - IPD
</td>
<td>
12-10-2015
</td>
<td><button
type=
"button"
class=
"btn btn-block btn-default"
>
Details
</button></td>
<td><button
type=
"button"
class=
"btn btn-block btn-default"
>
Edit
</button></td>
<td>
<span
class=
"label label-info"
>
No
</span>
</td>
</tr>
<tr>
<td>
#3
</td>
<td>
Karim
</td>
<td>
English
</td>
<td>
Luxembourg
</td>
<td>
<span
class=
"label label-success"
>
english
</span>
<span
class=
"label label-success"
>
french
</span>
</td>
<td>
Control
</td>
{% autoescape off %}
{% for language in subject.languages.all %}
{{language.image_img}}
{% endfor %}
{% endautoescape %}
</td>
<td>
{{ subject.subjectStatus }}
</td>
<td>
12-10-2016
</td>
<td><button
type=
"button"
class=
"btn btn-block btn-default"
>
Details
</button></td>
<td><button
type=
"button"
class=
"btn btn-block btn-default"
>
Edit
</button></td>
<td>
<span
class=
"label label-info"
>
No
</span>
</td>
<td><button
type=
"button"
class=
"btn btn-block btn-default"
>
Delete
</button></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>
No subjects found.
</p>
{% endif %}
</div>
{% endblock maincontent %}
{% block scripts %}
{{ block.super }}
<script
src=
"{% static 'AdminLTE/plugins/datatables/jquery.dataTables.min.js' %}"
></script>
<script
src=
"{% static 'AdminLTE/plugins/datatables/dataTables.bootstrap.min.js' %}"
></script>
<script>
$
(
function
()
{
$
(
'
#table
'
).
DataTable
({
...
...
This diff is collapsed.
Click to expand it.
smash/web/views.py
+
7
−
2
View file @
fe21863a
...
...
@@ -2,6 +2,7 @@ from django.shortcuts import render
from
django.http
import
HttpResponse
from
django.template
import
loader
from
django.views
import
generic
from
.models
import
*
# Create your views here.
def
index
(
request
):
...
...
@@ -17,9 +18,13 @@ def assignments(request):
def
subjects
(
request
):
subjects_list
=
Subject
.
objects
.
order_by
(
'
-lastName
'
)
template
=
loader
.
get_template
(
"
subjects/index.html
"
)
return
HttpResponse
(
template
.
render
({
}),
request
)
context
=
{
'
subjects_list
'
:
subjects_list
}
return
HttpResponse
(
template
.
render
(
context
,
request
))
def
doctors
(
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