Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
vidjil
vidjil
Commits
d27a5317
Commit
d27a5317
authored
Dec 05, 2014
by
Marc Duez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server : save sequence file provider / patient creator
parent
8542fe7d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
16 deletions
+14
-16
server/web2py/applications/vidjil/controllers/file.py
server/web2py/applications/vidjil/controllers/file.py
+4
-2
server/web2py/applications/vidjil/controllers/user.py
server/web2py/applications/vidjil/controllers/user.py
+6
-1
server/web2py/applications/vidjil/models/db.py
server/web2py/applications/vidjil/models/db.py
+1
-0
server/web2py/applications/vidjil/views/user/index.html
server/web2py/applications/vidjil/views/user/index.html
+3
-13
No files found.
server/web2py/applications/vidjil/controllers/file.py
View file @
d27a5317
...
...
@@ -55,7 +55,8 @@ def add_form():
sequencer
=
request
.
vars
[
'sequencer'
],
producer
=
request
.
vars
[
'producer'
],
patient_id
=
request
.
vars
[
'patient_id'
],
filename
=
request
.
vars
[
'filename'
])
filename
=
request
.
vars
[
'filename'
],
provider
=
auth
.
user_id
)
res
=
{
"file_id"
:
id
,
"message"
:
request
.
vars
[
'filename'
]
+
": upload started"
,
...
...
@@ -104,7 +105,8 @@ def edit_form():
pcr
=
request
.
vars
[
'pcr'
],
sequencer
=
request
.
vars
[
'sequencer'
],
producer
=
request
.
vars
[
'producer'
],
filename
=
filename
)
filename
=
filename
,
provider
=
auth
.
user_id
)
patient_id
=
db
.
sequence_file
[
request
.
vars
[
"id"
]].
patient_id
...
...
server/web2py/applications/vidjil/controllers/user.py
View file @
d27a5317
...
...
@@ -6,7 +6,12 @@ if request.env.http_origin:
## return user list
def
index
():
return
dict
(
message
=
T
(
'user list'
))
query
=
db
(
db
.
auth_user
).
select
()
for
row
in
query
:
row
.
created_patient
=
db
(
db
.
patient
.
creator
==
row
.
id
).
count
()
return
dict
(
query
=
query
)
## return user information
## need ["id"]
...
...
server/web2py/applications/vidjil/models/db.py
View file @
d27a5317
...
...
@@ -94,6 +94,7 @@ db.define_table('patient',
Field
(
'birth'
,
'date'
),
Field
(
'info'
,
'text'
),
Field
(
'id_label'
,
'string'
),
Field
(
'creator'
,
'reference auth_user'
)
)
'''
...
...
server/web2py/applications/vidjil/views/user/index.html
View file @
d27a5317
{{extend 'db_layout.html'}}
{{('message' in globals())}}
{{if 'message' in globals():}}
{{
count = db.auth_group.id.count()
query = db(
db.auth_user
).select()
}}
<div>
<h3>
{{=message}}
</h3>
<h3>
User info
</h3>
<div
id=
"db_table_container"
>
<table
class=
"db_table"
id=
"table"
>
<thead>
<tr><td
class=
"column1"
>
user name
</td>
<td>
@
</td>
<td
class=
"colum1"
>
created patient
</td>
</tr>
</thead>
...
...
@@ -27,6 +16,7 @@ query = db(
<tr
onclick=
"db.call('user/info', {'id' :'{{=row.id}}'} )"
>
<td>
{{=row.first_name + " " + row.last_name }}
</td>
<td>
{{=row.email}}
</td>
<td>
{{=row.created_patient}}
</td>
</tr>
{{pass}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment